GeezerVison is showing github.com — gh-125207: Fix MSVC 1935 build with JIT (#125209) · python/cpython@9f3e194
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: Python/ceval.c +5Lines changed: 5 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
99 | 99 | } \ |
100 | 100 | _Py_DECREF_STAT_INC(); \ |
101 | 101 | if (--op->ob_refcnt == 0) { \ |
| 102 | + struct _reftracer_runtime_state *tracer = &_PyRuntime.ref_tracer; \ |
| 103 | + if (tracer->tracer_func != NULL) { \ |
| 104 | + void* data = tracer->tracer_data; \ |
| 105 | + tracer->tracer_func(op, PyRefTracer_DESTROY, data); \ |
| 106 | + } \ |
102 | 107 | destructor d = (destructor)(dealloc); \ |
103 | 108 | d(op); \ |
104 | 109 | } \ |
|
Collapse file
Copy file name to clipboardExpand all lines: Python/jit.c +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -469,7 +469,7 @@ _PyJIT_Compile(_PyExecutorObject *executor, const _PyUOpInstruction trace[], siz |
469 | 469 | // Loop once to find the total compiled size: |
470 | 470 | size_t code_size = 0; |
471 | 471 | size_t data_size = 0; |
472 | | - jit_state state = {}; |
| 472 | + jit_state state = {0}; |
473 | 473 | group = &trampoline; |
474 | 474 | code_size += group->code_size; |
475 | 475 | data_size += group->data_size; |
|
Collapse file
Copy file name to clipboardExpand all lines: Tools/jit/_writer.py +5-2Lines changed: 5 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -32,8 +32,11 @@ def _dump_footer( |
32 | 32 | yield "};" |
33 | 33 | yield "" |
34 | 34 | yield f"static const void * const symbols_map[{max(len(symbols), 1)}] = {{" |
35 | | - for symbol, ordinal in symbols.items(): |
36 | | - yield f" [{ordinal}] = &{symbol}," |
| 35 | + if symbols: |
| 36 | + for symbol, ordinal in symbols.items(): |
| 37 | + yield f" [{ordinal}] = &{symbol}," |
| 38 | + else: |
| 39 | + yield " 0" |
37 | 40 | yield "};" |
38 | 41 |
|
39 | 42 |
|
|