aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Tools/jit/template.c
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/jit/template.c')
-rw-r--r--Tools/jit/template.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Tools/jit/template.c b/Tools/jit/template.c
index bc18e702eea..5ee26f93f1e 100644
--- a/Tools/jit/template.c
+++ b/Tools/jit/template.c
@@ -13,6 +13,7 @@
#include "pycore_function.h"
#include "pycore_genobject.h"
#include "pycore_interpframe.h"
+#include "pycore_interpolation.h"
#include "pycore_intrinsics.h"
#include "pycore_jit.h"
#include "pycore_list.h"
@@ -25,6 +26,7 @@
#include "pycore_setobject.h"
#include "pycore_sliceobject.h"
#include "pycore_stackref.h"
+#include "pycore_template.h"
#include "pycore_tuple.h"
#include "pycore_unicodeobject.h"
@@ -48,13 +50,16 @@
#define GOTO_TIER_TWO(EXECUTOR) \
do { \
OPT_STAT_INC(traces_executed); \
- jit_func_preserve_none jitted = (EXECUTOR)->jit_side_entry; \
+ _PyExecutorObject *_executor = (EXECUTOR); \
+ tstate->current_executor = (PyObject *)_executor; \
+ jit_func_preserve_none jitted = _executor->jit_side_entry; \
__attribute__((musttail)) return jitted(frame, stack_pointer, tstate); \
} while (0)
#undef GOTO_TIER_ONE
#define GOTO_TIER_ONE(TARGET) \
do { \
+ tstate->current_executor = NULL; \
_PyFrame_SetStackPointer(frame, stack_pointer); \
return TARGET; \
} while (0)