| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| 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; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -339,7 +339,7 @@ def _get_trampoline_mask(self) -> str: | |||
| 339 | 339 | word = bitmask & ((1 << 32) - 1) | |
| 340 | 340 | trampoline_mask.append(f"{word:#04x}") | |
| 341 | 341 | bitmask >>= 32 | |
| 342 | - return "{" + ", ".join(trampoline_mask) + "}" | ||
| 342 | + return "{" + (", ".join(trampoline_mask) or "0") + "}" | ||
| 343 | 343 | ||
| 344 | 344 | def as_c(self, opname: str) -> str: | |
| 345 | 345 | """Dump this hole as a StencilGroup initializer.""" | |
| 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 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments