summaryrefslogtreecommitdiffstats
path: root/Include/internal/pycore_code.h
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2022-11-10 12:34:57 (GMT)
committerGitHub <noreply@github.com>2022-11-10 12:34:57 (GMT)
commit1e197e63e21f77b102ff2601a549dda4b6439455 (patch)
tree5d8524091404607c838bb9a0ea168c8d9c28fd6a /Include/internal/pycore_code.h
parentdbf2faf579b4094387d65ee41f049456ca67c446 (diff)
downloadcpython-1e197e63e21f77b102ff2601a549dda4b6439455.zip
cpython-1e197e63e21f77b102ff2601a549dda4b6439455.tar.gz
cpython-1e197e63e21f77b102ff2601a549dda4b6439455.tar.bz2
GH-96421: Insert shim frame on entry to interpreter (GH-96319)
* Adds EXIT_INTERPRETER instruction to exit PyEval_EvalDefault() * Simplifies RETURN_VALUE, YIELD_VALUE and RETURN_GENERATOR instructions as they no longer need to check for entry frames.
Diffstat (limited to 'Include/internal/pycore_code.h')
-rw-r--r--Include/internal/pycore_code.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Include/internal/pycore_code.h b/Include/internal/pycore_code.h
index b070307..0af240c 100644
--- a/Include/internal/pycore_code.h
+++ b/Include/internal/pycore_code.h
@@ -456,6 +456,16 @@ _PyCode_LineNumberFromArray(PyCodeObject *co, int index)
}
}
+typedef struct _PyShimCodeDef {
+ const uint8_t *code;
+ int codelen;
+ int stacksize;
+ const char *cname;
+} _PyShimCodeDef;
+
+extern PyCodeObject *
+_Py_MakeShimCode(const _PyShimCodeDef *code);
+
#ifdef __cplusplus
}