summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rwxr-xr-xPython/makeopcodetargets.py3
-rw-r--r--Python/opcode_targets.h104
-rw-r--r--Python/stdlib_module_names.h1
3 files changed, 55 insertions, 53 deletions
diff --git a/Python/makeopcodetargets.py b/Python/makeopcodetargets.py
index 2b402ae..5843079 100755
--- a/Python/makeopcodetargets.py
+++ b/Python/makeopcodetargets.py
@@ -25,12 +25,13 @@ def write_contents(f):
"""Write C code contents to the target file object.
"""
opcode = find_module('opcode')
+ _opcode_metadata = find_module('_opcode_metadata')
targets = ['_unknown_opcode'] * 256
for opname, op in opcode.opmap.items():
if not opcode.is_pseudo(op):
targets[op] = "TARGET_%s" % opname
next_op = 1
- for opname in opcode._specialized_instructions:
+ for opname in _opcode_metadata._specialized_instructions:
while targets[next_op] != '_unknown_opcode':
next_op += 1
targets[next_op] = "TARGET_%s" % opname
diff --git a/Python/opcode_targets.h b/Python/opcode_targets.h
index 451d8bb..4de4bf0 100644
--- a/Python/opcode_targets.h
+++ b/Python/opcode_targets.h
@@ -5,49 +5,49 @@ static void *opcode_targets[256] = {
&&TARGET_INTERPRETER_EXIT,
&&TARGET_END_FOR,
&&TARGET_END_SEND,
- &&TARGET_BINARY_OP_ADD_FLOAT,
+ &&TARGET_BINARY_OP_MULTIPLY_INT,
&&TARGET_BINARY_OP_ADD_INT,
- &&TARGET_BINARY_OP_ADD_UNICODE,
+ &&TARGET_BINARY_OP_SUBTRACT_INT,
&&TARGET_NOP,
- &&TARGET_BINARY_OP_INPLACE_ADD_UNICODE,
+ &&TARGET_BINARY_OP_MULTIPLY_FLOAT,
&&TARGET_UNARY_NEGATIVE,
&&TARGET_UNARY_NOT,
- &&TARGET_BINARY_OP_MULTIPLY_FLOAT,
- &&TARGET_BINARY_OP_MULTIPLY_INT,
- &&TARGET_UNARY_INVERT,
+ &&TARGET_BINARY_OP_ADD_FLOAT,
&&TARGET_BINARY_OP_SUBTRACT_FLOAT,
+ &&TARGET_UNARY_INVERT,
+ &&TARGET_BINARY_OP_ADD_UNICODE,
&&TARGET_RESERVED,
- &&TARGET_BINARY_OP_SUBTRACT_INT,
+ &&TARGET_BINARY_OP_INPLACE_ADD_UNICODE,
&&TARGET_BINARY_SUBSCR_DICT,
&&TARGET_BINARY_SUBSCR_GETITEM,
&&TARGET_BINARY_SUBSCR_LIST_INT,
&&TARGET_BINARY_SUBSCR_TUPLE_INT,
- &&TARGET_CALL_PY_EXACT_ARGS,
+ &&TARGET_STORE_SUBSCR_DICT,
&&TARGET_MAKE_FUNCTION,
&&TARGET_BINARY_SUBSCR,
&&TARGET_BINARY_SLICE,
&&TARGET_STORE_SLICE,
- &&TARGET_CALL_PY_WITH_DEFAULTS,
- &&TARGET_CALL_BOUND_METHOD_EXACT_ARGS,
+ &&TARGET_STORE_SUBSCR_LIST_INT,
+ &&TARGET_SEND_GEN,
&&TARGET_GET_LEN,
&&TARGET_MATCH_MAPPING,
&&TARGET_MATCH_SEQUENCE,
&&TARGET_MATCH_KEYS,
- &&TARGET_CALL_BUILTIN_CLASS,
+ &&TARGET_UNPACK_SEQUENCE_TWO_TUPLE,
&&TARGET_PUSH_EXC_INFO,
&&TARGET_CHECK_EXC_MATCH,
&&TARGET_CHECK_EG_MATCH,
- &&TARGET_CALL_BUILTIN_FAST_WITH_KEYWORDS,
- &&TARGET_CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS,
+ &&TARGET_UNPACK_SEQUENCE_TUPLE,
+ &&TARGET_UNPACK_SEQUENCE_LIST,
&&TARGET_FORMAT_SIMPLE,
&&TARGET_FORMAT_WITH_SPEC,
- &&TARGET_CALL_NO_KW_BUILTIN_FAST,
- &&TARGET_CALL_NO_KW_BUILTIN_O,
- &&TARGET_CALL_NO_KW_ISINSTANCE,
- &&TARGET_CALL_NO_KW_LEN,
- &&TARGET_CALL_NO_KW_LIST_APPEND,
- &&TARGET_CALL_NO_KW_METHOD_DESCRIPTOR_FAST,
- &&TARGET_CALL_NO_KW_METHOD_DESCRIPTOR_NOARGS,
+ &&TARGET_STORE_ATTR_INSTANCE_VALUE,
+ &&TARGET_STORE_ATTR_SLOT,
+ &&TARGET_STORE_ATTR_WITH_HINT,
+ &&TARGET_LOAD_GLOBAL_MODULE,
+ &&TARGET_LOAD_GLOBAL_BUILTIN,
+ &&TARGET_LOAD_SUPER_ATTR_ATTR,
+ &&TARGET_LOAD_SUPER_ATTR_METHOD,
&&TARGET_WITH_EXCEPT_START,
&&TARGET_GET_AITER,
&&TARGET_GET_ANEXT,
@@ -55,39 +55,39 @@ static void *opcode_targets[256] = {
&&TARGET_BEFORE_WITH,
&&TARGET_END_ASYNC_FOR,
&&TARGET_CLEANUP_THROW,
- &&TARGET_CALL_NO_KW_METHOD_DESCRIPTOR_O,
- &&TARGET_CALL_NO_KW_STR_1,
- &&TARGET_CALL_NO_KW_TUPLE_1,
- &&TARGET_CALL_NO_KW_TYPE_1,
+ &&TARGET_LOAD_ATTR_INSTANCE_VALUE,
+ &&TARGET_LOAD_ATTR_MODULE,
+ &&TARGET_LOAD_ATTR_WITH_HINT,
+ &&TARGET_LOAD_ATTR_SLOT,
&&TARGET_STORE_SUBSCR,
&&TARGET_DELETE_SUBSCR,
+ &&TARGET_LOAD_ATTR_CLASS,
+ &&TARGET_LOAD_ATTR_PROPERTY,
+ &&TARGET_LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN,
+ &&TARGET_LOAD_ATTR_METHOD_WITH_VALUES,
+ &&TARGET_LOAD_ATTR_METHOD_NO_DICT,
+ &&TARGET_LOAD_ATTR_METHOD_LAZY_DICT,
+ &&TARGET_GET_ITER,
+ &&TARGET_GET_YIELD_FROM_ITER,
&&TARGET_COMPARE_OP_FLOAT,
+ &&TARGET_LOAD_BUILD_CLASS,
&&TARGET_COMPARE_OP_INT,
&&TARGET_COMPARE_OP_STR,
+ &&TARGET_LOAD_ASSERTION_ERROR,
+ &&TARGET_RETURN_GENERATOR,
&&TARGET_FOR_ITER_LIST,
&&TARGET_FOR_ITER_TUPLE,
&&TARGET_FOR_ITER_RANGE,
- &&TARGET_GET_ITER,
- &&TARGET_GET_YIELD_FROM_ITER,
&&TARGET_FOR_ITER_GEN,
- &&TARGET_LOAD_BUILD_CLASS,
- &&TARGET_LOAD_SUPER_ATTR_ATTR,
- &&TARGET_LOAD_SUPER_ATTR_METHOD,
- &&TARGET_LOAD_ASSERTION_ERROR,
- &&TARGET_RETURN_GENERATOR,
- &&TARGET_LOAD_ATTR_CLASS,
- &&TARGET_LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN,
- &&TARGET_LOAD_ATTR_INSTANCE_VALUE,
- &&TARGET_LOAD_ATTR_MODULE,
- &&TARGET_LOAD_ATTR_PROPERTY,
- &&TARGET_LOAD_ATTR_SLOT,
- &&TARGET_LOAD_ATTR_WITH_HINT,
+ &&TARGET_CALL_BOUND_METHOD_EXACT_ARGS,
+ &&TARGET_CALL_PY_EXACT_ARGS,
+ &&TARGET_CALL_PY_WITH_DEFAULTS,
&&TARGET_RETURN_VALUE,
- &&TARGET_LOAD_ATTR_METHOD_LAZY_DICT,
+ &&TARGET_CALL_NO_KW_TYPE_1,
&&TARGET_SETUP_ANNOTATIONS,
- &&TARGET_LOAD_ATTR_METHOD_NO_DICT,
+ &&TARGET_CALL_NO_KW_STR_1,
&&TARGET_LOAD_LOCALS,
- &&TARGET_LOAD_ATTR_METHOD_WITH_VALUES,
+ &&TARGET_CALL_NO_KW_TUPLE_1,
&&TARGET_POP_EXCEPT,
&&TARGET_STORE_NAME,
&&TARGET_DELETE_NAME,
@@ -110,9 +110,9 @@ static void *opcode_targets[256] = {
&&TARGET_IMPORT_NAME,
&&TARGET_IMPORT_FROM,
&&TARGET_JUMP_FORWARD,
- &&TARGET_LOAD_GLOBAL_BUILTIN,
- &&TARGET_LOAD_GLOBAL_MODULE,
- &&TARGET_STORE_ATTR_INSTANCE_VALUE,
+ &&TARGET_CALL_BUILTIN_CLASS,
+ &&TARGET_CALL_NO_KW_BUILTIN_O,
+ &&TARGET_CALL_NO_KW_BUILTIN_FAST,
&&TARGET_POP_JUMP_IF_FALSE,
&&TARGET_POP_JUMP_IF_TRUE,
&&TARGET_LOAD_GLOBAL,
@@ -131,7 +131,7 @@ static void *opcode_targets[256] = {
&&TARGET_POP_JUMP_IF_NONE,
&&TARGET_RAISE_VARARGS,
&&TARGET_GET_AWAITABLE,
- &&TARGET_STORE_ATTR_SLOT,
+ &&TARGET_CALL_BUILTIN_FAST_WITH_KEYWORDS,
&&TARGET_BUILD_SLICE,
&&TARGET_JUMP_BACKWARD_NO_INTERRUPT,
&&TARGET_MAKE_CELL,
@@ -147,20 +147,20 @@ static void *opcode_targets[256] = {
&&TARGET_LIST_APPEND,
&&TARGET_SET_ADD,
&&TARGET_MAP_ADD,
- &&TARGET_STORE_ATTR_WITH_HINT,
+ &&TARGET_CALL_NO_KW_LEN,
&&TARGET_COPY_FREE_VARS,
&&TARGET_YIELD_VALUE,
&&TARGET_RESUME,
&&TARGET_MATCH_CLASS,
- &&TARGET_STORE_SUBSCR_DICT,
- &&TARGET_STORE_SUBSCR_LIST_INT,
- &&TARGET_UNPACK_SEQUENCE_LIST,
+ &&TARGET_CALL_NO_KW_ISINSTANCE,
+ &&TARGET_CALL_NO_KW_LIST_APPEND,
+ &&TARGET_CALL_NO_KW_METHOD_DESCRIPTOR_O,
&&TARGET_BUILD_CONST_KEY_MAP,
&&TARGET_BUILD_STRING,
&&TARGET_CONVERT_VALUE,
- &&TARGET_UNPACK_SEQUENCE_TUPLE,
- &&TARGET_UNPACK_SEQUENCE_TWO_TUPLE,
- &&TARGET_SEND_GEN,
+ &&TARGET_CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS,
+ &&TARGET_CALL_NO_KW_METHOD_DESCRIPTOR_NOARGS,
+ &&TARGET_CALL_NO_KW_METHOD_DESCRIPTOR_FAST,
&&TARGET_LIST_EXTEND,
&&TARGET_SET_UPDATE,
&&TARGET_DICT_MERGE,
diff --git a/Python/stdlib_module_names.h b/Python/stdlib_module_names.h
index 925b8b3..13b1764 100644
--- a/Python/stdlib_module_names.h
+++ b/Python/stdlib_module_names.h
@@ -47,6 +47,7 @@ static const char* _Py_stdlib_module_names[] = {
"_multibytecodec",
"_multiprocessing",
"_opcode",
+"_opcode_metadata",
"_operator",
"_osx_support",
"_overlapped",