Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged main into regmachine branch #100572

Closed
wants to merge 41 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
5e0ef80
add oparg2, oparg3 to the bytecode
iritkatriel Dec 15, 2022
8f30b8a
Add consts with borrowed refs to the end of the localsplus array.
iritkatriel Nov 25, 2022
e7bc5f2
add register versions of the UNARY_OPS
iritkatriel Dec 13, 2022
e9c6474
fix error check
iritkatriel Dec 16, 2022
12a37f5
remove i_stackdepth and STACK_REG, we won't use it
iritkatriel Dec 16, 2022
68b9b4b
add oparg2/oparg3 option to the _Py_CODEUNIT union
iritkatriel Dec 16, 2022
2686f86
add LOAD/STORE_FAST_R to help debugging. Fix bug in write_instr
iritkatriel Dec 16, 2022
bb7467b
sanitizer warnings
iritkatriel Dec 16, 2022
50dfc14
int--> Py_ssize_t
iritkatriel Dec 16, 2022
9dbb32e
fix error check
iritkatriel Dec 16, 2022
32b35d0
put the tmp registers after the stack
iritkatriel Dec 17, 2022
1e8531b
Merge remote-tracking branch 'upstream/main' into regmachine
iritkatriel Dec 17, 2022
e6461f1
fix bug in deopt_code
iritkatriel Dec 17, 2022
2439dff
temps are locals named (still need to revert the co_ntmps business, …
iritkatriel Dec 18, 2022
92e04e9
remove ntmps from code object and frame
iritkatriel Dec 18, 2022
9f57f0e
fix test_peepholer
iritkatriel Dec 18, 2022
ed7b38f
fix dis._get_co_positions
iritkatriel Dec 18, 2022
3ee9a3c
fix test_datetime
iritkatriel Dec 18, 2022
1461ebc
Add LOAD_CONST_R . Fix two bugs: _PyFrame_PushUnchecked does not copy…
iritkatriel Dec 20, 2022
1e83cb2
Enhance generator for register instructions (#48)
gvanrossum Dec 20, 2022
f100337
always use register versions of unary ops
iritkatriel Dec 20, 2022
ecc8a73
teach dis about LOAD_CONST_R
iritkatriel Dec 20, 2022
b86a450
wipe out oparg1,2,3 in INSTR_SET_OP0/1
iritkatriel Dec 20, 2022
d90af0c
handle EXTENDED_ARGS
iritkatriel Dec 21, 2022
44a9f4b
enable LOAD_CONST_R always
iritkatriel Dec 21, 2022
a1ebba7
skip hacky test
iritkatriel Dec 21, 2022
313b6e7
regen-all
iritkatriel Dec 21, 2022
ac0bb65
rewrite other unary-ops as register insts
iritkatriel Dec 21, 2022
603b265
add BINARY_OP_R (not specialized yet)
iritkatriel Dec 21, 2022
53facae
Revert "add BINARY_OP_R (not specialized yet)"
iritkatriel Dec 22, 2022
8e37f3d
OPSIZE parameterized by the opcode
iritkatriel Dec 22, 2022
7bb8104
move next_instr updates to where so that we always know which opcode'…
iritkatriel Dec 22, 2022
107c557
set VERBOSE to 0
iritkatriel Dec 22, 2022
cf7fc4b
regen-cases
iritkatriel Dec 23, 2022
a7efdd7
Revert "regen-cases"
iritkatriel Dec 23, 2022
dea531c
Revert "set VERBOSE to 0"
iritkatriel Dec 23, 2022
c437a64
Revert "move next_instr updates to where so that we always know which…
iritkatriel Dec 23, 2022
453bbbe
Disable specialization
iritkatriel Dec 23, 2022
ff80053
freeze only importlib
iritkatriel Dec 23, 2022
7fbeb6a
move next_instr updates to where we always know which opcode's OPSIZE…
iritkatriel Dec 24, 2022
b8b8250
Merge remote-tracking branch 'origin/main' into regmachine
gvanrossum Dec 28, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Include/cpython/code.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,16 @@ typedef union {
uint8_t opcode;
uint8_t oparg;
};
struct {
uint8_t oparg2;
uint8_t oparg3;
};
} _Py_CODEUNIT;

#define _Py_OPCODE(word) ((word).opcode)
#define _Py_OPARG(word) ((word).oparg)
#define _Py_OPARG2(word) ((word).oparg2)
#define _Py_OPARG3(word) ((word).oparg3)

static inline void
_py_set_opcode(_Py_CODEUNIT *word, uint8_t opcode)
Expand Down
7 changes: 7 additions & 0 deletions Include/internal/pycore_frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,13 @@ _PyFrame_PushUnchecked(PyThreadState *tstate, PyFunctionObject *func)
tstate->datastack_top += code->co_framesize;
assert(tstate->datastack_top < tstate->datastack_limit);
_PyFrame_InitializeSpecials(new_frame, func, NULL, code);
int nconsts = (int)PyTuple_Size(code->co_consts);
if (nconsts > 0) {
PyObject **const_regs = new_frame->localsplus + (code->co_nlocalsplus +
code->co_stacksize);
PyObject **consts = &PyTuple_GET_ITEM(code->co_consts, 0);
memcpy(const_regs, consts, sizeof(PyObject*) * nconsts);
}
return new_frame;
}

Expand Down
102 changes: 51 additions & 51 deletions Include/internal/pycore_opcode.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading