summaryrefslogtreecommitdiff
path: root/Include
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2023-05-01 22:29:30 +0100
committerGitHub <noreply@github.com>2023-05-01 22:29:30 +0100
commit80b714835d6f5e1cb8fbc486f9575b5eee9f007e (patch)
tree6bf0f1509b62e9cc9cab08df5e21b1fafc452427 /Include
parenta474e04388c2ef6aca75c26cb70a1b6200235feb (diff)
downloadcpython-git-80b714835d6f5e1cb8fbc486f9575b5eee9f007e.tar.gz
gh-87092: Expose assembler to unit tests (#103988)
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_compile.h4
-rw-r--r--Include/internal/pycore_global_objects_fini_generated.h1
-rw-r--r--Include/internal/pycore_global_strings.h1
-rw-r--r--Include/internal/pycore_runtime_init_generated.h1
-rw-r--r--Include/internal/pycore_unicodeobject_generated.h3
5 files changed, 10 insertions, 0 deletions
diff --git a/Include/internal/pycore_compile.h b/Include/internal/pycore_compile.h
index 1a032f652d..4bd4ef5723 100644
--- a/Include/internal/pycore_compile.h
+++ b/Include/internal/pycore_compile.h
@@ -103,6 +103,10 @@ PyAPI_FUNC(PyObject*) _PyCompile_OptimizeCfg(
PyObject *instructions,
PyObject *consts);
+PyAPI_FUNC(PyCodeObject*)
+_PyCompile_Assemble(_PyCompile_CodeUnitMetadata *umd, PyObject *filename,
+ PyObject *instructions);
+
#ifdef __cplusplus
}
#endif
diff --git a/Include/internal/pycore_global_objects_fini_generated.h b/Include/internal/pycore_global_objects_fini_generated.h
index 5e8a8d7841..f0740b68dd 100644
--- a/Include/internal/pycore_global_objects_fini_generated.h
+++ b/Include/internal/pycore_global_objects_fini_generated.h
@@ -1029,6 +1029,7 @@ _PyStaticObjects_CheckRefcnt(PyInterpreterState *interp) {
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(memlimit));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(message));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(metaclass));
+ _PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(metadata));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(method));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(mod));
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(mode));
diff --git a/Include/internal/pycore_global_strings.h b/Include/internal/pycore_global_strings.h
index 28e82203d8..234d5e2a09 100644
--- a/Include/internal/pycore_global_strings.h
+++ b/Include/internal/pycore_global_strings.h
@@ -517,6 +517,7 @@ struct _Py_global_strings {
STRUCT_FOR_ID(memlimit)
STRUCT_FOR_ID(message)
STRUCT_FOR_ID(metaclass)
+ STRUCT_FOR_ID(metadata)
STRUCT_FOR_ID(method)
STRUCT_FOR_ID(mod)
STRUCT_FOR_ID(mode)
diff --git a/Include/internal/pycore_runtime_init_generated.h b/Include/internal/pycore_runtime_init_generated.h
index dd4471160a..16f2147aa8 100644
--- a/Include/internal/pycore_runtime_init_generated.h
+++ b/Include/internal/pycore_runtime_init_generated.h
@@ -1023,6 +1023,7 @@ extern "C" {
INIT_ID(memlimit), \
INIT_ID(message), \
INIT_ID(metaclass), \
+ INIT_ID(metadata), \
INIT_ID(method), \
INIT_ID(mod), \
INIT_ID(mode), \
diff --git a/Include/internal/pycore_unicodeobject_generated.h b/Include/internal/pycore_unicodeobject_generated.h
index 1a8338b341..cd41b73153 100644
--- a/Include/internal/pycore_unicodeobject_generated.h
+++ b/Include/internal/pycore_unicodeobject_generated.h
@@ -1404,6 +1404,9 @@ _PyUnicode_InitStaticStrings(PyInterpreterState *interp) {
string = &_Py_ID(metaclass);
assert(_PyUnicode_CheckConsistency(string, 1));
_PyUnicode_InternInPlace(interp, &string);
+ string = &_Py_ID(metadata);
+ assert(_PyUnicode_CheckConsistency(string, 1));
+ _PyUnicode_InternInPlace(interp, &string);
string = &_Py_ID(method);
assert(_PyUnicode_CheckConsistency(string, 1));
_PyUnicode_InternInPlace(interp, &string);