mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
GH-139109: Support switch/case dispatch with the tracing interpreter. (GH-141703)
This commit is contained in:
parent
b87613f214
commit
b420f6be53
18 changed files with 617 additions and 585 deletions
|
|
@ -5636,10 +5636,12 @@ dummy_func(
|
|||
DISPATCH();
|
||||
}
|
||||
|
||||
label(record_previous_inst) {
|
||||
inst(TRACE_RECORD, (--)) {
|
||||
#if _Py_TIER2
|
||||
assert(IS_JIT_TRACING());
|
||||
int opcode = next_instr->op.code;
|
||||
next_instr = this_instr;
|
||||
frame->instr_ptr = prev_instr;
|
||||
opcode = next_instr->op.code;
|
||||
bool stop_tracing = (opcode == WITH_EXCEPT_START ||
|
||||
opcode == RERAISE || opcode == CLEANUP_THROW ||
|
||||
opcode == PUSH_EXC_INFO || opcode == INTERPRETER_EXIT);
|
||||
|
|
@ -5675,7 +5677,8 @@ dummy_func(
|
|||
}
|
||||
DISPATCH_GOTO_NON_TRACING();
|
||||
#else
|
||||
Py_FatalError("JIT label executed in non-jit build.");
|
||||
(void)prev_instr;
|
||||
Py_FatalError("JIT instruction executed in non-jit build.");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue