Skip to content

Commit f9279af

Browse files
committed
Add clarifying comment
1 parent ca9663a commit f9279af

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Python/jit.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -559,13 +559,16 @@ _PyJIT_Compile(_PyExecutorObject *executor, const _PyUOpInstruction trace[], siz
559559
return 0;
560560
}
561561

562-
// Compiles executor in-place. Don't forget to call _PyJIT_Free later!
562+
/* One-off compilation of the jit entry trampoline
563+
* We compile this once only as it effectively a normal
564+
* function, but we need to use the JIT because it needs
565+
* to understand the jit-specific calling convention.
566+
*/
563567
static _PyJitEntryFuncPtr
564568
compile_trampoline(void)
565569
{
566570
_PyExecutorObject dummy;
567571
const StencilGroup *group;
568-
// Loop once to find the total compiled size:
569572
size_t code_size = 0;
570573
size_t data_size = 0;
571574
jit_state state = {0};
@@ -583,7 +586,6 @@ compile_trampoline(void)
583586
if (memory == NULL) {
584587
return NULL;
585588
}
586-
// Loop again to emit the code:
587589
unsigned char *code = memory;
588590
state.trampolines.mem = memory + code_size;
589591
unsigned char *data = memory + code_size + state.trampolines.size + code_padding;

0 commit comments

Comments
 (0)