Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Python/optimizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1788,18 +1788,24 @@ _Py_ExecutorInit(_PyExecutorObject *executor, const _PyBloomFilter *dependency_s
}
return 0;
}

Comment thread
BHUVANSH855 marked this conversation as resolved.
static _PyExecutorObject *
make_cold_executor(uint16_t opcode)
{
_PyExecutorObject *cold = allocate_executor(0, 1);
if (cold == NULL) {
Py_FatalError("Cannot allocate core JIT code");
}

Comment thread
BHUVANSH855 marked this conversation as resolved.
Outdated
((_PyUOpInstruction *)cold->trace)->opcode = opcode;

// Cold executors bypass _Py_ExecutorInit().
cold->vm_data.valid = true;
cold->vm_data.pending_deletion = 0;
Comment thread
BHUVANSH855 marked this conversation as resolved.

// This is initialized to false so we can prevent the executor
// from being immediately detected as cold and invalidated.
cold->vm_data.cold = false;

Comment thread
BHUVANSH855 marked this conversation as resolved.
Outdated
#ifdef _Py_JIT
cold->jit_code = NULL;
cold->jit_size = 0;
Expand All @@ -1808,6 +1814,7 @@ make_cold_executor(uint16_t opcode)
Py_FatalError("Cannot allocate core JIT code");
}
#endif

Comment thread
BHUVANSH855 marked this conversation as resolved.
Outdated
_Py_SetImmortal((PyObject *)cold);
return cold;
}
Expand Down
Loading