| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -57,10 +57,9 @@ jobs: | |||
| 57 | 57 | fail-fast: false | |
| 58 | 58 | matrix: | |
| 59 | 59 | target: | |
| 60 | - # To re-enable later when we support these. | ||
| 61 | - # - i686-pc-windows-msvc/msvc | ||
| 62 | - # - x86_64-pc-windows-msvc/msvc | ||
| 63 | - # - aarch64-pc-windows-msvc/msvc | ||
| 60 | + - i686-pc-windows-msvc/msvc | ||
| 61 | + - x86_64-pc-windows-msvc/msvc | ||
| 62 | + - aarch64-pc-windows-msvc/msvc | ||
| 64 | 63 | - x86_64-apple-darwin/clang | |
| 65 | 64 | - aarch64-apple-darwin/clang | |
| 66 | 65 | - x86_64-unknown-linux-gnu/gcc | |
@@ -71,16 +70,15 @@ jobs: | |||
| 71 | 70 | llvm: | |
| 72 | 71 | - 21 | |
| 73 | 72 | include: | |
| 74 | - # To re-enable later when we support these. | ||
| 75 | - # - target: i686-pc-windows-msvc/msvc | ||
| 76 | - # architecture: Win32 | ||
| 77 | - # runner: windows-2022 | ||
| 78 | - # - target: x86_64-pc-windows-msvc/msvc | ||
| 79 | - # architecture: x64 | ||
| 80 | - # runner: windows-2022 | ||
| 81 | - # - target: aarch64-pc-windows-msvc/msvc | ||
| 82 | - # architecture: ARM64 | ||
| 83 | - # runner: windows-11-arm | ||
| 73 | + - target: i686-pc-windows-msvc/msvc | ||
| 74 | + architecture: Win32 | ||
| 75 | + runner: windows-2022 | ||
| 76 | + - target: x86_64-pc-windows-msvc/msvc | ||
| 77 | + architecture: x64 | ||
| 78 | + runner: windows-2022 | ||
| 79 | + - target: aarch64-pc-windows-msvc/msvc | ||
| 80 | + architecture: ARM64 | ||
| 81 | + runner: windows-11-arm | ||
| 84 | 82 | - target: x86_64-apple-darwin/clang | |
| 85 | 83 | architecture: x86_64 | |
| 86 | 84 | runner: macos-15-intel | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -286,6 +286,7 @@ Known values: | |||
| 286 | 286 | Python 3.15a1 3653 (Fix handling of opcodes that may leave operands on the stack when optimizing LOAD_FAST) | |
| 287 | 287 | Python 3.15a1 3654 (Fix missing exception handlers in logical expression) | |
| 288 | 288 | Python 3.15a1 3655 (Fix miscompilation of some module-level annotations) | |
| 289 | + Python 3.15a1 3656 (Add TRACE_RECORD instruction, for platforms with switch based interpreter) | ||
| 289 | 290 | ||
| 290 | 291 | ||
| 291 | 292 | Python 3.16 will start with 3700 | |
@@ -299,7 +300,7 @@ PC/launcher.c must also be updated. | |||
| 299 | 300 | ||
| 300 | 301 | */ | |
| 301 | 302 | ||
| 302 | - #define PYC_MAGIC_NUMBER 3655 | ||
| 303 | + #define PYC_MAGIC_NUMBER 3656 | ||
| 303 | 304 | /* This is equivalent to converting PYC_MAGIC_NUMBER to 2 bytes | |
| 304 | 305 | (little-endian) and then appending b'\r\n'. */ | |
| 305 | 306 | #define PYC_MAGIC_NUMBER_TOKEN \ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -364,7 +364,7 @@ extern void _Py_ClearExecutorDeletionList(PyInterpreterState *interp); | |||
| 364 | 364 | ||
| 365 | 365 | int _PyJit_translate_single_bytecode_to_trace(PyThreadState *tstate, _PyInterpreterFrame *frame, _Py_CODEUNIT *next_instr, int stop_tracing_opcode); | |
| 366 | 366 | ||
| 367 | - int | ||
| 367 | + PyAPI_FUNC(int) | ||
| 368 | 368 | _PyJit_TryInitializeTracing(PyThreadState *tstate, _PyInterpreterFrame *frame, | |
| 369 | 369 | _Py_CODEUNIT *curr_instr, _Py_CODEUNIT *start_instr, | |
| 370 | 370 | _Py_CODEUNIT *close_loop_instr, int curr_stackdepth, int chain_depth, _PyExitData *exit, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5636,10 +5636,12 @@ dummy_func( | |||
| 5636 | 5636 | DISPATCH(); | |
| 5637 | 5637 | } | |
| 5638 | 5638 | ||
| 5639 | - label(record_previous_inst) { | ||
| 5639 | + inst(TRACE_RECORD, (--)) { | ||
| 5640 | 5640 | #if _Py_TIER2 | |
| 5641 | 5641 | assert(IS_JIT_TRACING()); | |
| 5642 | - int opcode = next_instr->op.code; | ||
| 5642 | + next_instr = this_instr; | ||
| 5643 | + frame->instr_ptr = prev_instr; | ||
| 5644 | + opcode = next_instr->op.code; | ||
| 5643 | 5645 | bool stop_tracing = (opcode == WITH_EXCEPT_START || | |
| 5644 | 5646 | opcode == RERAISE || opcode == CLEANUP_THROW || | |
| 5645 | 5647 | opcode == PUSH_EXC_INFO || opcode == INTERPRETER_EXIT); | |
@@ -5675,7 +5677,8 @@ dummy_func( | |||
| 5675 | 5677 | } | |
| 5676 | 5678 | DISPATCH_GOTO_NON_TRACING(); | |
| 5677 | 5679 | #else | |
| 5678 | - Py_FatalError("JIT label executed in non-jit build."); | ||
| 5680 | + (void)prev_instr; | ||
| 5681 | + Py_FatalError("JIT instruction executed in non-jit build."); | ||
| 5679 | 5682 | #endif | |
| 5680 | 5683 | } | |
| 5681 | 5684 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1179,6 +1179,10 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int | |||
| 1179 | 1179 | uint8_t opcode; /* Current opcode */ | |
| 1180 | 1180 | int oparg; /* Current opcode argument, if any */ | |
| 1181 | 1181 | assert(tstate->current_frame == NULL || tstate->current_frame->stackpointer != NULL); | |
| 1182 | + #if !USE_COMPUTED_GOTOS | ||
| 1183 | + uint8_t tracing_mode = 0; | ||
| 1184 | + uint8_t dispatch_code; | ||
| 1185 | + #endif | ||
| 1182 | 1186 | #endif | |
| 1183 | 1187 | _PyEntryFrame entry; | |
| 1184 | 1188 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -134,8 +134,8 @@ | |||
| 134 | 134 | # define LABEL(name) name: | |
| 135 | 135 | #else | |
| 136 | 136 | # define TARGET(op) case op: TARGET_##op: | |
| 137 | - # define DISPATCH_GOTO() goto dispatch_opcode | ||
| 138 | - # define DISPATCH_GOTO_NON_TRACING() goto dispatch_opcode | ||
| 137 | + # define DISPATCH_GOTO() dispatch_code = opcode | tracing_mode ; goto dispatch_opcode | ||
| 138 | + # define DISPATCH_GOTO_NON_TRACING() dispatch_code = opcode; goto dispatch_opcode | ||
| 139 | 139 | # define JUMP_TO_LABEL(name) goto name; | |
| 140 | 140 | # define JUMP_TO_PREDICTED(name) goto PREDICTED_##name; | |
| 141 | 141 | # define LABEL(name) name: | |
@@ -148,9 +148,9 @@ | |||
| 148 | 148 | # define LEAVE_TRACING() \ | |
| 149 | 149 | DISPATCH_TABLE_VAR = DISPATCH_TABLE; | |
| 150 | 150 | #else | |
| 151 | - # define IS_JIT_TRACING() (0) | ||
| 152 | - # define ENTER_TRACING() | ||
| 153 | - # define LEAVE_TRACING() | ||
| 151 | + # define IS_JIT_TRACING() (tracing_mode != 0) | ||
| 152 | + # define ENTER_TRACING() tracing_mode = 255 | ||
| 153 | + # define LEAVE_TRACING() tracing_mode = 0 | ||
| 154 | 154 | #endif | |
| 155 | 155 | ||
| 156 | 156 | /* PRE_DISPATCH_GOTO() does lltrace if enabled. Normally a no-op */ | |
| Back | FazBrowse Home | New Git URL |
0 commit comments