[draft] Register machine - Add tmps in frame and compiler. Add RETURN_VALUE_R.#101208
[draft] Register machine - Add tmps in frame and compiler. Add RETURN_VALUE_R.#101208iritkatriel wants to merge 5 commits intopython:mainfrom
Conversation
| #define SAME_REGISTER(R1, R2) (((R1).type == (R2).type) && ((R1).value == (R2).value)) | ||
|
|
||
| typedef struct instr_opargs_ { | ||
| oparg_t arg1; |
There was a problem hiding this comment.
Once we have variable-length instructions, arg2, arg3 should be added here. Then search this file for arg1 and update all those places to work with the other args as well.
…ace function (in case the latter raises)
| opcode = _Py_OPCODE(word); \ | ||
| oparg1 = oparg = _Py_OPARG(word); \ | ||
| oparg = _Py_OPARG(word); \ | ||
| oparg1 = oparg; \ |
There was a problem hiding this comment.
I'm not excited about having two variables. In my own 'long-insts' branch I just count oparg, oparg2, oparg3, ...
There was a problem hiding this comment.
I think the generator currently emits REG(oparg1). We could change that.
There was a problem hiding this comment.
Or we could "#define oparg1 oparg".
There was a problem hiding this comment.
I prefer modifying the generator over the macro. REG(oparg1) only occurs once in the generator, explicitly, so it's very easy to change (in fact in ly 'long-instrs' I already changed it.)
Uh oh!
There was an error while loading. Please reload this page.