mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
GH-128914: Remove all but one conditional stack effects (GH-129226)
* Remove all 'if (0)' and 'if (1)' conditional stack effects * Use array instead of conditional for BUILD_SLICE args * Refactor LOAD_GLOBAL to use a common conditional uop * Remove conditional stack effects from LOAD_ATTR specializations * Replace conditional stack effects in LOAD_ATTR with a 0 or 1 sized array. * Remove conditional stack effects from CALL_FUNCTION_EX
This commit is contained in:
parent
8ec76d9034
commit
75b4962157
19 changed files with 518 additions and 758 deletions
|
@ -267,6 +267,7 @@ Known values:
|
||||||
Python 3.14a4 3612 (Add POP_ITER and INSTRUMENTED_POP_ITER)
|
Python 3.14a4 3612 (Add POP_ITER and INSTRUMENTED_POP_ITER)
|
||||||
Python 3.14a4 3613 (Add LOAD_CONST_MORTAL instruction)
|
Python 3.14a4 3613 (Add LOAD_CONST_MORTAL instruction)
|
||||||
Python 3.14a5 3614 (Add BINARY_OP_EXTEND)
|
Python 3.14a5 3614 (Add BINARY_OP_EXTEND)
|
||||||
|
Python 3.14a5 3615 (CALL_FUNCTION_EX always take a kwargs argument)
|
||||||
|
|
||||||
Python 3.15 will start with 3650
|
Python 3.15 will start with 3650
|
||||||
|
|
||||||
|
@ -279,7 +280,7 @@ PC/launcher.c must also be updated.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define PYC_MAGIC_NUMBER 3614
|
#define PYC_MAGIC_NUMBER 3615
|
||||||
/* This is equivalent to converting PYC_MAGIC_NUMBER to 2 bytes
|
/* This is equivalent to converting PYC_MAGIC_NUMBER to 2 bytes
|
||||||
(little-endian) and then appending b'\r\n'. */
|
(little-endian) and then appending b'\r\n'. */
|
||||||
#define PYC_MAGIC_NUMBER_TOKEN \
|
#define PYC_MAGIC_NUMBER_TOKEN \
|
||||||
|
|
32
Include/internal/pycore_opcode_metadata.h
generated
32
Include/internal/pycore_opcode_metadata.h
generated
|
@ -76,7 +76,7 @@ int _PyOpcode_num_popped(int opcode, int oparg) {
|
||||||
case BUILD_SET:
|
case BUILD_SET:
|
||||||
return oparg;
|
return oparg;
|
||||||
case BUILD_SLICE:
|
case BUILD_SLICE:
|
||||||
return 2 + ((oparg == 3) ? 1 : 0);
|
return oparg;
|
||||||
case BUILD_STRING:
|
case BUILD_STRING:
|
||||||
return oparg;
|
return oparg;
|
||||||
case BUILD_TUPLE:
|
case BUILD_TUPLE:
|
||||||
|
@ -100,7 +100,7 @@ int _PyOpcode_num_popped(int opcode, int oparg) {
|
||||||
case CALL_BUILTIN_O:
|
case CALL_BUILTIN_O:
|
||||||
return 2 + oparg;
|
return 2 + oparg;
|
||||||
case CALL_FUNCTION_EX:
|
case CALL_FUNCTION_EX:
|
||||||
return 3 + (oparg & 1);
|
return 4;
|
||||||
case CALL_INTRINSIC_1:
|
case CALL_INTRINSIC_1:
|
||||||
return 1;
|
return 1;
|
||||||
case CALL_INTRINSIC_2:
|
case CALL_INTRINSIC_2:
|
||||||
|
@ -1058,7 +1058,7 @@ int _PyOpcode_max_stack_effect(int opcode, int oparg, int *effect) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case BUILD_SLICE: {
|
case BUILD_SLICE: {
|
||||||
*effect = -1 - ((oparg == 3) ? 1 : 0);
|
*effect = 1 - oparg;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case BUILD_STRING: {
|
case BUILD_STRING: {
|
||||||
|
@ -1114,7 +1114,7 @@ int _PyOpcode_max_stack_effect(int opcode, int oparg, int *effect) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case CALL_FUNCTION_EX: {
|
case CALL_FUNCTION_EX: {
|
||||||
*effect = Py_MAX(0, -2 - (oparg & 1));
|
*effect = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case CALL_INTRINSIC_1: {
|
case CALL_INTRINSIC_1: {
|
||||||
|
@ -1496,7 +1496,9 @@ int _PyOpcode_max_stack_effect(int opcode, int oparg, int *effect) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case LOAD_ATTR: {
|
case LOAD_ATTR: {
|
||||||
*effect = Py_MAX(1, (oparg & 1));
|
int max_eff = Py_MAX(1, (oparg & 1));
|
||||||
|
max_eff = Py_MAX(max_eff, (oparg&1));
|
||||||
|
*effect = max_eff;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case LOAD_ATTR_CLASS: {
|
case LOAD_ATTR_CLASS: {
|
||||||
|
@ -2023,7 +2025,7 @@ const struct opcode_metadata _PyOpcode_opcode_metadata[266] = {
|
||||||
[CALL_BUILTIN_FAST] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_DEOPT_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
|
[CALL_BUILTIN_FAST] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_DEOPT_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
|
||||||
[CALL_BUILTIN_FAST_WITH_KEYWORDS] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_DEOPT_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
|
[CALL_BUILTIN_FAST_WITH_KEYWORDS] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_DEOPT_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
|
||||||
[CALL_BUILTIN_O] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
|
[CALL_BUILTIN_O] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
|
||||||
[CALL_FUNCTION_EX] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG },
|
[CALL_FUNCTION_EX] = { true, INSTR_FMT_IX, HAS_EVAL_BREAK_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG },
|
||||||
[CALL_INTRINSIC_1] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
|
[CALL_INTRINSIC_1] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
|
||||||
[CALL_INTRINSIC_2] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
|
[CALL_INTRINSIC_2] = { true, INSTR_FMT_IB, HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG },
|
||||||
[CALL_ISINSTANCE] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG },
|
[CALL_ISINSTANCE] = { true, INSTR_FMT_IBC00, HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG },
|
||||||
|
@ -2324,18 +2326,18 @@ _PyOpcode_macro_expansion[256] = {
|
||||||
[LIST_APPEND] = { .nuops = 1, .uops = { { _LIST_APPEND, 0, 0 } } },
|
[LIST_APPEND] = { .nuops = 1, .uops = { { _LIST_APPEND, 0, 0 } } },
|
||||||
[LIST_EXTEND] = { .nuops = 1, .uops = { { _LIST_EXTEND, 0, 0 } } },
|
[LIST_EXTEND] = { .nuops = 1, .uops = { { _LIST_EXTEND, 0, 0 } } },
|
||||||
[LOAD_ATTR] = { .nuops = 1, .uops = { { _LOAD_ATTR, 0, 0 } } },
|
[LOAD_ATTR] = { .nuops = 1, .uops = { { _LOAD_ATTR, 0, 0 } } },
|
||||||
[LOAD_ATTR_CLASS] = { .nuops = 2, .uops = { { _CHECK_ATTR_CLASS, 2, 1 }, { _LOAD_ATTR_CLASS, 4, 5 } } },
|
[LOAD_ATTR_CLASS] = { .nuops = 3, .uops = { { _CHECK_ATTR_CLASS, 2, 1 }, { _LOAD_ATTR_CLASS, 4, 5 }, { _PUSH_NULL_CONDITIONAL, 0, 0 } } },
|
||||||
[LOAD_ATTR_CLASS_WITH_METACLASS_CHECK] = { .nuops = 3, .uops = { { _CHECK_ATTR_CLASS, 2, 1 }, { _GUARD_TYPE_VERSION, 2, 3 }, { _LOAD_ATTR_CLASS, 4, 5 } } },
|
[LOAD_ATTR_CLASS_WITH_METACLASS_CHECK] = { .nuops = 4, .uops = { { _CHECK_ATTR_CLASS, 2, 1 }, { _GUARD_TYPE_VERSION, 2, 3 }, { _LOAD_ATTR_CLASS, 4, 5 }, { _PUSH_NULL_CONDITIONAL, 0, 0 } } },
|
||||||
[LOAD_ATTR_INSTANCE_VALUE] = { .nuops = 3, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _CHECK_MANAGED_OBJECT_HAS_VALUES, 0, 0 }, { _LOAD_ATTR_INSTANCE_VALUE, 1, 3 } } },
|
[LOAD_ATTR_INSTANCE_VALUE] = { .nuops = 4, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _CHECK_MANAGED_OBJECT_HAS_VALUES, 0, 0 }, { _LOAD_ATTR_INSTANCE_VALUE, 1, 3 }, { _PUSH_NULL_CONDITIONAL, 0, 0 } } },
|
||||||
[LOAD_ATTR_METHOD_LAZY_DICT] = { .nuops = 3, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _CHECK_ATTR_METHOD_LAZY_DICT, 1, 3 }, { _LOAD_ATTR_METHOD_LAZY_DICT, 4, 5 } } },
|
[LOAD_ATTR_METHOD_LAZY_DICT] = { .nuops = 3, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _CHECK_ATTR_METHOD_LAZY_DICT, 1, 3 }, { _LOAD_ATTR_METHOD_LAZY_DICT, 4, 5 } } },
|
||||||
[LOAD_ATTR_METHOD_NO_DICT] = { .nuops = 2, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _LOAD_ATTR_METHOD_NO_DICT, 4, 5 } } },
|
[LOAD_ATTR_METHOD_NO_DICT] = { .nuops = 2, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _LOAD_ATTR_METHOD_NO_DICT, 4, 5 } } },
|
||||||
[LOAD_ATTR_METHOD_WITH_VALUES] = { .nuops = 4, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT, 0, 0 }, { _GUARD_KEYS_VERSION, 2, 3 }, { _LOAD_ATTR_METHOD_WITH_VALUES, 4, 5 } } },
|
[LOAD_ATTR_METHOD_WITH_VALUES] = { .nuops = 4, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT, 0, 0 }, { _GUARD_KEYS_VERSION, 2, 3 }, { _LOAD_ATTR_METHOD_WITH_VALUES, 4, 5 } } },
|
||||||
[LOAD_ATTR_MODULE] = { .nuops = 2, .uops = { { _CHECK_ATTR_MODULE_PUSH_KEYS, 2, 1 }, { _LOAD_ATTR_MODULE_FROM_KEYS, 1, 3 } } },
|
[LOAD_ATTR_MODULE] = { .nuops = 3, .uops = { { _CHECK_ATTR_MODULE_PUSH_KEYS, 2, 1 }, { _LOAD_ATTR_MODULE_FROM_KEYS, 1, 3 }, { _PUSH_NULL_CONDITIONAL, 0, 0 } } },
|
||||||
[LOAD_ATTR_NONDESCRIPTOR_NO_DICT] = { .nuops = 2, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _LOAD_ATTR_NONDESCRIPTOR_NO_DICT, 4, 5 } } },
|
[LOAD_ATTR_NONDESCRIPTOR_NO_DICT] = { .nuops = 2, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _LOAD_ATTR_NONDESCRIPTOR_NO_DICT, 4, 5 } } },
|
||||||
[LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES] = { .nuops = 4, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT, 0, 0 }, { _GUARD_KEYS_VERSION, 2, 3 }, { _LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES, 4, 5 } } },
|
[LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES] = { .nuops = 4, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT, 0, 0 }, { _GUARD_KEYS_VERSION, 2, 3 }, { _LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES, 4, 5 } } },
|
||||||
[LOAD_ATTR_PROPERTY] = { .nuops = 5, .uops = { { _CHECK_PEP_523, 0, 0 }, { _GUARD_TYPE_VERSION, 2, 1 }, { _LOAD_ATTR_PROPERTY_FRAME, 4, 5 }, { _SAVE_RETURN_OFFSET, 7, 9 }, { _PUSH_FRAME, 0, 0 } } },
|
[LOAD_ATTR_PROPERTY] = { .nuops = 5, .uops = { { _CHECK_PEP_523, 0, 0 }, { _GUARD_TYPE_VERSION, 2, 1 }, { _LOAD_ATTR_PROPERTY_FRAME, 4, 5 }, { _SAVE_RETURN_OFFSET, 7, 9 }, { _PUSH_FRAME, 0, 0 } } },
|
||||||
[LOAD_ATTR_SLOT] = { .nuops = 2, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _LOAD_ATTR_SLOT, 1, 3 } } },
|
[LOAD_ATTR_SLOT] = { .nuops = 3, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _LOAD_ATTR_SLOT, 1, 3 }, { _PUSH_NULL_CONDITIONAL, 0, 0 } } },
|
||||||
[LOAD_ATTR_WITH_HINT] = { .nuops = 3, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _CHECK_ATTR_WITH_HINT, 0, 0 }, { _LOAD_ATTR_WITH_HINT, 1, 3 } } },
|
[LOAD_ATTR_WITH_HINT] = { .nuops = 4, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _CHECK_ATTR_WITH_HINT, 0, 0 }, { _LOAD_ATTR_WITH_HINT, 1, 3 }, { _PUSH_NULL_CONDITIONAL, 0, 0 } } },
|
||||||
[LOAD_BUILD_CLASS] = { .nuops = 1, .uops = { { _LOAD_BUILD_CLASS, 0, 0 } } },
|
[LOAD_BUILD_CLASS] = { .nuops = 1, .uops = { { _LOAD_BUILD_CLASS, 0, 0 } } },
|
||||||
[LOAD_COMMON_CONSTANT] = { .nuops = 1, .uops = { { _LOAD_COMMON_CONSTANT, 0, 0 } } },
|
[LOAD_COMMON_CONSTANT] = { .nuops = 1, .uops = { { _LOAD_COMMON_CONSTANT, 0, 0 } } },
|
||||||
[LOAD_CONST_IMMORTAL] = { .nuops = 1, .uops = { { _LOAD_CONST_IMMORTAL, 0, 0 } } },
|
[LOAD_CONST_IMMORTAL] = { .nuops = 1, .uops = { { _LOAD_CONST_IMMORTAL, 0, 0 } } },
|
||||||
|
@ -2346,9 +2348,9 @@ _PyOpcode_macro_expansion[256] = {
|
||||||
[LOAD_FAST_CHECK] = { .nuops = 1, .uops = { { _LOAD_FAST_CHECK, 0, 0 } } },
|
[LOAD_FAST_CHECK] = { .nuops = 1, .uops = { { _LOAD_FAST_CHECK, 0, 0 } } },
|
||||||
[LOAD_FAST_LOAD_FAST] = { .nuops = 2, .uops = { { _LOAD_FAST, 5, 0 }, { _LOAD_FAST, 6, 0 } } },
|
[LOAD_FAST_LOAD_FAST] = { .nuops = 2, .uops = { { _LOAD_FAST, 5, 0 }, { _LOAD_FAST, 6, 0 } } },
|
||||||
[LOAD_FROM_DICT_OR_DEREF] = { .nuops = 1, .uops = { { _LOAD_FROM_DICT_OR_DEREF, 0, 0 } } },
|
[LOAD_FROM_DICT_OR_DEREF] = { .nuops = 1, .uops = { { _LOAD_FROM_DICT_OR_DEREF, 0, 0 } } },
|
||||||
[LOAD_GLOBAL] = { .nuops = 1, .uops = { { _LOAD_GLOBAL, 0, 0 } } },
|
[LOAD_GLOBAL] = { .nuops = 2, .uops = { { _LOAD_GLOBAL, 0, 0 }, { _PUSH_NULL_CONDITIONAL, 0, 0 } } },
|
||||||
[LOAD_GLOBAL_BUILTIN] = { .nuops = 3, .uops = { { _GUARD_GLOBALS_VERSION, 1, 1 }, { _GUARD_BUILTINS_VERSION_PUSH_KEYS, 1, 2 }, { _LOAD_GLOBAL_BUILTINS_FROM_KEYS, 1, 3 } } },
|
[LOAD_GLOBAL_BUILTIN] = { .nuops = 4, .uops = { { _GUARD_GLOBALS_VERSION, 1, 1 }, { _GUARD_BUILTINS_VERSION_PUSH_KEYS, 1, 2 }, { _LOAD_GLOBAL_BUILTINS_FROM_KEYS, 1, 3 }, { _PUSH_NULL_CONDITIONAL, 0, 0 } } },
|
||||||
[LOAD_GLOBAL_MODULE] = { .nuops = 2, .uops = { { _GUARD_GLOBALS_VERSION_PUSH_KEYS, 1, 1 }, { _LOAD_GLOBAL_MODULE_FROM_KEYS, 1, 3 } } },
|
[LOAD_GLOBAL_MODULE] = { .nuops = 3, .uops = { { _GUARD_GLOBALS_VERSION_PUSH_KEYS, 1, 1 }, { _LOAD_GLOBAL_MODULE_FROM_KEYS, 1, 3 }, { _PUSH_NULL_CONDITIONAL, 0, 0 } } },
|
||||||
[LOAD_LOCALS] = { .nuops = 1, .uops = { { _LOAD_LOCALS, 0, 0 } } },
|
[LOAD_LOCALS] = { .nuops = 1, .uops = { { _LOAD_LOCALS, 0, 0 } } },
|
||||||
[LOAD_NAME] = { .nuops = 1, .uops = { { _LOAD_NAME, 0, 0 } } },
|
[LOAD_NAME] = { .nuops = 1, .uops = { { _LOAD_NAME, 0, 0 } } },
|
||||||
[LOAD_SMALL_INT] = { .nuops = 1, .uops = { { _LOAD_SMALL_INT, 0, 0 } } },
|
[LOAD_SMALL_INT] = { .nuops = 1, .uops = { { _LOAD_SMALL_INT, 0, 0 } } },
|
||||||
|
|
151
Include/internal/pycore_uop_ids.h
generated
151
Include/internal/pycore_uop_ids.h
generated
|
@ -180,127 +180,120 @@ extern "C" {
|
||||||
#define _LIST_EXTEND LIST_EXTEND
|
#define _LIST_EXTEND LIST_EXTEND
|
||||||
#define _LOAD_ATTR 410
|
#define _LOAD_ATTR 410
|
||||||
#define _LOAD_ATTR_CLASS 411
|
#define _LOAD_ATTR_CLASS 411
|
||||||
#define _LOAD_ATTR_CLASS_0 412
|
|
||||||
#define _LOAD_ATTR_CLASS_1 413
|
|
||||||
#define _LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN
|
#define _LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN
|
||||||
#define _LOAD_ATTR_INSTANCE_VALUE 414
|
#define _LOAD_ATTR_INSTANCE_VALUE 412
|
||||||
#define _LOAD_ATTR_INSTANCE_VALUE_0 415
|
#define _LOAD_ATTR_METHOD_LAZY_DICT 413
|
||||||
#define _LOAD_ATTR_INSTANCE_VALUE_1 416
|
#define _LOAD_ATTR_METHOD_NO_DICT 414
|
||||||
#define _LOAD_ATTR_METHOD_LAZY_DICT 417
|
#define _LOAD_ATTR_METHOD_WITH_VALUES 415
|
||||||
#define _LOAD_ATTR_METHOD_NO_DICT 418
|
#define _LOAD_ATTR_MODULE 416
|
||||||
#define _LOAD_ATTR_METHOD_WITH_VALUES 419
|
#define _LOAD_ATTR_MODULE_FROM_KEYS 417
|
||||||
#define _LOAD_ATTR_MODULE 420
|
#define _LOAD_ATTR_NONDESCRIPTOR_NO_DICT 418
|
||||||
#define _LOAD_ATTR_MODULE_FROM_KEYS 421
|
#define _LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES 419
|
||||||
#define _LOAD_ATTR_NONDESCRIPTOR_NO_DICT 422
|
#define _LOAD_ATTR_PROPERTY_FRAME 420
|
||||||
#define _LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES 423
|
#define _LOAD_ATTR_SLOT 421
|
||||||
#define _LOAD_ATTR_PROPERTY_FRAME 424
|
#define _LOAD_ATTR_WITH_HINT 422
|
||||||
#define _LOAD_ATTR_SLOT 425
|
|
||||||
#define _LOAD_ATTR_SLOT_0 426
|
|
||||||
#define _LOAD_ATTR_SLOT_1 427
|
|
||||||
#define _LOAD_ATTR_WITH_HINT 428
|
|
||||||
#define _LOAD_BUILD_CLASS LOAD_BUILD_CLASS
|
#define _LOAD_BUILD_CLASS LOAD_BUILD_CLASS
|
||||||
#define _LOAD_BYTECODE 429
|
#define _LOAD_BYTECODE 423
|
||||||
#define _LOAD_COMMON_CONSTANT LOAD_COMMON_CONSTANT
|
#define _LOAD_COMMON_CONSTANT LOAD_COMMON_CONSTANT
|
||||||
#define _LOAD_CONST LOAD_CONST
|
#define _LOAD_CONST LOAD_CONST
|
||||||
#define _LOAD_CONST_IMMORTAL LOAD_CONST_IMMORTAL
|
#define _LOAD_CONST_IMMORTAL LOAD_CONST_IMMORTAL
|
||||||
#define _LOAD_CONST_INLINE 430
|
#define _LOAD_CONST_INLINE 424
|
||||||
#define _LOAD_CONST_INLINE_BORROW 431
|
#define _LOAD_CONST_INLINE_BORROW 425
|
||||||
#define _LOAD_CONST_INLINE_BORROW_WITH_NULL 432
|
|
||||||
#define _LOAD_CONST_INLINE_WITH_NULL 433
|
|
||||||
#define _LOAD_CONST_MORTAL LOAD_CONST_MORTAL
|
#define _LOAD_CONST_MORTAL LOAD_CONST_MORTAL
|
||||||
#define _LOAD_DEREF LOAD_DEREF
|
#define _LOAD_DEREF LOAD_DEREF
|
||||||
#define _LOAD_FAST 434
|
#define _LOAD_FAST 426
|
||||||
#define _LOAD_FAST_0 435
|
#define _LOAD_FAST_0 427
|
||||||
#define _LOAD_FAST_1 436
|
#define _LOAD_FAST_1 428
|
||||||
#define _LOAD_FAST_2 437
|
#define _LOAD_FAST_2 429
|
||||||
#define _LOAD_FAST_3 438
|
#define _LOAD_FAST_3 430
|
||||||
#define _LOAD_FAST_4 439
|
#define _LOAD_FAST_4 431
|
||||||
#define _LOAD_FAST_5 440
|
#define _LOAD_FAST_5 432
|
||||||
#define _LOAD_FAST_6 441
|
#define _LOAD_FAST_6 433
|
||||||
#define _LOAD_FAST_7 442
|
#define _LOAD_FAST_7 434
|
||||||
#define _LOAD_FAST_AND_CLEAR LOAD_FAST_AND_CLEAR
|
#define _LOAD_FAST_AND_CLEAR LOAD_FAST_AND_CLEAR
|
||||||
#define _LOAD_FAST_CHECK LOAD_FAST_CHECK
|
#define _LOAD_FAST_CHECK LOAD_FAST_CHECK
|
||||||
#define _LOAD_FAST_LOAD_FAST LOAD_FAST_LOAD_FAST
|
#define _LOAD_FAST_LOAD_FAST LOAD_FAST_LOAD_FAST
|
||||||
#define _LOAD_FROM_DICT_OR_DEREF LOAD_FROM_DICT_OR_DEREF
|
#define _LOAD_FROM_DICT_OR_DEREF LOAD_FROM_DICT_OR_DEREF
|
||||||
#define _LOAD_FROM_DICT_OR_GLOBALS LOAD_FROM_DICT_OR_GLOBALS
|
#define _LOAD_FROM_DICT_OR_GLOBALS LOAD_FROM_DICT_OR_GLOBALS
|
||||||
#define _LOAD_GLOBAL 443
|
#define _LOAD_GLOBAL 435
|
||||||
#define _LOAD_GLOBAL_BUILTINS 444
|
#define _LOAD_GLOBAL_BUILTINS 436
|
||||||
#define _LOAD_GLOBAL_BUILTINS_FROM_KEYS 445
|
#define _LOAD_GLOBAL_BUILTINS_FROM_KEYS 437
|
||||||
#define _LOAD_GLOBAL_MODULE 446
|
#define _LOAD_GLOBAL_MODULE 438
|
||||||
#define _LOAD_GLOBAL_MODULE_FROM_KEYS 447
|
#define _LOAD_GLOBAL_MODULE_FROM_KEYS 439
|
||||||
#define _LOAD_LOCALS LOAD_LOCALS
|
#define _LOAD_LOCALS LOAD_LOCALS
|
||||||
#define _LOAD_NAME LOAD_NAME
|
#define _LOAD_NAME LOAD_NAME
|
||||||
#define _LOAD_SMALL_INT 448
|
#define _LOAD_SMALL_INT 440
|
||||||
#define _LOAD_SMALL_INT_0 449
|
#define _LOAD_SMALL_INT_0 441
|
||||||
#define _LOAD_SMALL_INT_1 450
|
#define _LOAD_SMALL_INT_1 442
|
||||||
#define _LOAD_SMALL_INT_2 451
|
#define _LOAD_SMALL_INT_2 443
|
||||||
#define _LOAD_SMALL_INT_3 452
|
#define _LOAD_SMALL_INT_3 444
|
||||||
#define _LOAD_SPECIAL LOAD_SPECIAL
|
#define _LOAD_SPECIAL LOAD_SPECIAL
|
||||||
#define _LOAD_SUPER_ATTR_ATTR LOAD_SUPER_ATTR_ATTR
|
#define _LOAD_SUPER_ATTR_ATTR LOAD_SUPER_ATTR_ATTR
|
||||||
#define _LOAD_SUPER_ATTR_METHOD LOAD_SUPER_ATTR_METHOD
|
#define _LOAD_SUPER_ATTR_METHOD LOAD_SUPER_ATTR_METHOD
|
||||||
#define _MAKE_CALLARGS_A_TUPLE 453
|
#define _MAKE_CALLARGS_A_TUPLE 445
|
||||||
#define _MAKE_CELL MAKE_CELL
|
#define _MAKE_CELL MAKE_CELL
|
||||||
#define _MAKE_FUNCTION MAKE_FUNCTION
|
#define _MAKE_FUNCTION MAKE_FUNCTION
|
||||||
#define _MAKE_WARM 454
|
#define _MAKE_WARM 446
|
||||||
#define _MAP_ADD MAP_ADD
|
#define _MAP_ADD MAP_ADD
|
||||||
#define _MATCH_CLASS MATCH_CLASS
|
#define _MATCH_CLASS MATCH_CLASS
|
||||||
#define _MATCH_KEYS MATCH_KEYS
|
#define _MATCH_KEYS MATCH_KEYS
|
||||||
#define _MATCH_MAPPING MATCH_MAPPING
|
#define _MATCH_MAPPING MATCH_MAPPING
|
||||||
#define _MATCH_SEQUENCE MATCH_SEQUENCE
|
#define _MATCH_SEQUENCE MATCH_SEQUENCE
|
||||||
#define _MAYBE_EXPAND_METHOD 455
|
#define _MAYBE_EXPAND_METHOD 447
|
||||||
#define _MAYBE_EXPAND_METHOD_KW 456
|
#define _MAYBE_EXPAND_METHOD_KW 448
|
||||||
#define _MONITOR_CALL 457
|
#define _MONITOR_CALL 449
|
||||||
#define _MONITOR_JUMP_BACKWARD 458
|
#define _MONITOR_JUMP_BACKWARD 450
|
||||||
#define _MONITOR_RESUME 459
|
#define _MONITOR_RESUME 451
|
||||||
#define _NOP NOP
|
#define _NOP NOP
|
||||||
#define _POP_EXCEPT POP_EXCEPT
|
#define _POP_EXCEPT POP_EXCEPT
|
||||||
#define _POP_JUMP_IF_FALSE 460
|
#define _POP_JUMP_IF_FALSE 452
|
||||||
#define _POP_JUMP_IF_TRUE 461
|
#define _POP_JUMP_IF_TRUE 453
|
||||||
#define _POP_TOP POP_TOP
|
#define _POP_TOP POP_TOP
|
||||||
#define _POP_TOP_LOAD_CONST_INLINE_BORROW 462
|
#define _POP_TOP_LOAD_CONST_INLINE_BORROW 454
|
||||||
#define _PUSH_EXC_INFO PUSH_EXC_INFO
|
#define _PUSH_EXC_INFO PUSH_EXC_INFO
|
||||||
#define _PUSH_FRAME 463
|
#define _PUSH_FRAME 455
|
||||||
#define _PUSH_NULL PUSH_NULL
|
#define _PUSH_NULL PUSH_NULL
|
||||||
#define _PY_FRAME_GENERAL 464
|
#define _PUSH_NULL_CONDITIONAL 456
|
||||||
#define _PY_FRAME_KW 465
|
#define _PY_FRAME_GENERAL 457
|
||||||
#define _QUICKEN_RESUME 466
|
#define _PY_FRAME_KW 458
|
||||||
#define _REPLACE_WITH_TRUE 467
|
#define _QUICKEN_RESUME 459
|
||||||
|
#define _REPLACE_WITH_TRUE 460
|
||||||
#define _RESUME_CHECK RESUME_CHECK
|
#define _RESUME_CHECK RESUME_CHECK
|
||||||
#define _RETURN_GENERATOR RETURN_GENERATOR
|
#define _RETURN_GENERATOR RETURN_GENERATOR
|
||||||
#define _RETURN_VALUE RETURN_VALUE
|
#define _RETURN_VALUE RETURN_VALUE
|
||||||
#define _SAVE_RETURN_OFFSET 468
|
#define _SAVE_RETURN_OFFSET 461
|
||||||
#define _SEND 469
|
#define _SEND 462
|
||||||
#define _SEND_GEN_FRAME 470
|
#define _SEND_GEN_FRAME 463
|
||||||
#define _SETUP_ANNOTATIONS SETUP_ANNOTATIONS
|
#define _SETUP_ANNOTATIONS SETUP_ANNOTATIONS
|
||||||
#define _SET_ADD SET_ADD
|
#define _SET_ADD SET_ADD
|
||||||
#define _SET_FUNCTION_ATTRIBUTE SET_FUNCTION_ATTRIBUTE
|
#define _SET_FUNCTION_ATTRIBUTE SET_FUNCTION_ATTRIBUTE
|
||||||
#define _SET_UPDATE SET_UPDATE
|
#define _SET_UPDATE SET_UPDATE
|
||||||
#define _START_EXECUTOR 471
|
#define _START_EXECUTOR 464
|
||||||
#define _STORE_ATTR 472
|
#define _STORE_ATTR 465
|
||||||
#define _STORE_ATTR_INSTANCE_VALUE 473
|
#define _STORE_ATTR_INSTANCE_VALUE 466
|
||||||
#define _STORE_ATTR_SLOT 474
|
#define _STORE_ATTR_SLOT 467
|
||||||
#define _STORE_ATTR_WITH_HINT 475
|
#define _STORE_ATTR_WITH_HINT 468
|
||||||
#define _STORE_DEREF STORE_DEREF
|
#define _STORE_DEREF STORE_DEREF
|
||||||
#define _STORE_FAST 476
|
#define _STORE_FAST 469
|
||||||
#define _STORE_FAST_0 477
|
#define _STORE_FAST_0 470
|
||||||
#define _STORE_FAST_1 478
|
#define _STORE_FAST_1 471
|
||||||
#define _STORE_FAST_2 479
|
#define _STORE_FAST_2 472
|
||||||
#define _STORE_FAST_3 480
|
#define _STORE_FAST_3 473
|
||||||
#define _STORE_FAST_4 481
|
#define _STORE_FAST_4 474
|
||||||
#define _STORE_FAST_5 482
|
#define _STORE_FAST_5 475
|
||||||
#define _STORE_FAST_6 483
|
#define _STORE_FAST_6 476
|
||||||
#define _STORE_FAST_7 484
|
#define _STORE_FAST_7 477
|
||||||
#define _STORE_FAST_LOAD_FAST STORE_FAST_LOAD_FAST
|
#define _STORE_FAST_LOAD_FAST STORE_FAST_LOAD_FAST
|
||||||
#define _STORE_FAST_STORE_FAST STORE_FAST_STORE_FAST
|
#define _STORE_FAST_STORE_FAST STORE_FAST_STORE_FAST
|
||||||
#define _STORE_GLOBAL STORE_GLOBAL
|
#define _STORE_GLOBAL STORE_GLOBAL
|
||||||
#define _STORE_NAME STORE_NAME
|
#define _STORE_NAME STORE_NAME
|
||||||
#define _STORE_SLICE 485
|
#define _STORE_SLICE 478
|
||||||
#define _STORE_SUBSCR 486
|
#define _STORE_SUBSCR 479
|
||||||
#define _STORE_SUBSCR_DICT STORE_SUBSCR_DICT
|
#define _STORE_SUBSCR_DICT STORE_SUBSCR_DICT
|
||||||
#define _STORE_SUBSCR_LIST_INT STORE_SUBSCR_LIST_INT
|
#define _STORE_SUBSCR_LIST_INT STORE_SUBSCR_LIST_INT
|
||||||
#define _SWAP SWAP
|
#define _SWAP SWAP
|
||||||
#define _TIER2_RESUME_CHECK 487
|
#define _TIER2_RESUME_CHECK 480
|
||||||
#define _TO_BOOL 488
|
#define _TO_BOOL 481
|
||||||
#define _TO_BOOL_BOOL TO_BOOL_BOOL
|
#define _TO_BOOL_BOOL TO_BOOL_BOOL
|
||||||
#define _TO_BOOL_INT TO_BOOL_INT
|
#define _TO_BOOL_INT TO_BOOL_INT
|
||||||
#define _TO_BOOL_LIST TO_BOOL_LIST
|
#define _TO_BOOL_LIST TO_BOOL_LIST
|
||||||
|
@ -310,13 +303,13 @@ extern "C" {
|
||||||
#define _UNARY_NEGATIVE UNARY_NEGATIVE
|
#define _UNARY_NEGATIVE UNARY_NEGATIVE
|
||||||
#define _UNARY_NOT UNARY_NOT
|
#define _UNARY_NOT UNARY_NOT
|
||||||
#define _UNPACK_EX UNPACK_EX
|
#define _UNPACK_EX UNPACK_EX
|
||||||
#define _UNPACK_SEQUENCE 489
|
#define _UNPACK_SEQUENCE 482
|
||||||
#define _UNPACK_SEQUENCE_LIST UNPACK_SEQUENCE_LIST
|
#define _UNPACK_SEQUENCE_LIST UNPACK_SEQUENCE_LIST
|
||||||
#define _UNPACK_SEQUENCE_TUPLE UNPACK_SEQUENCE_TUPLE
|
#define _UNPACK_SEQUENCE_TUPLE UNPACK_SEQUENCE_TUPLE
|
||||||
#define _UNPACK_SEQUENCE_TWO_TUPLE UNPACK_SEQUENCE_TWO_TUPLE
|
#define _UNPACK_SEQUENCE_TWO_TUPLE UNPACK_SEQUENCE_TWO_TUPLE
|
||||||
#define _WITH_EXCEPT_START WITH_EXCEPT_START
|
#define _WITH_EXCEPT_START WITH_EXCEPT_START
|
||||||
#define _YIELD_VALUE YIELD_VALUE
|
#define _YIELD_VALUE YIELD_VALUE
|
||||||
#define MAX_UOP_ID 489
|
#define MAX_UOP_ID 482
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
60
Include/internal/pycore_uop_metadata.h
generated
60
Include/internal/pycore_uop_metadata.h
generated
|
@ -124,11 +124,12 @@ const uint16_t _PyUop_Flags[MAX_UOP_ID+1] = {
|
||||||
[_LOAD_LOCALS] = HAS_ERROR_FLAG | HAS_ESCAPES_FLAG,
|
[_LOAD_LOCALS] = HAS_ERROR_FLAG | HAS_ESCAPES_FLAG,
|
||||||
[_LOAD_NAME] = HAS_ARG_FLAG | HAS_NAME_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG,
|
[_LOAD_NAME] = HAS_ARG_FLAG | HAS_NAME_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG,
|
||||||
[_LOAD_GLOBAL] = HAS_ARG_FLAG | HAS_NAME_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG,
|
[_LOAD_GLOBAL] = HAS_ARG_FLAG | HAS_NAME_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG,
|
||||||
|
[_PUSH_NULL_CONDITIONAL] = HAS_ARG_FLAG,
|
||||||
[_GUARD_GLOBALS_VERSION] = HAS_DEOPT_FLAG,
|
[_GUARD_GLOBALS_VERSION] = HAS_DEOPT_FLAG,
|
||||||
[_GUARD_GLOBALS_VERSION_PUSH_KEYS] = HAS_DEOPT_FLAG,
|
[_GUARD_GLOBALS_VERSION_PUSH_KEYS] = HAS_DEOPT_FLAG,
|
||||||
[_GUARD_BUILTINS_VERSION_PUSH_KEYS] = HAS_DEOPT_FLAG,
|
[_GUARD_BUILTINS_VERSION_PUSH_KEYS] = HAS_DEOPT_FLAG,
|
||||||
[_LOAD_GLOBAL_MODULE_FROM_KEYS] = HAS_ARG_FLAG | HAS_DEOPT_FLAG,
|
[_LOAD_GLOBAL_MODULE_FROM_KEYS] = HAS_DEOPT_FLAG,
|
||||||
[_LOAD_GLOBAL_BUILTINS_FROM_KEYS] = HAS_ARG_FLAG | HAS_DEOPT_FLAG,
|
[_LOAD_GLOBAL_BUILTINS_FROM_KEYS] = HAS_DEOPT_FLAG,
|
||||||
[_DELETE_FAST] = HAS_ARG_FLAG | HAS_LOCAL_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG,
|
[_DELETE_FAST] = HAS_ARG_FLAG | HAS_LOCAL_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG,
|
||||||
[_MAKE_CELL] = HAS_ARG_FLAG | HAS_FREE_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG,
|
[_MAKE_CELL] = HAS_ARG_FLAG | HAS_FREE_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG,
|
||||||
[_DELETE_DEREF] = HAS_ARG_FLAG | HAS_FREE_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG,
|
[_DELETE_DEREF] = HAS_ARG_FLAG | HAS_FREE_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG,
|
||||||
|
@ -153,20 +154,14 @@ const uint16_t _PyUop_Flags[MAX_UOP_ID+1] = {
|
||||||
[_GUARD_TYPE_VERSION] = HAS_EXIT_FLAG,
|
[_GUARD_TYPE_VERSION] = HAS_EXIT_FLAG,
|
||||||
[_GUARD_TYPE_VERSION_AND_LOCK] = HAS_EXIT_FLAG,
|
[_GUARD_TYPE_VERSION_AND_LOCK] = HAS_EXIT_FLAG,
|
||||||
[_CHECK_MANAGED_OBJECT_HAS_VALUES] = HAS_DEOPT_FLAG,
|
[_CHECK_MANAGED_OBJECT_HAS_VALUES] = HAS_DEOPT_FLAG,
|
||||||
[_LOAD_ATTR_INSTANCE_VALUE_0] = HAS_DEOPT_FLAG,
|
[_LOAD_ATTR_INSTANCE_VALUE] = HAS_DEOPT_FLAG,
|
||||||
[_LOAD_ATTR_INSTANCE_VALUE_1] = HAS_DEOPT_FLAG,
|
|
||||||
[_LOAD_ATTR_INSTANCE_VALUE] = HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_OPARG_AND_1_FLAG,
|
|
||||||
[_CHECK_ATTR_MODULE_PUSH_KEYS] = HAS_DEOPT_FLAG,
|
[_CHECK_ATTR_MODULE_PUSH_KEYS] = HAS_DEOPT_FLAG,
|
||||||
[_LOAD_ATTR_MODULE_FROM_KEYS] = HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_ESCAPES_FLAG,
|
[_LOAD_ATTR_MODULE_FROM_KEYS] = HAS_DEOPT_FLAG | HAS_ESCAPES_FLAG,
|
||||||
[_CHECK_ATTR_WITH_HINT] = HAS_EXIT_FLAG,
|
[_CHECK_ATTR_WITH_HINT] = HAS_EXIT_FLAG,
|
||||||
[_LOAD_ATTR_WITH_HINT] = HAS_ARG_FLAG | HAS_NAME_FLAG | HAS_DEOPT_FLAG,
|
[_LOAD_ATTR_WITH_HINT] = HAS_ARG_FLAG | HAS_NAME_FLAG | HAS_DEOPT_FLAG,
|
||||||
[_LOAD_ATTR_SLOT_0] = HAS_DEOPT_FLAG,
|
[_LOAD_ATTR_SLOT] = HAS_DEOPT_FLAG,
|
||||||
[_LOAD_ATTR_SLOT_1] = HAS_DEOPT_FLAG,
|
|
||||||
[_LOAD_ATTR_SLOT] = HAS_ARG_FLAG | HAS_DEOPT_FLAG | HAS_OPARG_AND_1_FLAG,
|
|
||||||
[_CHECK_ATTR_CLASS] = HAS_EXIT_FLAG,
|
[_CHECK_ATTR_CLASS] = HAS_EXIT_FLAG,
|
||||||
[_LOAD_ATTR_CLASS_0] = 0,
|
[_LOAD_ATTR_CLASS] = 0,
|
||||||
[_LOAD_ATTR_CLASS_1] = 0,
|
|
||||||
[_LOAD_ATTR_CLASS] = HAS_ARG_FLAG | HAS_OPARG_AND_1_FLAG,
|
|
||||||
[_LOAD_ATTR_PROPERTY_FRAME] = HAS_ARG_FLAG | HAS_DEOPT_FLAG,
|
[_LOAD_ATTR_PROPERTY_FRAME] = HAS_ARG_FLAG | HAS_DEOPT_FLAG,
|
||||||
[_GUARD_DORV_NO_DICT] = HAS_EXIT_FLAG,
|
[_GUARD_DORV_NO_DICT] = HAS_EXIT_FLAG,
|
||||||
[_STORE_ATTR_INSTANCE_VALUE] = HAS_ESCAPES_FLAG,
|
[_STORE_ATTR_INSTANCE_VALUE] = HAS_ESCAPES_FLAG,
|
||||||
|
@ -258,7 +253,7 @@ const uint16_t _PyUop_Flags[MAX_UOP_ID+1] = {
|
||||||
[_EXPAND_METHOD_KW] = HAS_ARG_FLAG | HAS_ESCAPES_FLAG,
|
[_EXPAND_METHOD_KW] = HAS_ARG_FLAG | HAS_ESCAPES_FLAG,
|
||||||
[_CHECK_IS_NOT_PY_CALLABLE_KW] = HAS_ARG_FLAG | HAS_EXIT_FLAG,
|
[_CHECK_IS_NOT_PY_CALLABLE_KW] = HAS_ARG_FLAG | HAS_EXIT_FLAG,
|
||||||
[_CALL_KW_NON_PY] = HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG,
|
[_CALL_KW_NON_PY] = HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG,
|
||||||
[_MAKE_CALLARGS_A_TUPLE] = HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG,
|
[_MAKE_CALLARGS_A_TUPLE] = HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG,
|
||||||
[_MAKE_FUNCTION] = HAS_ERROR_FLAG | HAS_ESCAPES_FLAG,
|
[_MAKE_FUNCTION] = HAS_ERROR_FLAG | HAS_ESCAPES_FLAG,
|
||||||
[_SET_FUNCTION_ATTRIBUTE] = HAS_ARG_FLAG,
|
[_SET_FUNCTION_ATTRIBUTE] = HAS_ARG_FLAG,
|
||||||
[_RETURN_GENERATOR] = HAS_ERROR_FLAG | HAS_ESCAPES_FLAG,
|
[_RETURN_GENERATOR] = HAS_ERROR_FLAG | HAS_ESCAPES_FLAG,
|
||||||
|
@ -282,12 +277,10 @@ const uint16_t _PyUop_Flags[MAX_UOP_ID+1] = {
|
||||||
[_LOAD_CONST_INLINE] = HAS_PURE_FLAG,
|
[_LOAD_CONST_INLINE] = HAS_PURE_FLAG,
|
||||||
[_LOAD_CONST_INLINE_BORROW] = HAS_PURE_FLAG,
|
[_LOAD_CONST_INLINE_BORROW] = HAS_PURE_FLAG,
|
||||||
[_POP_TOP_LOAD_CONST_INLINE_BORROW] = HAS_ESCAPES_FLAG | HAS_PURE_FLAG,
|
[_POP_TOP_LOAD_CONST_INLINE_BORROW] = HAS_ESCAPES_FLAG | HAS_PURE_FLAG,
|
||||||
[_LOAD_CONST_INLINE_WITH_NULL] = HAS_PURE_FLAG,
|
|
||||||
[_LOAD_CONST_INLINE_BORROW_WITH_NULL] = HAS_PURE_FLAG,
|
|
||||||
[_CHECK_FUNCTION] = HAS_DEOPT_FLAG,
|
[_CHECK_FUNCTION] = HAS_DEOPT_FLAG,
|
||||||
[_LOAD_GLOBAL_MODULE] = HAS_ARG_FLAG | HAS_DEOPT_FLAG,
|
[_LOAD_GLOBAL_MODULE] = HAS_DEOPT_FLAG,
|
||||||
[_LOAD_GLOBAL_BUILTINS] = HAS_ARG_FLAG | HAS_DEOPT_FLAG,
|
[_LOAD_GLOBAL_BUILTINS] = HAS_DEOPT_FLAG,
|
||||||
[_LOAD_ATTR_MODULE] = HAS_ARG_FLAG | HAS_DEOPT_FLAG,
|
[_LOAD_ATTR_MODULE] = HAS_DEOPT_FLAG,
|
||||||
[_DYNAMIC_EXIT] = HAS_ESCAPES_FLAG,
|
[_DYNAMIC_EXIT] = HAS_ESCAPES_FLAG,
|
||||||
[_START_EXECUTOR] = HAS_ESCAPES_FLAG,
|
[_START_EXECUTOR] = HAS_ESCAPES_FLAG,
|
||||||
[_MAKE_WARM] = 0,
|
[_MAKE_WARM] = 0,
|
||||||
|
@ -457,11 +450,7 @@ const char *const _PyOpcode_uop_name[MAX_UOP_ID+1] = {
|
||||||
[_LIST_EXTEND] = "_LIST_EXTEND",
|
[_LIST_EXTEND] = "_LIST_EXTEND",
|
||||||
[_LOAD_ATTR] = "_LOAD_ATTR",
|
[_LOAD_ATTR] = "_LOAD_ATTR",
|
||||||
[_LOAD_ATTR_CLASS] = "_LOAD_ATTR_CLASS",
|
[_LOAD_ATTR_CLASS] = "_LOAD_ATTR_CLASS",
|
||||||
[_LOAD_ATTR_CLASS_0] = "_LOAD_ATTR_CLASS_0",
|
|
||||||
[_LOAD_ATTR_CLASS_1] = "_LOAD_ATTR_CLASS_1",
|
|
||||||
[_LOAD_ATTR_INSTANCE_VALUE] = "_LOAD_ATTR_INSTANCE_VALUE",
|
[_LOAD_ATTR_INSTANCE_VALUE] = "_LOAD_ATTR_INSTANCE_VALUE",
|
||||||
[_LOAD_ATTR_INSTANCE_VALUE_0] = "_LOAD_ATTR_INSTANCE_VALUE_0",
|
|
||||||
[_LOAD_ATTR_INSTANCE_VALUE_1] = "_LOAD_ATTR_INSTANCE_VALUE_1",
|
|
||||||
[_LOAD_ATTR_METHOD_LAZY_DICT] = "_LOAD_ATTR_METHOD_LAZY_DICT",
|
[_LOAD_ATTR_METHOD_LAZY_DICT] = "_LOAD_ATTR_METHOD_LAZY_DICT",
|
||||||
[_LOAD_ATTR_METHOD_NO_DICT] = "_LOAD_ATTR_METHOD_NO_DICT",
|
[_LOAD_ATTR_METHOD_NO_DICT] = "_LOAD_ATTR_METHOD_NO_DICT",
|
||||||
[_LOAD_ATTR_METHOD_WITH_VALUES] = "_LOAD_ATTR_METHOD_WITH_VALUES",
|
[_LOAD_ATTR_METHOD_WITH_VALUES] = "_LOAD_ATTR_METHOD_WITH_VALUES",
|
||||||
|
@ -471,16 +460,12 @@ const char *const _PyOpcode_uop_name[MAX_UOP_ID+1] = {
|
||||||
[_LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES] = "_LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES",
|
[_LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES] = "_LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES",
|
||||||
[_LOAD_ATTR_PROPERTY_FRAME] = "_LOAD_ATTR_PROPERTY_FRAME",
|
[_LOAD_ATTR_PROPERTY_FRAME] = "_LOAD_ATTR_PROPERTY_FRAME",
|
||||||
[_LOAD_ATTR_SLOT] = "_LOAD_ATTR_SLOT",
|
[_LOAD_ATTR_SLOT] = "_LOAD_ATTR_SLOT",
|
||||||
[_LOAD_ATTR_SLOT_0] = "_LOAD_ATTR_SLOT_0",
|
|
||||||
[_LOAD_ATTR_SLOT_1] = "_LOAD_ATTR_SLOT_1",
|
|
||||||
[_LOAD_ATTR_WITH_HINT] = "_LOAD_ATTR_WITH_HINT",
|
[_LOAD_ATTR_WITH_HINT] = "_LOAD_ATTR_WITH_HINT",
|
||||||
[_LOAD_BUILD_CLASS] = "_LOAD_BUILD_CLASS",
|
[_LOAD_BUILD_CLASS] = "_LOAD_BUILD_CLASS",
|
||||||
[_LOAD_COMMON_CONSTANT] = "_LOAD_COMMON_CONSTANT",
|
[_LOAD_COMMON_CONSTANT] = "_LOAD_COMMON_CONSTANT",
|
||||||
[_LOAD_CONST_IMMORTAL] = "_LOAD_CONST_IMMORTAL",
|
[_LOAD_CONST_IMMORTAL] = "_LOAD_CONST_IMMORTAL",
|
||||||
[_LOAD_CONST_INLINE] = "_LOAD_CONST_INLINE",
|
[_LOAD_CONST_INLINE] = "_LOAD_CONST_INLINE",
|
||||||
[_LOAD_CONST_INLINE_BORROW] = "_LOAD_CONST_INLINE_BORROW",
|
[_LOAD_CONST_INLINE_BORROW] = "_LOAD_CONST_INLINE_BORROW",
|
||||||
[_LOAD_CONST_INLINE_BORROW_WITH_NULL] = "_LOAD_CONST_INLINE_BORROW_WITH_NULL",
|
|
||||||
[_LOAD_CONST_INLINE_WITH_NULL] = "_LOAD_CONST_INLINE_WITH_NULL",
|
|
||||||
[_LOAD_CONST_MORTAL] = "_LOAD_CONST_MORTAL",
|
[_LOAD_CONST_MORTAL] = "_LOAD_CONST_MORTAL",
|
||||||
[_LOAD_DEREF] = "_LOAD_DEREF",
|
[_LOAD_DEREF] = "_LOAD_DEREF",
|
||||||
[_LOAD_FAST] = "_LOAD_FAST",
|
[_LOAD_FAST] = "_LOAD_FAST",
|
||||||
|
@ -529,6 +514,7 @@ const char *const _PyOpcode_uop_name[MAX_UOP_ID+1] = {
|
||||||
[_PUSH_EXC_INFO] = "_PUSH_EXC_INFO",
|
[_PUSH_EXC_INFO] = "_PUSH_EXC_INFO",
|
||||||
[_PUSH_FRAME] = "_PUSH_FRAME",
|
[_PUSH_FRAME] = "_PUSH_FRAME",
|
||||||
[_PUSH_NULL] = "_PUSH_NULL",
|
[_PUSH_NULL] = "_PUSH_NULL",
|
||||||
|
[_PUSH_NULL_CONDITIONAL] = "_PUSH_NULL_CONDITIONAL",
|
||||||
[_PY_FRAME_GENERAL] = "_PY_FRAME_GENERAL",
|
[_PY_FRAME_GENERAL] = "_PY_FRAME_GENERAL",
|
||||||
[_PY_FRAME_KW] = "_PY_FRAME_KW",
|
[_PY_FRAME_KW] = "_PY_FRAME_KW",
|
||||||
[_REPLACE_WITH_TRUE] = "_REPLACE_WITH_TRUE",
|
[_REPLACE_WITH_TRUE] = "_REPLACE_WITH_TRUE",
|
||||||
|
@ -797,6 +783,8 @@ int _PyUop_num_popped(int opcode, int oparg)
|
||||||
return 0;
|
return 0;
|
||||||
case _LOAD_GLOBAL:
|
case _LOAD_GLOBAL:
|
||||||
return 0;
|
return 0;
|
||||||
|
case _PUSH_NULL_CONDITIONAL:
|
||||||
|
return 0;
|
||||||
case _GUARD_GLOBALS_VERSION:
|
case _GUARD_GLOBALS_VERSION:
|
||||||
return 0;
|
return 0;
|
||||||
case _GUARD_GLOBALS_VERSION_PUSH_KEYS:
|
case _GUARD_GLOBALS_VERSION_PUSH_KEYS:
|
||||||
|
@ -855,10 +843,6 @@ int _PyUop_num_popped(int opcode, int oparg)
|
||||||
return 0;
|
return 0;
|
||||||
case _CHECK_MANAGED_OBJECT_HAS_VALUES:
|
case _CHECK_MANAGED_OBJECT_HAS_VALUES:
|
||||||
return 0;
|
return 0;
|
||||||
case _LOAD_ATTR_INSTANCE_VALUE_0:
|
|
||||||
return 1;
|
|
||||||
case _LOAD_ATTR_INSTANCE_VALUE_1:
|
|
||||||
return 1;
|
|
||||||
case _LOAD_ATTR_INSTANCE_VALUE:
|
case _LOAD_ATTR_INSTANCE_VALUE:
|
||||||
return 1;
|
return 1;
|
||||||
case _CHECK_ATTR_MODULE_PUSH_KEYS:
|
case _CHECK_ATTR_MODULE_PUSH_KEYS:
|
||||||
|
@ -869,18 +853,10 @@ int _PyUop_num_popped(int opcode, int oparg)
|
||||||
return 0;
|
return 0;
|
||||||
case _LOAD_ATTR_WITH_HINT:
|
case _LOAD_ATTR_WITH_HINT:
|
||||||
return 2;
|
return 2;
|
||||||
case _LOAD_ATTR_SLOT_0:
|
|
||||||
return 1;
|
|
||||||
case _LOAD_ATTR_SLOT_1:
|
|
||||||
return 1;
|
|
||||||
case _LOAD_ATTR_SLOT:
|
case _LOAD_ATTR_SLOT:
|
||||||
return 1;
|
return 1;
|
||||||
case _CHECK_ATTR_CLASS:
|
case _CHECK_ATTR_CLASS:
|
||||||
return 0;
|
return 0;
|
||||||
case _LOAD_ATTR_CLASS_0:
|
|
||||||
return 1;
|
|
||||||
case _LOAD_ATTR_CLASS_1:
|
|
||||||
return 1;
|
|
||||||
case _LOAD_ATTR_CLASS:
|
case _LOAD_ATTR_CLASS:
|
||||||
return 1;
|
return 1;
|
||||||
case _LOAD_ATTR_PROPERTY_FRAME:
|
case _LOAD_ATTR_PROPERTY_FRAME:
|
||||||
|
@ -1066,7 +1042,7 @@ int _PyUop_num_popped(int opcode, int oparg)
|
||||||
case _CALL_KW_NON_PY:
|
case _CALL_KW_NON_PY:
|
||||||
return 3 + oparg;
|
return 3 + oparg;
|
||||||
case _MAKE_CALLARGS_A_TUPLE:
|
case _MAKE_CALLARGS_A_TUPLE:
|
||||||
return 1 + (oparg & 1);
|
return 2;
|
||||||
case _MAKE_FUNCTION:
|
case _MAKE_FUNCTION:
|
||||||
return 1;
|
return 1;
|
||||||
case _SET_FUNCTION_ATTRIBUTE:
|
case _SET_FUNCTION_ATTRIBUTE:
|
||||||
|
@ -1074,7 +1050,7 @@ int _PyUop_num_popped(int opcode, int oparg)
|
||||||
case _RETURN_GENERATOR:
|
case _RETURN_GENERATOR:
|
||||||
return 0;
|
return 0;
|
||||||
case _BUILD_SLICE:
|
case _BUILD_SLICE:
|
||||||
return 2 + ((oparg == 3) ? 1 : 0);
|
return oparg;
|
||||||
case _CONVERT_VALUE:
|
case _CONVERT_VALUE:
|
||||||
return 1;
|
return 1;
|
||||||
case _FORMAT_SIMPLE:
|
case _FORMAT_SIMPLE:
|
||||||
|
@ -1113,10 +1089,6 @@ int _PyUop_num_popped(int opcode, int oparg)
|
||||||
return 0;
|
return 0;
|
||||||
case _POP_TOP_LOAD_CONST_INLINE_BORROW:
|
case _POP_TOP_LOAD_CONST_INLINE_BORROW:
|
||||||
return 1;
|
return 1;
|
||||||
case _LOAD_CONST_INLINE_WITH_NULL:
|
|
||||||
return 0;
|
|
||||||
case _LOAD_CONST_INLINE_BORROW_WITH_NULL:
|
|
||||||
return 0;
|
|
||||||
case _CHECK_FUNCTION:
|
case _CHECK_FUNCTION:
|
||||||
return 0;
|
return 0;
|
||||||
case _LOAD_GLOBAL_MODULE:
|
case _LOAD_GLOBAL_MODULE:
|
||||||
|
|
98
Include/opcode_ids.h
generated
98
Include/opcode_ids.h
generated
|
@ -14,55 +14,55 @@ extern "C" {
|
||||||
#define BINARY_SLICE 1
|
#define BINARY_SLICE 1
|
||||||
#define BINARY_SUBSCR 2
|
#define BINARY_SUBSCR 2
|
||||||
#define BINARY_OP_INPLACE_ADD_UNICODE 3
|
#define BINARY_OP_INPLACE_ADD_UNICODE 3
|
||||||
#define CHECK_EG_MATCH 4
|
#define CALL_FUNCTION_EX 4
|
||||||
#define CHECK_EXC_MATCH 5
|
#define CHECK_EG_MATCH 5
|
||||||
#define CLEANUP_THROW 6
|
#define CHECK_EXC_MATCH 6
|
||||||
#define DELETE_SUBSCR 7
|
#define CLEANUP_THROW 7
|
||||||
#define END_ASYNC_FOR 8
|
#define DELETE_SUBSCR 8
|
||||||
#define END_FOR 9
|
#define END_ASYNC_FOR 9
|
||||||
#define END_SEND 10
|
#define END_FOR 10
|
||||||
#define EXIT_INIT_CHECK 11
|
#define END_SEND 11
|
||||||
#define FORMAT_SIMPLE 12
|
#define EXIT_INIT_CHECK 12
|
||||||
#define FORMAT_WITH_SPEC 13
|
#define FORMAT_SIMPLE 13
|
||||||
#define GET_AITER 14
|
#define FORMAT_WITH_SPEC 14
|
||||||
#define GET_ANEXT 15
|
#define GET_AITER 15
|
||||||
#define GET_ITER 16
|
#define GET_ANEXT 16
|
||||||
#define RESERVED 17
|
#define RESERVED 17
|
||||||
#define GET_LEN 18
|
#define GET_ITER 18
|
||||||
#define GET_YIELD_FROM_ITER 19
|
#define GET_LEN 19
|
||||||
#define INTERPRETER_EXIT 20
|
#define GET_YIELD_FROM_ITER 20
|
||||||
#define LOAD_BUILD_CLASS 21
|
#define INTERPRETER_EXIT 21
|
||||||
#define LOAD_LOCALS 22
|
#define LOAD_BUILD_CLASS 22
|
||||||
#define MAKE_FUNCTION 23
|
#define LOAD_LOCALS 23
|
||||||
#define MATCH_KEYS 24
|
#define MAKE_FUNCTION 24
|
||||||
#define MATCH_MAPPING 25
|
#define MATCH_KEYS 25
|
||||||
#define MATCH_SEQUENCE 26
|
#define MATCH_MAPPING 26
|
||||||
#define NOP 27
|
#define MATCH_SEQUENCE 27
|
||||||
#define NOT_TAKEN 28
|
#define NOP 28
|
||||||
#define POP_EXCEPT 29
|
#define NOT_TAKEN 29
|
||||||
#define POP_ITER 30
|
#define POP_EXCEPT 30
|
||||||
#define POP_TOP 31
|
#define POP_ITER 31
|
||||||
#define PUSH_EXC_INFO 32
|
#define POP_TOP 32
|
||||||
#define PUSH_NULL 33
|
#define PUSH_EXC_INFO 33
|
||||||
#define RETURN_GENERATOR 34
|
#define PUSH_NULL 34
|
||||||
#define RETURN_VALUE 35
|
#define RETURN_GENERATOR 35
|
||||||
#define SETUP_ANNOTATIONS 36
|
#define RETURN_VALUE 36
|
||||||
#define STORE_SLICE 37
|
#define SETUP_ANNOTATIONS 37
|
||||||
#define STORE_SUBSCR 38
|
#define STORE_SLICE 38
|
||||||
#define TO_BOOL 39
|
#define STORE_SUBSCR 39
|
||||||
#define UNARY_INVERT 40
|
#define TO_BOOL 40
|
||||||
#define UNARY_NEGATIVE 41
|
#define UNARY_INVERT 41
|
||||||
#define UNARY_NOT 42
|
#define UNARY_NEGATIVE 42
|
||||||
#define WITH_EXCEPT_START 43
|
#define UNARY_NOT 43
|
||||||
#define BINARY_OP 44
|
#define WITH_EXCEPT_START 44
|
||||||
#define BUILD_LIST 45
|
#define BINARY_OP 45
|
||||||
#define BUILD_MAP 46
|
#define BUILD_LIST 46
|
||||||
#define BUILD_SET 47
|
#define BUILD_MAP 47
|
||||||
#define BUILD_SLICE 48
|
#define BUILD_SET 48
|
||||||
#define BUILD_STRING 49
|
#define BUILD_SLICE 49
|
||||||
#define BUILD_TUPLE 50
|
#define BUILD_STRING 50
|
||||||
#define CALL 51
|
#define BUILD_TUPLE 51
|
||||||
#define CALL_FUNCTION_EX 52
|
#define CALL 52
|
||||||
#define CALL_INTRINSIC_1 53
|
#define CALL_INTRINSIC_1 53
|
||||||
#define CALL_INTRINSIC_2 54
|
#define CALL_INTRINSIC_2 54
|
||||||
#define CALL_KW 55
|
#define CALL_KW 55
|
||||||
|
@ -241,7 +241,7 @@ extern "C" {
|
||||||
#define SETUP_WITH 264
|
#define SETUP_WITH 264
|
||||||
#define STORE_FAST_MAYBE_NULL 265
|
#define STORE_FAST_MAYBE_NULL 265
|
||||||
|
|
||||||
#define HAVE_ARGUMENT 43
|
#define HAVE_ARGUMENT 44
|
||||||
#define MIN_SPECIALIZED_OPCODE 150
|
#define MIN_SPECIALIZED_OPCODE 150
|
||||||
#define MIN_INSTRUMENTED_OPCODE 235
|
#define MIN_INSTRUMENTED_OPCODE 235
|
||||||
|
|
||||||
|
|
98
Lib/_opcode_metadata.py
generated
98
Lib/_opcode_metadata.py
generated
|
@ -212,54 +212,54 @@ opmap = {
|
||||||
'ENTER_EXECUTOR': 255,
|
'ENTER_EXECUTOR': 255,
|
||||||
'BINARY_SLICE': 1,
|
'BINARY_SLICE': 1,
|
||||||
'BINARY_SUBSCR': 2,
|
'BINARY_SUBSCR': 2,
|
||||||
'CHECK_EG_MATCH': 4,
|
'CALL_FUNCTION_EX': 4,
|
||||||
'CHECK_EXC_MATCH': 5,
|
'CHECK_EG_MATCH': 5,
|
||||||
'CLEANUP_THROW': 6,
|
'CHECK_EXC_MATCH': 6,
|
||||||
'DELETE_SUBSCR': 7,
|
'CLEANUP_THROW': 7,
|
||||||
'END_ASYNC_FOR': 8,
|
'DELETE_SUBSCR': 8,
|
||||||
'END_FOR': 9,
|
'END_ASYNC_FOR': 9,
|
||||||
'END_SEND': 10,
|
'END_FOR': 10,
|
||||||
'EXIT_INIT_CHECK': 11,
|
'END_SEND': 11,
|
||||||
'FORMAT_SIMPLE': 12,
|
'EXIT_INIT_CHECK': 12,
|
||||||
'FORMAT_WITH_SPEC': 13,
|
'FORMAT_SIMPLE': 13,
|
||||||
'GET_AITER': 14,
|
'FORMAT_WITH_SPEC': 14,
|
||||||
'GET_ANEXT': 15,
|
'GET_AITER': 15,
|
||||||
'GET_ITER': 16,
|
'GET_ANEXT': 16,
|
||||||
'GET_LEN': 18,
|
'GET_ITER': 18,
|
||||||
'GET_YIELD_FROM_ITER': 19,
|
'GET_LEN': 19,
|
||||||
'INTERPRETER_EXIT': 20,
|
'GET_YIELD_FROM_ITER': 20,
|
||||||
'LOAD_BUILD_CLASS': 21,
|
'INTERPRETER_EXIT': 21,
|
||||||
'LOAD_LOCALS': 22,
|
'LOAD_BUILD_CLASS': 22,
|
||||||
'MAKE_FUNCTION': 23,
|
'LOAD_LOCALS': 23,
|
||||||
'MATCH_KEYS': 24,
|
'MAKE_FUNCTION': 24,
|
||||||
'MATCH_MAPPING': 25,
|
'MATCH_KEYS': 25,
|
||||||
'MATCH_SEQUENCE': 26,
|
'MATCH_MAPPING': 26,
|
||||||
'NOP': 27,
|
'MATCH_SEQUENCE': 27,
|
||||||
'NOT_TAKEN': 28,
|
'NOP': 28,
|
||||||
'POP_EXCEPT': 29,
|
'NOT_TAKEN': 29,
|
||||||
'POP_ITER': 30,
|
'POP_EXCEPT': 30,
|
||||||
'POP_TOP': 31,
|
'POP_ITER': 31,
|
||||||
'PUSH_EXC_INFO': 32,
|
'POP_TOP': 32,
|
||||||
'PUSH_NULL': 33,
|
'PUSH_EXC_INFO': 33,
|
||||||
'RETURN_GENERATOR': 34,
|
'PUSH_NULL': 34,
|
||||||
'RETURN_VALUE': 35,
|
'RETURN_GENERATOR': 35,
|
||||||
'SETUP_ANNOTATIONS': 36,
|
'RETURN_VALUE': 36,
|
||||||
'STORE_SLICE': 37,
|
'SETUP_ANNOTATIONS': 37,
|
||||||
'STORE_SUBSCR': 38,
|
'STORE_SLICE': 38,
|
||||||
'TO_BOOL': 39,
|
'STORE_SUBSCR': 39,
|
||||||
'UNARY_INVERT': 40,
|
'TO_BOOL': 40,
|
||||||
'UNARY_NEGATIVE': 41,
|
'UNARY_INVERT': 41,
|
||||||
'UNARY_NOT': 42,
|
'UNARY_NEGATIVE': 42,
|
||||||
'WITH_EXCEPT_START': 43,
|
'UNARY_NOT': 43,
|
||||||
'BINARY_OP': 44,
|
'WITH_EXCEPT_START': 44,
|
||||||
'BUILD_LIST': 45,
|
'BINARY_OP': 45,
|
||||||
'BUILD_MAP': 46,
|
'BUILD_LIST': 46,
|
||||||
'BUILD_SET': 47,
|
'BUILD_MAP': 47,
|
||||||
'BUILD_SLICE': 48,
|
'BUILD_SET': 48,
|
||||||
'BUILD_STRING': 49,
|
'BUILD_SLICE': 49,
|
||||||
'BUILD_TUPLE': 50,
|
'BUILD_STRING': 50,
|
||||||
'CALL': 51,
|
'BUILD_TUPLE': 51,
|
||||||
'CALL_FUNCTION_EX': 52,
|
'CALL': 52,
|
||||||
'CALL_INTRINSIC_1': 53,
|
'CALL_INTRINSIC_1': 53,
|
||||||
'CALL_INTRINSIC_2': 54,
|
'CALL_INTRINSIC_2': 54,
|
||||||
'CALL_KW': 55,
|
'CALL_KW': 55,
|
||||||
|
@ -356,5 +356,5 @@ opmap = {
|
||||||
'STORE_FAST_MAYBE_NULL': 265,
|
'STORE_FAST_MAYBE_NULL': 265,
|
||||||
}
|
}
|
||||||
|
|
||||||
HAVE_ARGUMENT = 43
|
HAVE_ARGUMENT = 44
|
||||||
MIN_INSTRUMENTED_OPCODE = 235
|
MIN_INSTRUMENTED_OPCODE = 235
|
||||||
|
|
|
@ -65,8 +65,7 @@ class OpListTests(unittest.TestCase):
|
||||||
class StackEffectTests(unittest.TestCase):
|
class StackEffectTests(unittest.TestCase):
|
||||||
def test_stack_effect(self):
|
def test_stack_effect(self):
|
||||||
self.assertEqual(stack_effect(dis.opmap['POP_TOP']), -1)
|
self.assertEqual(stack_effect(dis.opmap['POP_TOP']), -1)
|
||||||
self.assertEqual(stack_effect(dis.opmap['BUILD_SLICE'], 0), -1)
|
self.assertEqual(stack_effect(dis.opmap['BUILD_SLICE'], 2), -1)
|
||||||
self.assertEqual(stack_effect(dis.opmap['BUILD_SLICE'], 1), -1)
|
|
||||||
self.assertEqual(stack_effect(dis.opmap['BUILD_SLICE'], 3), -2)
|
self.assertEqual(stack_effect(dis.opmap['BUILD_SLICE'], 3), -2)
|
||||||
self.assertRaises(ValueError, stack_effect, 30000)
|
self.assertRaises(ValueError, stack_effect, 30000)
|
||||||
# All defined opcodes
|
# All defined opcodes
|
||||||
|
|
|
@ -711,7 +711,7 @@ class TestUopsOptimization(unittest.TestCase):
|
||||||
assert ex is not None
|
assert ex is not None
|
||||||
uops = get_opnames(ex)
|
uops = get_opnames(ex)
|
||||||
assert "_LOAD_GLOBAL_BUILTINS" not in uops
|
assert "_LOAD_GLOBAL_BUILTINS" not in uops
|
||||||
assert "_LOAD_CONST_INLINE_BORROW_WITH_NULL" in uops
|
assert "_LOAD_CONST_INLINE_BORROW" in uops
|
||||||
"""))
|
"""))
|
||||||
self.assertEqual(result[0].rc, 0, result)
|
self.assertEqual(result[0].rc, 0, result)
|
||||||
|
|
||||||
|
|
|
@ -1711,9 +1711,9 @@ expected_opinfo_outer = [
|
||||||
Instruction(opname='LOAD_CONST', opcode=81, arg=3, argval=(3, 4), argrepr='(3, 4)', offset=6, start_offset=6, starts_line=True, line_number=2, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_CONST', opcode=81, arg=3, argval=(3, 4), argrepr='(3, 4)', offset=6, start_offset=6, starts_line=True, line_number=2, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_FAST', opcode=83, arg=0, argval='a', argrepr='a', offset=8, start_offset=8, starts_line=False, line_number=2, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_FAST', opcode=83, arg=0, argval='a', argrepr='a', offset=8, start_offset=8, starts_line=False, line_number=2, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_FAST', opcode=83, arg=1, argval='b', argrepr='b', offset=10, start_offset=10, starts_line=False, line_number=2, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_FAST', opcode=83, arg=1, argval='b', argrepr='b', offset=10, start_offset=10, starts_line=False, line_number=2, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='BUILD_TUPLE', opcode=50, arg=2, argval=2, argrepr='', offset=12, start_offset=12, starts_line=False, line_number=2, label=None, positions=None, cache_info=None),
|
Instruction(opname='BUILD_TUPLE', opcode=51, arg=2, argval=2, argrepr='', offset=12, start_offset=12, starts_line=False, line_number=2, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_CONST', opcode=81, arg=0, argval=code_object_f, argrepr=repr(code_object_f), offset=14, start_offset=14, starts_line=False, line_number=2, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_CONST', opcode=81, arg=0, argval=code_object_f, argrepr=repr(code_object_f), offset=14, start_offset=14, starts_line=False, line_number=2, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='MAKE_FUNCTION', opcode=23, arg=None, argval=None, argrepr='', offset=16, start_offset=16, starts_line=False, line_number=2, label=None, positions=None, cache_info=None),
|
Instruction(opname='MAKE_FUNCTION', opcode=24, arg=None, argval=None, argrepr='', offset=16, start_offset=16, starts_line=False, line_number=2, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='SET_FUNCTION_ATTRIBUTE', opcode=105, arg=8, argval=8, argrepr='closure', offset=18, start_offset=18, starts_line=False, line_number=2, label=None, positions=None, cache_info=None),
|
Instruction(opname='SET_FUNCTION_ATTRIBUTE', opcode=105, arg=8, argval=8, argrepr='closure', offset=18, start_offset=18, starts_line=False, line_number=2, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='SET_FUNCTION_ATTRIBUTE', opcode=105, arg=1, argval=1, argrepr='defaults', offset=20, start_offset=20, starts_line=False, line_number=2, label=None, positions=None, cache_info=None),
|
Instruction(opname='SET_FUNCTION_ATTRIBUTE', opcode=105, arg=1, argval=1, argrepr='defaults', offset=20, start_offset=20, starts_line=False, line_number=2, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='STORE_FAST', opcode=109, arg=2, argval='f', argrepr='f', offset=22, start_offset=22, starts_line=False, line_number=2, label=None, positions=None, cache_info=None),
|
Instruction(opname='STORE_FAST', opcode=109, arg=2, argval='f', argrepr='f', offset=22, start_offset=22, starts_line=False, line_number=2, label=None, positions=None, cache_info=None),
|
||||||
|
@ -1722,13 +1722,13 @@ expected_opinfo_outer = [
|
||||||
Instruction(opname='LOAD_DEREF', opcode=82, arg=1, argval='b', argrepr='b', offset=36, start_offset=36, starts_line=False, line_number=7, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_DEREF', opcode=82, arg=1, argval='b', argrepr='b', offset=36, start_offset=36, starts_line=False, line_number=7, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_CONST', opcode=81, arg=1, argval='', argrepr="''", offset=38, start_offset=38, starts_line=False, line_number=7, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_CONST', opcode=81, arg=1, argval='', argrepr="''", offset=38, start_offset=38, starts_line=False, line_number=7, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_SMALL_INT', opcode=91, arg=1, argval=1, argrepr='', offset=40, start_offset=40, starts_line=False, line_number=7, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_SMALL_INT', opcode=91, arg=1, argval=1, argrepr='', offset=40, start_offset=40, starts_line=False, line_number=7, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='BUILD_LIST', opcode=45, arg=0, argval=0, argrepr='', offset=42, start_offset=42, starts_line=False, line_number=7, label=None, positions=None, cache_info=None),
|
Instruction(opname='BUILD_LIST', opcode=46, arg=0, argval=0, argrepr='', offset=42, start_offset=42, starts_line=False, line_number=7, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='BUILD_MAP', opcode=46, arg=0, argval=0, argrepr='', offset=44, start_offset=44, starts_line=False, line_number=7, label=None, positions=None, cache_info=None),
|
Instruction(opname='BUILD_MAP', opcode=47, arg=0, argval=0, argrepr='', offset=44, start_offset=44, starts_line=False, line_number=7, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_CONST', opcode=81, arg=2, argval='Hello world!', argrepr="'Hello world!'", offset=46, start_offset=46, starts_line=False, line_number=7, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_CONST', opcode=81, arg=2, argval='Hello world!', argrepr="'Hello world!'", offset=46, start_offset=46, starts_line=False, line_number=7, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='CALL', opcode=51, arg=7, argval=7, argrepr='', offset=48, start_offset=48, starts_line=False, line_number=7, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
Instruction(opname='CALL', opcode=52, arg=7, argval=7, argrepr='', offset=48, start_offset=48, starts_line=False, line_number=7, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
||||||
Instruction(opname='POP_TOP', opcode=31, arg=None, argval=None, argrepr='', offset=56, start_offset=56, starts_line=False, line_number=7, label=None, positions=None, cache_info=None),
|
Instruction(opname='POP_TOP', opcode=32, arg=None, argval=None, argrepr='', offset=56, start_offset=56, starts_line=False, line_number=7, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_FAST', opcode=83, arg=2, argval='f', argrepr='f', offset=58, start_offset=58, starts_line=True, line_number=8, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_FAST', opcode=83, arg=2, argval='f', argrepr='f', offset=58, start_offset=58, starts_line=True, line_number=8, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='RETURN_VALUE', opcode=35, arg=None, argval=None, argrepr='', offset=60, start_offset=60, starts_line=False, line_number=8, label=None, positions=None, cache_info=None),
|
Instruction(opname='RETURN_VALUE', opcode=36, arg=None, argval=None, argrepr='', offset=60, start_offset=60, starts_line=False, line_number=8, label=None, positions=None, cache_info=None),
|
||||||
]
|
]
|
||||||
|
|
||||||
expected_opinfo_f = [
|
expected_opinfo_f = [
|
||||||
|
@ -1741,9 +1741,9 @@ expected_opinfo_f = [
|
||||||
Instruction(opname='LOAD_FAST', opcode=83, arg=4, argval='b', argrepr='b', offset=12, start_offset=12, starts_line=False, line_number=3, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_FAST', opcode=83, arg=4, argval='b', argrepr='b', offset=12, start_offset=12, starts_line=False, line_number=3, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_FAST', opcode=83, arg=0, argval='c', argrepr='c', offset=14, start_offset=14, starts_line=False, line_number=3, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_FAST', opcode=83, arg=0, argval='c', argrepr='c', offset=14, start_offset=14, starts_line=False, line_number=3, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_FAST', opcode=83, arg=1, argval='d', argrepr='d', offset=16, start_offset=16, starts_line=False, line_number=3, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_FAST', opcode=83, arg=1, argval='d', argrepr='d', offset=16, start_offset=16, starts_line=False, line_number=3, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='BUILD_TUPLE', opcode=50, arg=4, argval=4, argrepr='', offset=18, start_offset=18, starts_line=False, line_number=3, label=None, positions=None, cache_info=None),
|
Instruction(opname='BUILD_TUPLE', opcode=51, arg=4, argval=4, argrepr='', offset=18, start_offset=18, starts_line=False, line_number=3, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_CONST', opcode=81, arg=0, argval=code_object_inner, argrepr=repr(code_object_inner), offset=20, start_offset=20, starts_line=False, line_number=3, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_CONST', opcode=81, arg=0, argval=code_object_inner, argrepr=repr(code_object_inner), offset=20, start_offset=20, starts_line=False, line_number=3, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='MAKE_FUNCTION', opcode=23, arg=None, argval=None, argrepr='', offset=22, start_offset=22, starts_line=False, line_number=3, label=None, positions=None, cache_info=None),
|
Instruction(opname='MAKE_FUNCTION', opcode=24, arg=None, argval=None, argrepr='', offset=22, start_offset=22, starts_line=False, line_number=3, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='SET_FUNCTION_ATTRIBUTE', opcode=105, arg=8, argval=8, argrepr='closure', offset=24, start_offset=24, starts_line=False, line_number=3, label=None, positions=None, cache_info=None),
|
Instruction(opname='SET_FUNCTION_ATTRIBUTE', opcode=105, arg=8, argval=8, argrepr='closure', offset=24, start_offset=24, starts_line=False, line_number=3, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='SET_FUNCTION_ATTRIBUTE', opcode=105, arg=1, argval=1, argrepr='defaults', offset=26, start_offset=26, starts_line=False, line_number=3, label=None, positions=None, cache_info=None),
|
Instruction(opname='SET_FUNCTION_ATTRIBUTE', opcode=105, arg=1, argval=1, argrepr='defaults', offset=26, start_offset=26, starts_line=False, line_number=3, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='STORE_FAST', opcode=109, arg=2, argval='inner', argrepr='inner', offset=28, start_offset=28, starts_line=False, line_number=3, label=None, positions=None, cache_info=None),
|
Instruction(opname='STORE_FAST', opcode=109, arg=2, argval='inner', argrepr='inner', offset=28, start_offset=28, starts_line=False, line_number=3, label=None, positions=None, cache_info=None),
|
||||||
|
@ -1752,10 +1752,10 @@ expected_opinfo_f = [
|
||||||
Instruction(opname='LOAD_DEREF', opcode=82, arg=4, argval='b', argrepr='b', offset=42, start_offset=42, starts_line=False, line_number=5, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_DEREF', opcode=82, arg=4, argval='b', argrepr='b', offset=42, start_offset=42, starts_line=False, line_number=5, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_DEREF', opcode=82, arg=0, argval='c', argrepr='c', offset=44, start_offset=44, starts_line=False, line_number=5, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_DEREF', opcode=82, arg=0, argval='c', argrepr='c', offset=44, start_offset=44, starts_line=False, line_number=5, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_DEREF', opcode=82, arg=1, argval='d', argrepr='d', offset=46, start_offset=46, starts_line=False, line_number=5, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_DEREF', opcode=82, arg=1, argval='d', argrepr='d', offset=46, start_offset=46, starts_line=False, line_number=5, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='CALL', opcode=51, arg=4, argval=4, argrepr='', offset=48, start_offset=48, starts_line=False, line_number=5, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
Instruction(opname='CALL', opcode=52, arg=4, argval=4, argrepr='', offset=48, start_offset=48, starts_line=False, line_number=5, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
||||||
Instruction(opname='POP_TOP', opcode=31, arg=None, argval=None, argrepr='', offset=56, start_offset=56, starts_line=False, line_number=5, label=None, positions=None, cache_info=None),
|
Instruction(opname='POP_TOP', opcode=32, arg=None, argval=None, argrepr='', offset=56, start_offset=56, starts_line=False, line_number=5, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_FAST', opcode=83, arg=2, argval='inner', argrepr='inner', offset=58, start_offset=58, starts_line=True, line_number=6, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_FAST', opcode=83, arg=2, argval='inner', argrepr='inner', offset=58, start_offset=58, starts_line=True, line_number=6, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='RETURN_VALUE', opcode=35, arg=None, argval=None, argrepr='', offset=60, start_offset=60, starts_line=False, line_number=6, label=None, positions=None, cache_info=None),
|
Instruction(opname='RETURN_VALUE', opcode=36, arg=None, argval=None, argrepr='', offset=60, start_offset=60, starts_line=False, line_number=6, label=None, positions=None, cache_info=None),
|
||||||
]
|
]
|
||||||
|
|
||||||
expected_opinfo_inner = [
|
expected_opinfo_inner = [
|
||||||
|
@ -1767,140 +1767,140 @@ expected_opinfo_inner = [
|
||||||
Instruction(opname='LOAD_DEREF', opcode=82, arg=4, argval='c', argrepr='c', offset=18, start_offset=18, starts_line=False, line_number=4, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_DEREF', opcode=82, arg=4, argval='c', argrepr='c', offset=18, start_offset=18, starts_line=False, line_number=4, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_DEREF', opcode=82, arg=5, argval='d', argrepr='d', offset=20, start_offset=20, starts_line=False, line_number=4, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_DEREF', opcode=82, arg=5, argval='d', argrepr='d', offset=20, start_offset=20, starts_line=False, line_number=4, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_FAST_LOAD_FAST', opcode=86, arg=1, argval=('e', 'f'), argrepr='e, f', offset=22, start_offset=22, starts_line=False, line_number=4, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_FAST_LOAD_FAST', opcode=86, arg=1, argval=('e', 'f'), argrepr='e, f', offset=22, start_offset=22, starts_line=False, line_number=4, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='CALL', opcode=51, arg=6, argval=6, argrepr='', offset=24, start_offset=24, starts_line=False, line_number=4, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
Instruction(opname='CALL', opcode=52, arg=6, argval=6, argrepr='', offset=24, start_offset=24, starts_line=False, line_number=4, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
||||||
Instruction(opname='POP_TOP', opcode=31, arg=None, argval=None, argrepr='', offset=32, start_offset=32, starts_line=False, line_number=4, label=None, positions=None, cache_info=None),
|
Instruction(opname='POP_TOP', opcode=32, arg=None, argval=None, argrepr='', offset=32, start_offset=32, starts_line=False, line_number=4, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_CONST', opcode=81, arg=0, argval=None, argrepr='None', offset=34, start_offset=34, starts_line=False, line_number=4, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_CONST', opcode=81, arg=0, argval=None, argrepr='None', offset=34, start_offset=34, starts_line=False, line_number=4, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='RETURN_VALUE', opcode=35, arg=None, argval=None, argrepr='', offset=36, start_offset=36, starts_line=False, line_number=4, label=None, positions=None, cache_info=None),
|
Instruction(opname='RETURN_VALUE', opcode=36, arg=None, argval=None, argrepr='', offset=36, start_offset=36, starts_line=False, line_number=4, label=None, positions=None, cache_info=None),
|
||||||
]
|
]
|
||||||
|
|
||||||
expected_opinfo_jumpy = [
|
expected_opinfo_jumpy = [
|
||||||
Instruction(opname='RESUME', opcode=149, arg=0, argval=0, argrepr='', offset=0, start_offset=0, starts_line=True, line_number=1, label=None, positions=None, cache_info=None),
|
Instruction(opname='RESUME', opcode=149, arg=0, argval=0, argrepr='', offset=0, start_offset=0, starts_line=True, line_number=1, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_GLOBAL', opcode=89, arg=1, argval='range', argrepr='range + NULL', offset=2, start_offset=2, starts_line=True, line_number=3, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('index', 1, b'\x00\x00'), ('module_keys_version', 1, b'\x00\x00'), ('builtin_keys_version', 1, b'\x00\x00')]),
|
Instruction(opname='LOAD_GLOBAL', opcode=89, arg=1, argval='range', argrepr='range + NULL', offset=2, start_offset=2, starts_line=True, line_number=3, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('index', 1, b'\x00\x00'), ('module_keys_version', 1, b'\x00\x00'), ('builtin_keys_version', 1, b'\x00\x00')]),
|
||||||
Instruction(opname='LOAD_SMALL_INT', opcode=91, arg=10, argval=10, argrepr='', offset=12, start_offset=12, starts_line=False, line_number=3, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_SMALL_INT', opcode=91, arg=10, argval=10, argrepr='', offset=12, start_offset=12, starts_line=False, line_number=3, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='CALL', opcode=51, arg=1, argval=1, argrepr='', offset=14, start_offset=14, starts_line=False, line_number=3, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
Instruction(opname='CALL', opcode=52, arg=1, argval=1, argrepr='', offset=14, start_offset=14, starts_line=False, line_number=3, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
||||||
Instruction(opname='GET_ITER', opcode=16, arg=None, argval=None, argrepr='', offset=22, start_offset=22, starts_line=False, line_number=3, label=None, positions=None, cache_info=None),
|
Instruction(opname='GET_ITER', opcode=18, arg=None, argval=None, argrepr='', offset=22, start_offset=22, starts_line=False, line_number=3, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='FOR_ITER', opcode=69, arg=32, argval=92, argrepr='to L4', offset=24, start_offset=24, starts_line=False, line_number=3, label=1, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
Instruction(opname='FOR_ITER', opcode=69, arg=32, argval=92, argrepr='to L4', offset=24, start_offset=24, starts_line=False, line_number=3, label=1, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
||||||
Instruction(opname='STORE_FAST', opcode=109, arg=0, argval='i', argrepr='i', offset=28, start_offset=28, starts_line=False, line_number=3, label=None, positions=None, cache_info=None),
|
Instruction(opname='STORE_FAST', opcode=109, arg=0, argval='i', argrepr='i', offset=28, start_offset=28, starts_line=False, line_number=3, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_GLOBAL', opcode=89, arg=3, argval='print', argrepr='print + NULL', offset=30, start_offset=30, starts_line=True, line_number=4, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('index', 1, b'\x00\x00'), ('module_keys_version', 1, b'\x00\x00'), ('builtin_keys_version', 1, b'\x00\x00')]),
|
Instruction(opname='LOAD_GLOBAL', opcode=89, arg=3, argval='print', argrepr='print + NULL', offset=30, start_offset=30, starts_line=True, line_number=4, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('index', 1, b'\x00\x00'), ('module_keys_version', 1, b'\x00\x00'), ('builtin_keys_version', 1, b'\x00\x00')]),
|
||||||
Instruction(opname='LOAD_FAST', opcode=83, arg=0, argval='i', argrepr='i', offset=40, start_offset=40, starts_line=False, line_number=4, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_FAST', opcode=83, arg=0, argval='i', argrepr='i', offset=40, start_offset=40, starts_line=False, line_number=4, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='CALL', opcode=51, arg=1, argval=1, argrepr='', offset=42, start_offset=42, starts_line=False, line_number=4, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
Instruction(opname='CALL', opcode=52, arg=1, argval=1, argrepr='', offset=42, start_offset=42, starts_line=False, line_number=4, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
||||||
Instruction(opname='POP_TOP', opcode=31, arg=None, argval=None, argrepr='', offset=50, start_offset=50, starts_line=False, line_number=4, label=None, positions=None, cache_info=None),
|
Instruction(opname='POP_TOP', opcode=32, arg=None, argval=None, argrepr='', offset=50, start_offset=50, starts_line=False, line_number=4, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_FAST', opcode=83, arg=0, argval='i', argrepr='i', offset=52, start_offset=52, starts_line=True, line_number=5, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_FAST', opcode=83, arg=0, argval='i', argrepr='i', offset=52, start_offset=52, starts_line=True, line_number=5, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_SMALL_INT', opcode=91, arg=4, argval=4, argrepr='', offset=54, start_offset=54, starts_line=False, line_number=5, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_SMALL_INT', opcode=91, arg=4, argval=4, argrepr='', offset=54, start_offset=54, starts_line=False, line_number=5, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='COMPARE_OP', opcode=56, arg=18, argval='<', argrepr='bool(<)', offset=56, start_offset=56, starts_line=False, line_number=5, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
Instruction(opname='COMPARE_OP', opcode=56, arg=18, argval='<', argrepr='bool(<)', offset=56, start_offset=56, starts_line=False, line_number=5, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
||||||
Instruction(opname='POP_JUMP_IF_FALSE', opcode=97, arg=3, argval=70, argrepr='to L2', offset=60, start_offset=60, starts_line=False, line_number=5, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
Instruction(opname='POP_JUMP_IF_FALSE', opcode=97, arg=3, argval=70, argrepr='to L2', offset=60, start_offset=60, starts_line=False, line_number=5, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
||||||
Instruction(opname='NOT_TAKEN', opcode=28, arg=None, argval=None, argrepr='', offset=64, start_offset=64, starts_line=False, line_number=5, label=None, positions=None, cache_info=None),
|
Instruction(opname='NOT_TAKEN', opcode=29, arg=None, argval=None, argrepr='', offset=64, start_offset=64, starts_line=False, line_number=5, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='JUMP_BACKWARD', opcode=74, arg=23, argval=24, argrepr='to L1', offset=66, start_offset=66, starts_line=True, line_number=6, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
Instruction(opname='JUMP_BACKWARD', opcode=74, arg=23, argval=24, argrepr='to L1', offset=66, start_offset=66, starts_line=True, line_number=6, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
||||||
Instruction(opname='LOAD_FAST', opcode=83, arg=0, argval='i', argrepr='i', offset=70, start_offset=70, starts_line=True, line_number=7, label=2, positions=None, cache_info=None),
|
Instruction(opname='LOAD_FAST', opcode=83, arg=0, argval='i', argrepr='i', offset=70, start_offset=70, starts_line=True, line_number=7, label=2, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_SMALL_INT', opcode=91, arg=6, argval=6, argrepr='', offset=72, start_offset=72, starts_line=False, line_number=7, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_SMALL_INT', opcode=91, arg=6, argval=6, argrepr='', offset=72, start_offset=72, starts_line=False, line_number=7, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='COMPARE_OP', opcode=56, arg=148, argval='>', argrepr='bool(>)', offset=74, start_offset=74, starts_line=False, line_number=7, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
Instruction(opname='COMPARE_OP', opcode=56, arg=148, argval='>', argrepr='bool(>)', offset=74, start_offset=74, starts_line=False, line_number=7, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
||||||
Instruction(opname='POP_JUMP_IF_TRUE', opcode=100, arg=3, argval=88, argrepr='to L3', offset=78, start_offset=78, starts_line=False, line_number=7, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
Instruction(opname='POP_JUMP_IF_TRUE', opcode=100, arg=3, argval=88, argrepr='to L3', offset=78, start_offset=78, starts_line=False, line_number=7, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
||||||
Instruction(opname='NOT_TAKEN', opcode=28, arg=None, argval=None, argrepr='', offset=82, start_offset=82, starts_line=False, line_number=7, label=None, positions=None, cache_info=None),
|
Instruction(opname='NOT_TAKEN', opcode=29, arg=None, argval=None, argrepr='', offset=82, start_offset=82, starts_line=False, line_number=7, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='JUMP_BACKWARD', opcode=74, arg=32, argval=24, argrepr='to L1', offset=84, start_offset=84, starts_line=False, line_number=7, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
Instruction(opname='JUMP_BACKWARD', opcode=74, arg=32, argval=24, argrepr='to L1', offset=84, start_offset=84, starts_line=False, line_number=7, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
||||||
Instruction(opname='POP_TOP', opcode=31, arg=None, argval=None, argrepr='', offset=88, start_offset=88, starts_line=True, line_number=8, label=3, positions=None, cache_info=None),
|
Instruction(opname='POP_TOP', opcode=32, arg=None, argval=None, argrepr='', offset=88, start_offset=88, starts_line=True, line_number=8, label=3, positions=None, cache_info=None),
|
||||||
Instruction(opname='JUMP_FORWARD', opcode=76, arg=13, argval=118, argrepr='to L5', offset=90, start_offset=90, starts_line=False, line_number=8, label=None, positions=None, cache_info=None),
|
Instruction(opname='JUMP_FORWARD', opcode=76, arg=13, argval=118, argrepr='to L5', offset=90, start_offset=90, starts_line=False, line_number=8, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='END_FOR', opcode=9, arg=None, argval=None, argrepr='', offset=92, start_offset=92, starts_line=True, line_number=3, label=4, positions=None, cache_info=None),
|
Instruction(opname='END_FOR', opcode=10, arg=None, argval=None, argrepr='', offset=92, start_offset=92, starts_line=True, line_number=3, label=4, positions=None, cache_info=None),
|
||||||
Instruction(opname='POP_ITER', opcode=30, arg=None, argval=None, argrepr='', offset=94, start_offset=94, starts_line=False, line_number=3, label=None, positions=None, cache_info=None),
|
Instruction(opname='POP_ITER', opcode=31, arg=None, argval=None, argrepr='', offset=94, start_offset=94, starts_line=False, line_number=3, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_GLOBAL', opcode=89, arg=3, argval='print', argrepr='print + NULL', offset=96, start_offset=96, starts_line=True, line_number=10, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('index', 1, b'\x00\x00'), ('module_keys_version', 1, b'\x00\x00'), ('builtin_keys_version', 1, b'\x00\x00')]),
|
Instruction(opname='LOAD_GLOBAL', opcode=89, arg=3, argval='print', argrepr='print + NULL', offset=96, start_offset=96, starts_line=True, line_number=10, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('index', 1, b'\x00\x00'), ('module_keys_version', 1, b'\x00\x00'), ('builtin_keys_version', 1, b'\x00\x00')]),
|
||||||
Instruction(opname='LOAD_CONST', opcode=81, arg=0, argval='I can haz else clause?', argrepr="'I can haz else clause?'", offset=106, start_offset=106, starts_line=False, line_number=10, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_CONST', opcode=81, arg=0, argval='I can haz else clause?', argrepr="'I can haz else clause?'", offset=106, start_offset=106, starts_line=False, line_number=10, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='CALL', opcode=51, arg=1, argval=1, argrepr='', offset=108, start_offset=108, starts_line=False, line_number=10, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
Instruction(opname='CALL', opcode=52, arg=1, argval=1, argrepr='', offset=108, start_offset=108, starts_line=False, line_number=10, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
||||||
Instruction(opname='POP_TOP', opcode=31, arg=None, argval=None, argrepr='', offset=116, start_offset=116, starts_line=False, line_number=10, label=None, positions=None, cache_info=None),
|
Instruction(opname='POP_TOP', opcode=32, arg=None, argval=None, argrepr='', offset=116, start_offset=116, starts_line=False, line_number=10, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_FAST_CHECK', opcode=85, arg=0, argval='i', argrepr='i', offset=118, start_offset=118, starts_line=True, line_number=11, label=5, positions=None, cache_info=None),
|
Instruction(opname='LOAD_FAST_CHECK', opcode=85, arg=0, argval='i', argrepr='i', offset=118, start_offset=118, starts_line=True, line_number=11, label=5, positions=None, cache_info=None),
|
||||||
Instruction(opname='TO_BOOL', opcode=39, arg=None, argval=None, argrepr='', offset=120, start_offset=120, starts_line=False, line_number=11, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('version', 2, b'\x00\x00\x00\x00')]),
|
Instruction(opname='TO_BOOL', opcode=40, arg=None, argval=None, argrepr='', offset=120, start_offset=120, starts_line=False, line_number=11, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('version', 2, b'\x00\x00\x00\x00')]),
|
||||||
Instruction(opname='POP_JUMP_IF_FALSE', opcode=97, arg=40, argval=212, argrepr='to L8', offset=128, start_offset=128, starts_line=False, line_number=11, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
Instruction(opname='POP_JUMP_IF_FALSE', opcode=97, arg=40, argval=212, argrepr='to L8', offset=128, start_offset=128, starts_line=False, line_number=11, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
||||||
Instruction(opname='NOT_TAKEN', opcode=28, arg=None, argval=None, argrepr='', offset=132, start_offset=132, starts_line=False, line_number=11, label=None, positions=None, cache_info=None),
|
Instruction(opname='NOT_TAKEN', opcode=29, arg=None, argval=None, argrepr='', offset=132, start_offset=132, starts_line=False, line_number=11, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_GLOBAL', opcode=89, arg=3, argval='print', argrepr='print + NULL', offset=134, start_offset=134, starts_line=True, line_number=12, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('index', 1, b'\x00\x00'), ('module_keys_version', 1, b'\x00\x00'), ('builtin_keys_version', 1, b'\x00\x00')]),
|
Instruction(opname='LOAD_GLOBAL', opcode=89, arg=3, argval='print', argrepr='print + NULL', offset=134, start_offset=134, starts_line=True, line_number=12, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('index', 1, b'\x00\x00'), ('module_keys_version', 1, b'\x00\x00'), ('builtin_keys_version', 1, b'\x00\x00')]),
|
||||||
Instruction(opname='LOAD_FAST', opcode=83, arg=0, argval='i', argrepr='i', offset=144, start_offset=144, starts_line=False, line_number=12, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_FAST', opcode=83, arg=0, argval='i', argrepr='i', offset=144, start_offset=144, starts_line=False, line_number=12, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='CALL', opcode=51, arg=1, argval=1, argrepr='', offset=146, start_offset=146, starts_line=False, line_number=12, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
Instruction(opname='CALL', opcode=52, arg=1, argval=1, argrepr='', offset=146, start_offset=146, starts_line=False, line_number=12, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
||||||
Instruction(opname='POP_TOP', opcode=31, arg=None, argval=None, argrepr='', offset=154, start_offset=154, starts_line=False, line_number=12, label=None, positions=None, cache_info=None),
|
Instruction(opname='POP_TOP', opcode=32, arg=None, argval=None, argrepr='', offset=154, start_offset=154, starts_line=False, line_number=12, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_FAST', opcode=83, arg=0, argval='i', argrepr='i', offset=156, start_offset=156, starts_line=True, line_number=13, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_FAST', opcode=83, arg=0, argval='i', argrepr='i', offset=156, start_offset=156, starts_line=True, line_number=13, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_SMALL_INT', opcode=91, arg=1, argval=1, argrepr='', offset=158, start_offset=158, starts_line=False, line_number=13, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_SMALL_INT', opcode=91, arg=1, argval=1, argrepr='', offset=158, start_offset=158, starts_line=False, line_number=13, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='BINARY_OP', opcode=44, arg=23, argval=23, argrepr='-=', offset=160, start_offset=160, starts_line=False, line_number=13, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('descr', 4, b'\x00\x00\x00\x00\x00\x00\x00\x00')]),
|
Instruction(opname='BINARY_OP', opcode=45, arg=23, argval=23, argrepr='-=', offset=160, start_offset=160, starts_line=False, line_number=13, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('descr', 4, b'\x00\x00\x00\x00\x00\x00\x00\x00')]),
|
||||||
Instruction(opname='STORE_FAST', opcode=109, arg=0, argval='i', argrepr='i', offset=172, start_offset=172, starts_line=False, line_number=13, label=None, positions=None, cache_info=None),
|
Instruction(opname='STORE_FAST', opcode=109, arg=0, argval='i', argrepr='i', offset=172, start_offset=172, starts_line=False, line_number=13, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_FAST', opcode=83, arg=0, argval='i', argrepr='i', offset=174, start_offset=174, starts_line=True, line_number=14, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_FAST', opcode=83, arg=0, argval='i', argrepr='i', offset=174, start_offset=174, starts_line=True, line_number=14, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_SMALL_INT', opcode=91, arg=6, argval=6, argrepr='', offset=176, start_offset=176, starts_line=False, line_number=14, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_SMALL_INT', opcode=91, arg=6, argval=6, argrepr='', offset=176, start_offset=176, starts_line=False, line_number=14, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='COMPARE_OP', opcode=56, arg=148, argval='>', argrepr='bool(>)', offset=178, start_offset=178, starts_line=False, line_number=14, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
Instruction(opname='COMPARE_OP', opcode=56, arg=148, argval='>', argrepr='bool(>)', offset=178, start_offset=178, starts_line=False, line_number=14, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
||||||
Instruction(opname='POP_JUMP_IF_FALSE', opcode=97, arg=3, argval=192, argrepr='to L6', offset=182, start_offset=182, starts_line=False, line_number=14, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
Instruction(opname='POP_JUMP_IF_FALSE', opcode=97, arg=3, argval=192, argrepr='to L6', offset=182, start_offset=182, starts_line=False, line_number=14, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
||||||
Instruction(opname='NOT_TAKEN', opcode=28, arg=None, argval=None, argrepr='', offset=186, start_offset=186, starts_line=False, line_number=14, label=None, positions=None, cache_info=None),
|
Instruction(opname='NOT_TAKEN', opcode=29, arg=None, argval=None, argrepr='', offset=186, start_offset=186, starts_line=False, line_number=14, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='JUMP_BACKWARD', opcode=74, arg=37, argval=118, argrepr='to L5', offset=188, start_offset=188, starts_line=True, line_number=15, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
Instruction(opname='JUMP_BACKWARD', opcode=74, arg=37, argval=118, argrepr='to L5', offset=188, start_offset=188, starts_line=True, line_number=15, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
||||||
Instruction(opname='LOAD_FAST', opcode=83, arg=0, argval='i', argrepr='i', offset=192, start_offset=192, starts_line=True, line_number=16, label=6, positions=None, cache_info=None),
|
Instruction(opname='LOAD_FAST', opcode=83, arg=0, argval='i', argrepr='i', offset=192, start_offset=192, starts_line=True, line_number=16, label=6, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_SMALL_INT', opcode=91, arg=4, argval=4, argrepr='', offset=194, start_offset=194, starts_line=False, line_number=16, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_SMALL_INT', opcode=91, arg=4, argval=4, argrepr='', offset=194, start_offset=194, starts_line=False, line_number=16, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='COMPARE_OP', opcode=56, arg=18, argval='<', argrepr='bool(<)', offset=196, start_offset=196, starts_line=False, line_number=16, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
Instruction(opname='COMPARE_OP', opcode=56, arg=18, argval='<', argrepr='bool(<)', offset=196, start_offset=196, starts_line=False, line_number=16, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
||||||
Instruction(opname='POP_JUMP_IF_TRUE', opcode=100, arg=3, argval=210, argrepr='to L7', offset=200, start_offset=200, starts_line=False, line_number=16, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
Instruction(opname='POP_JUMP_IF_TRUE', opcode=100, arg=3, argval=210, argrepr='to L7', offset=200, start_offset=200, starts_line=False, line_number=16, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
||||||
Instruction(opname='NOT_TAKEN', opcode=28, arg=None, argval=None, argrepr='', offset=204, start_offset=204, starts_line=False, line_number=16, label=None, positions=None, cache_info=None),
|
Instruction(opname='NOT_TAKEN', opcode=29, arg=None, argval=None, argrepr='', offset=204, start_offset=204, starts_line=False, line_number=16, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='JUMP_BACKWARD', opcode=74, arg=46, argval=118, argrepr='to L5', offset=206, start_offset=206, starts_line=False, line_number=16, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
Instruction(opname='JUMP_BACKWARD', opcode=74, arg=46, argval=118, argrepr='to L5', offset=206, start_offset=206, starts_line=False, line_number=16, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
||||||
Instruction(opname='JUMP_FORWARD', opcode=76, arg=11, argval=234, argrepr='to L9', offset=210, start_offset=210, starts_line=True, line_number=17, label=7, positions=None, cache_info=None),
|
Instruction(opname='JUMP_FORWARD', opcode=76, arg=11, argval=234, argrepr='to L9', offset=210, start_offset=210, starts_line=True, line_number=17, label=7, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_GLOBAL', opcode=89, arg=3, argval='print', argrepr='print + NULL', offset=212, start_offset=212, starts_line=True, line_number=19, label=8, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('index', 1, b'\x00\x00'), ('module_keys_version', 1, b'\x00\x00'), ('builtin_keys_version', 1, b'\x00\x00')]),
|
Instruction(opname='LOAD_GLOBAL', opcode=89, arg=3, argval='print', argrepr='print + NULL', offset=212, start_offset=212, starts_line=True, line_number=19, label=8, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('index', 1, b'\x00\x00'), ('module_keys_version', 1, b'\x00\x00'), ('builtin_keys_version', 1, b'\x00\x00')]),
|
||||||
Instruction(opname='LOAD_CONST', opcode=81, arg=1, argval='Who let lolcatz into this test suite?', argrepr="'Who let lolcatz into this test suite?'", offset=222, start_offset=222, starts_line=False, line_number=19, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_CONST', opcode=81, arg=1, argval='Who let lolcatz into this test suite?', argrepr="'Who let lolcatz into this test suite?'", offset=222, start_offset=222, starts_line=False, line_number=19, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='CALL', opcode=51, arg=1, argval=1, argrepr='', offset=224, start_offset=224, starts_line=False, line_number=19, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
Instruction(opname='CALL', opcode=52, arg=1, argval=1, argrepr='', offset=224, start_offset=224, starts_line=False, line_number=19, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
||||||
Instruction(opname='POP_TOP', opcode=31, arg=None, argval=None, argrepr='', offset=232, start_offset=232, starts_line=False, line_number=19, label=None, positions=None, cache_info=None),
|
Instruction(opname='POP_TOP', opcode=32, arg=None, argval=None, argrepr='', offset=232, start_offset=232, starts_line=False, line_number=19, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='NOP', opcode=27, arg=None, argval=None, argrepr='', offset=234, start_offset=234, starts_line=True, line_number=20, label=9, positions=None, cache_info=None),
|
Instruction(opname='NOP', opcode=28, arg=None, argval=None, argrepr='', offset=234, start_offset=234, starts_line=True, line_number=20, label=9, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_SMALL_INT', opcode=91, arg=1, argval=1, argrepr='', offset=236, start_offset=236, starts_line=True, line_number=21, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_SMALL_INT', opcode=91, arg=1, argval=1, argrepr='', offset=236, start_offset=236, starts_line=True, line_number=21, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_SMALL_INT', opcode=91, arg=0, argval=0, argrepr='', offset=238, start_offset=238, starts_line=False, line_number=21, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_SMALL_INT', opcode=91, arg=0, argval=0, argrepr='', offset=238, start_offset=238, starts_line=False, line_number=21, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='BINARY_OP', opcode=44, arg=11, argval=11, argrepr='/', offset=240, start_offset=240, starts_line=False, line_number=21, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('descr', 4, b'\x00\x00\x00\x00\x00\x00\x00\x00')]),
|
Instruction(opname='BINARY_OP', opcode=45, arg=11, argval=11, argrepr='/', offset=240, start_offset=240, starts_line=False, line_number=21, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('descr', 4, b'\x00\x00\x00\x00\x00\x00\x00\x00')]),
|
||||||
Instruction(opname='POP_TOP', opcode=31, arg=None, argval=None, argrepr='', offset=252, start_offset=252, starts_line=False, line_number=21, label=None, positions=None, cache_info=None),
|
Instruction(opname='POP_TOP', opcode=32, arg=None, argval=None, argrepr='', offset=252, start_offset=252, starts_line=False, line_number=21, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_FAST', opcode=83, arg=0, argval='i', argrepr='i', offset=254, start_offset=254, starts_line=True, line_number=25, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_FAST', opcode=83, arg=0, argval='i', argrepr='i', offset=254, start_offset=254, starts_line=True, line_number=25, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='COPY', opcode=59, arg=1, argval=1, argrepr='', offset=256, start_offset=256, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
Instruction(opname='COPY', opcode=59, arg=1, argval=1, argrepr='', offset=256, start_offset=256, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_SPECIAL', opcode=92, arg=1, argval=1, argrepr='__exit__', offset=258, start_offset=258, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_SPECIAL', opcode=92, arg=1, argval=1, argrepr='__exit__', offset=258, start_offset=258, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='SWAP', opcode=114, arg=2, argval=2, argrepr='', offset=260, start_offset=260, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
Instruction(opname='SWAP', opcode=114, arg=2, argval=2, argrepr='', offset=260, start_offset=260, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='SWAP', opcode=114, arg=3, argval=3, argrepr='', offset=262, start_offset=262, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
Instruction(opname='SWAP', opcode=114, arg=3, argval=3, argrepr='', offset=262, start_offset=262, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_SPECIAL', opcode=92, arg=0, argval=0, argrepr='__enter__', offset=264, start_offset=264, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_SPECIAL', opcode=92, arg=0, argval=0, argrepr='__enter__', offset=264, start_offset=264, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='CALL', opcode=51, arg=0, argval=0, argrepr='', offset=266, start_offset=266, starts_line=False, line_number=25, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
Instruction(opname='CALL', opcode=52, arg=0, argval=0, argrepr='', offset=266, start_offset=266, starts_line=False, line_number=25, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
||||||
Instruction(opname='STORE_FAST', opcode=109, arg=1, argval='dodgy', argrepr='dodgy', offset=274, start_offset=274, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
Instruction(opname='STORE_FAST', opcode=109, arg=1, argval='dodgy', argrepr='dodgy', offset=274, start_offset=274, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_GLOBAL', opcode=89, arg=3, argval='print', argrepr='print + NULL', offset=276, start_offset=276, starts_line=True, line_number=26, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('index', 1, b'\x00\x00'), ('module_keys_version', 1, b'\x00\x00'), ('builtin_keys_version', 1, b'\x00\x00')]),
|
Instruction(opname='LOAD_GLOBAL', opcode=89, arg=3, argval='print', argrepr='print + NULL', offset=276, start_offset=276, starts_line=True, line_number=26, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('index', 1, b'\x00\x00'), ('module_keys_version', 1, b'\x00\x00'), ('builtin_keys_version', 1, b'\x00\x00')]),
|
||||||
Instruction(opname='LOAD_CONST', opcode=81, arg=2, argval='Never reach this', argrepr="'Never reach this'", offset=286, start_offset=286, starts_line=False, line_number=26, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_CONST', opcode=81, arg=2, argval='Never reach this', argrepr="'Never reach this'", offset=286, start_offset=286, starts_line=False, line_number=26, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='CALL', opcode=51, arg=1, argval=1, argrepr='', offset=288, start_offset=288, starts_line=False, line_number=26, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
Instruction(opname='CALL', opcode=52, arg=1, argval=1, argrepr='', offset=288, start_offset=288, starts_line=False, line_number=26, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
||||||
Instruction(opname='POP_TOP', opcode=31, arg=None, argval=None, argrepr='', offset=296, start_offset=296, starts_line=False, line_number=26, label=None, positions=None, cache_info=None),
|
Instruction(opname='POP_TOP', opcode=32, arg=None, argval=None, argrepr='', offset=296, start_offset=296, starts_line=False, line_number=26, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_CONST', opcode=81, arg=3, argval=None, argrepr='None', offset=298, start_offset=298, starts_line=True, line_number=25, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_CONST', opcode=81, arg=3, argval=None, argrepr='None', offset=298, start_offset=298, starts_line=True, line_number=25, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_CONST', opcode=81, arg=3, argval=None, argrepr='None', offset=300, start_offset=300, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_CONST', opcode=81, arg=3, argval=None, argrepr='None', offset=300, start_offset=300, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_CONST', opcode=81, arg=3, argval=None, argrepr='None', offset=302, start_offset=302, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_CONST', opcode=81, arg=3, argval=None, argrepr='None', offset=302, start_offset=302, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='CALL', opcode=51, arg=3, argval=3, argrepr='', offset=304, start_offset=304, starts_line=False, line_number=25, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
Instruction(opname='CALL', opcode=52, arg=3, argval=3, argrepr='', offset=304, start_offset=304, starts_line=False, line_number=25, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
||||||
Instruction(opname='POP_TOP', opcode=31, arg=None, argval=None, argrepr='', offset=312, start_offset=312, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
Instruction(opname='POP_TOP', opcode=32, arg=None, argval=None, argrepr='', offset=312, start_offset=312, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_GLOBAL', opcode=89, arg=3, argval='print', argrepr='print + NULL', offset=314, start_offset=314, starts_line=True, line_number=28, label=10, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('index', 1, b'\x00\x00'), ('module_keys_version', 1, b'\x00\x00'), ('builtin_keys_version', 1, b'\x00\x00')]),
|
Instruction(opname='LOAD_GLOBAL', opcode=89, arg=3, argval='print', argrepr='print + NULL', offset=314, start_offset=314, starts_line=True, line_number=28, label=10, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('index', 1, b'\x00\x00'), ('module_keys_version', 1, b'\x00\x00'), ('builtin_keys_version', 1, b'\x00\x00')]),
|
||||||
Instruction(opname='LOAD_CONST', opcode=81, arg=5, argval="OK, now we're done", argrepr='"OK, now we\'re done"', offset=324, start_offset=324, starts_line=False, line_number=28, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_CONST', opcode=81, arg=5, argval="OK, now we're done", argrepr='"OK, now we\'re done"', offset=324, start_offset=324, starts_line=False, line_number=28, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='CALL', opcode=51, arg=1, argval=1, argrepr='', offset=326, start_offset=326, starts_line=False, line_number=28, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
Instruction(opname='CALL', opcode=52, arg=1, argval=1, argrepr='', offset=326, start_offset=326, starts_line=False, line_number=28, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
||||||
Instruction(opname='POP_TOP', opcode=31, arg=None, argval=None, argrepr='', offset=334, start_offset=334, starts_line=False, line_number=28, label=None, positions=None, cache_info=None),
|
Instruction(opname='POP_TOP', opcode=32, arg=None, argval=None, argrepr='', offset=334, start_offset=334, starts_line=False, line_number=28, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_CONST', opcode=81, arg=3, argval=None, argrepr='None', offset=336, start_offset=336, starts_line=False, line_number=28, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_CONST', opcode=81, arg=3, argval=None, argrepr='None', offset=336, start_offset=336, starts_line=False, line_number=28, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='RETURN_VALUE', opcode=35, arg=None, argval=None, argrepr='', offset=338, start_offset=338, starts_line=False, line_number=28, label=None, positions=None, cache_info=None),
|
Instruction(opname='RETURN_VALUE', opcode=36, arg=None, argval=None, argrepr='', offset=338, start_offset=338, starts_line=False, line_number=28, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='PUSH_EXC_INFO', opcode=32, arg=None, argval=None, argrepr='', offset=340, start_offset=340, starts_line=True, line_number=25, label=None, positions=None, cache_info=None),
|
Instruction(opname='PUSH_EXC_INFO', opcode=33, arg=None, argval=None, argrepr='', offset=340, start_offset=340, starts_line=True, line_number=25, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='WITH_EXCEPT_START', opcode=43, arg=None, argval=None, argrepr='', offset=342, start_offset=342, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
Instruction(opname='WITH_EXCEPT_START', opcode=44, arg=None, argval=None, argrepr='', offset=342, start_offset=342, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='TO_BOOL', opcode=39, arg=None, argval=None, argrepr='', offset=344, start_offset=344, starts_line=False, line_number=25, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('version', 2, b'\x00\x00\x00\x00')]),
|
Instruction(opname='TO_BOOL', opcode=40, arg=None, argval=None, argrepr='', offset=344, start_offset=344, starts_line=False, line_number=25, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('version', 2, b'\x00\x00\x00\x00')]),
|
||||||
Instruction(opname='POP_JUMP_IF_TRUE', opcode=100, arg=2, argval=360, argrepr='to L11', offset=352, start_offset=352, starts_line=False, line_number=25, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
Instruction(opname='POP_JUMP_IF_TRUE', opcode=100, arg=2, argval=360, argrepr='to L11', offset=352, start_offset=352, starts_line=False, line_number=25, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
||||||
Instruction(opname='NOT_TAKEN', opcode=28, arg=None, argval=None, argrepr='', offset=356, start_offset=356, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
Instruction(opname='NOT_TAKEN', opcode=29, arg=None, argval=None, argrepr='', offset=356, start_offset=356, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='RERAISE', opcode=102, arg=2, argval=2, argrepr='', offset=358, start_offset=358, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
Instruction(opname='RERAISE', opcode=102, arg=2, argval=2, argrepr='', offset=358, start_offset=358, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='POP_TOP', opcode=31, arg=None, argval=None, argrepr='', offset=360, start_offset=360, starts_line=False, line_number=25, label=11, positions=None, cache_info=None),
|
Instruction(opname='POP_TOP', opcode=32, arg=None, argval=None, argrepr='', offset=360, start_offset=360, starts_line=False, line_number=25, label=11, positions=None, cache_info=None),
|
||||||
Instruction(opname='POP_EXCEPT', opcode=29, arg=None, argval=None, argrepr='', offset=362, start_offset=362, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
Instruction(opname='POP_EXCEPT', opcode=30, arg=None, argval=None, argrepr='', offset=362, start_offset=362, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='POP_TOP', opcode=31, arg=None, argval=None, argrepr='', offset=364, start_offset=364, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
Instruction(opname='POP_TOP', opcode=32, arg=None, argval=None, argrepr='', offset=364, start_offset=364, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='POP_TOP', opcode=31, arg=None, argval=None, argrepr='', offset=366, start_offset=366, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
Instruction(opname='POP_TOP', opcode=32, arg=None, argval=None, argrepr='', offset=366, start_offset=366, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='POP_TOP', opcode=31, arg=None, argval=None, argrepr='', offset=368, start_offset=368, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
Instruction(opname='POP_TOP', opcode=32, arg=None, argval=None, argrepr='', offset=368, start_offset=368, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='JUMP_BACKWARD_NO_INTERRUPT', opcode=75, arg=29, argval=314, argrepr='to L10', offset=370, start_offset=370, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
Instruction(opname='JUMP_BACKWARD_NO_INTERRUPT', opcode=75, arg=29, argval=314, argrepr='to L10', offset=370, start_offset=370, starts_line=False, line_number=25, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='COPY', opcode=59, arg=3, argval=3, argrepr='', offset=372, start_offset=372, starts_line=True, line_number=None, label=None, positions=None, cache_info=None),
|
Instruction(opname='COPY', opcode=59, arg=3, argval=3, argrepr='', offset=372, start_offset=372, starts_line=True, line_number=None, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='POP_EXCEPT', opcode=29, arg=None, argval=None, argrepr='', offset=374, start_offset=374, starts_line=False, line_number=None, label=None, positions=None, cache_info=None),
|
Instruction(opname='POP_EXCEPT', opcode=30, arg=None, argval=None, argrepr='', offset=374, start_offset=374, starts_line=False, line_number=None, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='RERAISE', opcode=102, arg=1, argval=1, argrepr='', offset=376, start_offset=376, starts_line=False, line_number=None, label=None, positions=None, cache_info=None),
|
Instruction(opname='RERAISE', opcode=102, arg=1, argval=1, argrepr='', offset=376, start_offset=376, starts_line=False, line_number=None, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='PUSH_EXC_INFO', opcode=32, arg=None, argval=None, argrepr='', offset=378, start_offset=378, starts_line=False, line_number=None, label=None, positions=None, cache_info=None),
|
Instruction(opname='PUSH_EXC_INFO', opcode=33, arg=None, argval=None, argrepr='', offset=378, start_offset=378, starts_line=False, line_number=None, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_GLOBAL', opcode=89, arg=4, argval='ZeroDivisionError', argrepr='ZeroDivisionError', offset=380, start_offset=380, starts_line=True, line_number=22, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('index', 1, b'\x00\x00'), ('module_keys_version', 1, b'\x00\x00'), ('builtin_keys_version', 1, b'\x00\x00')]),
|
Instruction(opname='LOAD_GLOBAL', opcode=89, arg=4, argval='ZeroDivisionError', argrepr='ZeroDivisionError', offset=380, start_offset=380, starts_line=True, line_number=22, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('index', 1, b'\x00\x00'), ('module_keys_version', 1, b'\x00\x00'), ('builtin_keys_version', 1, b'\x00\x00')]),
|
||||||
Instruction(opname='CHECK_EXC_MATCH', opcode=5, arg=None, argval=None, argrepr='', offset=390, start_offset=390, starts_line=False, line_number=22, label=None, positions=None, cache_info=None),
|
Instruction(opname='CHECK_EXC_MATCH', opcode=6, arg=None, argval=None, argrepr='', offset=390, start_offset=390, starts_line=False, line_number=22, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='POP_JUMP_IF_FALSE', opcode=97, arg=15, argval=426, argrepr='to L12', offset=392, start_offset=392, starts_line=False, line_number=22, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
Instruction(opname='POP_JUMP_IF_FALSE', opcode=97, arg=15, argval=426, argrepr='to L12', offset=392, start_offset=392, starts_line=False, line_number=22, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00')]),
|
||||||
Instruction(opname='NOT_TAKEN', opcode=28, arg=None, argval=None, argrepr='', offset=396, start_offset=396, starts_line=False, line_number=22, label=None, positions=None, cache_info=None),
|
Instruction(opname='NOT_TAKEN', opcode=29, arg=None, argval=None, argrepr='', offset=396, start_offset=396, starts_line=False, line_number=22, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='POP_TOP', opcode=31, arg=None, argval=None, argrepr='', offset=398, start_offset=398, starts_line=False, line_number=22, label=None, positions=None, cache_info=None),
|
Instruction(opname='POP_TOP', opcode=32, arg=None, argval=None, argrepr='', offset=398, start_offset=398, starts_line=False, line_number=22, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_GLOBAL', opcode=89, arg=3, argval='print', argrepr='print + NULL', offset=400, start_offset=400, starts_line=True, line_number=23, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('index', 1, b'\x00\x00'), ('module_keys_version', 1, b'\x00\x00'), ('builtin_keys_version', 1, b'\x00\x00')]),
|
Instruction(opname='LOAD_GLOBAL', opcode=89, arg=3, argval='print', argrepr='print + NULL', offset=400, start_offset=400, starts_line=True, line_number=23, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('index', 1, b'\x00\x00'), ('module_keys_version', 1, b'\x00\x00'), ('builtin_keys_version', 1, b'\x00\x00')]),
|
||||||
Instruction(opname='LOAD_CONST', opcode=81, arg=4, argval='Here we go, here we go, here we go...', argrepr="'Here we go, here we go, here we go...'", offset=410, start_offset=410, starts_line=False, line_number=23, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_CONST', opcode=81, arg=4, argval='Here we go, here we go, here we go...', argrepr="'Here we go, here we go, here we go...'", offset=410, start_offset=410, starts_line=False, line_number=23, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='CALL', opcode=51, arg=1, argval=1, argrepr='', offset=412, start_offset=412, starts_line=False, line_number=23, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
Instruction(opname='CALL', opcode=52, arg=1, argval=1, argrepr='', offset=412, start_offset=412, starts_line=False, line_number=23, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
||||||
Instruction(opname='POP_TOP', opcode=31, arg=None, argval=None, argrepr='', offset=420, start_offset=420, starts_line=False, line_number=23, label=None, positions=None, cache_info=None),
|
Instruction(opname='POP_TOP', opcode=32, arg=None, argval=None, argrepr='', offset=420, start_offset=420, starts_line=False, line_number=23, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='POP_EXCEPT', opcode=29, arg=None, argval=None, argrepr='', offset=422, start_offset=422, starts_line=False, line_number=23, label=None, positions=None, cache_info=None),
|
Instruction(opname='POP_EXCEPT', opcode=30, arg=None, argval=None, argrepr='', offset=422, start_offset=422, starts_line=False, line_number=23, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='JUMP_BACKWARD_NO_INTERRUPT', opcode=75, arg=56, argval=314, argrepr='to L10', offset=424, start_offset=424, starts_line=False, line_number=23, label=None, positions=None, cache_info=None),
|
Instruction(opname='JUMP_BACKWARD_NO_INTERRUPT', opcode=75, arg=56, argval=314, argrepr='to L10', offset=424, start_offset=424, starts_line=False, line_number=23, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='RERAISE', opcode=102, arg=0, argval=0, argrepr='', offset=426, start_offset=426, starts_line=True, line_number=22, label=12, positions=None, cache_info=None),
|
Instruction(opname='RERAISE', opcode=102, arg=0, argval=0, argrepr='', offset=426, start_offset=426, starts_line=True, line_number=22, label=12, positions=None, cache_info=None),
|
||||||
Instruction(opname='COPY', opcode=59, arg=3, argval=3, argrepr='', offset=428, start_offset=428, starts_line=True, line_number=None, label=None, positions=None, cache_info=None),
|
Instruction(opname='COPY', opcode=59, arg=3, argval=3, argrepr='', offset=428, start_offset=428, starts_line=True, line_number=None, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='POP_EXCEPT', opcode=29, arg=None, argval=None, argrepr='', offset=430, start_offset=430, starts_line=False, line_number=None, label=None, positions=None, cache_info=None),
|
Instruction(opname='POP_EXCEPT', opcode=30, arg=None, argval=None, argrepr='', offset=430, start_offset=430, starts_line=False, line_number=None, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='RERAISE', opcode=102, arg=1, argval=1, argrepr='', offset=432, start_offset=432, starts_line=False, line_number=None, label=None, positions=None, cache_info=None),
|
Instruction(opname='RERAISE', opcode=102, arg=1, argval=1, argrepr='', offset=432, start_offset=432, starts_line=False, line_number=None, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='PUSH_EXC_INFO', opcode=32, arg=None, argval=None, argrepr='', offset=434, start_offset=434, starts_line=False, line_number=None, label=None, positions=None, cache_info=None),
|
Instruction(opname='PUSH_EXC_INFO', opcode=33, arg=None, argval=None, argrepr='', offset=434, start_offset=434, starts_line=False, line_number=None, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='LOAD_GLOBAL', opcode=89, arg=3, argval='print', argrepr='print + NULL', offset=436, start_offset=436, starts_line=True, line_number=28, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('index', 1, b'\x00\x00'), ('module_keys_version', 1, b'\x00\x00'), ('builtin_keys_version', 1, b'\x00\x00')]),
|
Instruction(opname='LOAD_GLOBAL', opcode=89, arg=3, argval='print', argrepr='print + NULL', offset=436, start_offset=436, starts_line=True, line_number=28, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('index', 1, b'\x00\x00'), ('module_keys_version', 1, b'\x00\x00'), ('builtin_keys_version', 1, b'\x00\x00')]),
|
||||||
Instruction(opname='LOAD_CONST', opcode=81, arg=5, argval="OK, now we're done", argrepr='"OK, now we\'re done"', offset=446, start_offset=446, starts_line=False, line_number=28, label=None, positions=None, cache_info=None),
|
Instruction(opname='LOAD_CONST', opcode=81, arg=5, argval="OK, now we're done", argrepr='"OK, now we\'re done"', offset=446, start_offset=446, starts_line=False, line_number=28, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='CALL', opcode=51, arg=1, argval=1, argrepr='', offset=448, start_offset=448, starts_line=False, line_number=28, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
Instruction(opname='CALL', opcode=52, arg=1, argval=1, argrepr='', offset=448, start_offset=448, starts_line=False, line_number=28, label=None, positions=None, cache_info=[('counter', 1, b'\x00\x00'), ('func_version', 2, b'\x00\x00\x00\x00')]),
|
||||||
Instruction(opname='POP_TOP', opcode=31, arg=None, argval=None, argrepr='', offset=456, start_offset=456, starts_line=False, line_number=28, label=None, positions=None, cache_info=None),
|
Instruction(opname='POP_TOP', opcode=32, arg=None, argval=None, argrepr='', offset=456, start_offset=456, starts_line=False, line_number=28, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='RERAISE', opcode=102, arg=0, argval=0, argrepr='', offset=458, start_offset=458, starts_line=False, line_number=28, label=None, positions=None, cache_info=None),
|
Instruction(opname='RERAISE', opcode=102, arg=0, argval=0, argrepr='', offset=458, start_offset=458, starts_line=False, line_number=28, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='COPY', opcode=59, arg=3, argval=3, argrepr='', offset=460, start_offset=460, starts_line=True, line_number=None, label=None, positions=None, cache_info=None),
|
Instruction(opname='COPY', opcode=59, arg=3, argval=3, argrepr='', offset=460, start_offset=460, starts_line=True, line_number=None, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='POP_EXCEPT', opcode=29, arg=None, argval=None, argrepr='', offset=462, start_offset=462, starts_line=False, line_number=None, label=None, positions=None, cache_info=None),
|
Instruction(opname='POP_EXCEPT', opcode=30, arg=None, argval=None, argrepr='', offset=462, start_offset=462, starts_line=False, line_number=None, label=None, positions=None, cache_info=None),
|
||||||
Instruction(opname='RERAISE', opcode=102, arg=1, argval=1, argrepr='', offset=464, start_offset=464, starts_line=False, line_number=None, label=None, positions=None, cache_info=None),
|
Instruction(opname='RERAISE', opcode=102, arg=1, argval=1, argrepr='', offset=464, start_offset=464, starts_line=False, line_number=None, label=None, positions=None, cache_info=None),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1909,7 +1909,7 @@ def simple(): pass
|
||||||
expected_opinfo_simple = [
|
expected_opinfo_simple = [
|
||||||
Instruction(opname='RESUME', opcode=149, arg=0, argval=0, argrepr='', offset=0, start_offset=0, starts_line=True, line_number=simple.__code__.co_firstlineno, label=None, positions=None),
|
Instruction(opname='RESUME', opcode=149, arg=0, argval=0, argrepr='', offset=0, start_offset=0, starts_line=True, line_number=simple.__code__.co_firstlineno, label=None, positions=None),
|
||||||
Instruction(opname='LOAD_CONST', opcode=81, arg=0, argval=None, argrepr='None', offset=2, start_offset=2, starts_line=False, line_number=simple.__code__.co_firstlineno, label=None),
|
Instruction(opname='LOAD_CONST', opcode=81, arg=0, argval=None, argrepr='None', offset=2, start_offset=2, starts_line=False, line_number=simple.__code__.co_firstlineno, label=None),
|
||||||
Instruction(opname='RETURN_VALUE', opcode=35, arg=None, argval=None, argrepr='', offset=4, start_offset=4, starts_line=False, line_number=simple.__code__.co_firstlineno, label=None),
|
Instruction(opname='RETURN_VALUE', opcode=36, arg=None, argval=None, argrepr='', offset=4, start_offset=4, starts_line=False, line_number=simple.__code__.co_firstlineno, label=None),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
20
Programs/test_frozenmain.h
generated
20
Programs/test_frozenmain.h
generated
|
@ -2,17 +2,17 @@
|
||||||
unsigned char M_test_frozenmain[] = {
|
unsigned char M_test_frozenmain[] = {
|
||||||
227,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,
|
227,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,
|
||||||
0,0,0,0,0,243,168,0,0,0,149,0,91,0,81,0,
|
0,0,0,0,0,243,168,0,0,0,149,0,91,0,81,0,
|
||||||
72,0,113,0,91,0,81,0,72,1,113,1,90,2,33,0,
|
72,0,113,0,91,0,81,0,72,1,113,1,90,2,34,0,
|
||||||
81,1,51,1,0,0,0,0,0,0,31,0,90,2,33,0,
|
81,1,52,1,0,0,0,0,0,0,32,0,90,2,34,0,
|
||||||
81,2,90,0,79,6,0,0,0,0,0,0,0,0,0,0,
|
81,2,90,0,79,6,0,0,0,0,0,0,0,0,0,0,
|
||||||
0,0,0,0,0,0,0,0,51,2,0,0,0,0,0,0,
|
0,0,0,0,0,0,0,0,52,2,0,0,0,0,0,0,
|
||||||
31,0,90,1,79,8,0,0,0,0,0,0,0,0,0,0,
|
32,0,90,1,79,8,0,0,0,0,0,0,0,0,0,0,
|
||||||
0,0,0,0,0,0,0,0,33,0,51,0,0,0,0,0,
|
0,0,0,0,0,0,0,0,34,0,52,0,0,0,0,0,
|
||||||
0,0,81,3,2,0,0,0,113,5,81,4,16,0,69,20,
|
0,0,81,3,2,0,0,0,113,5,81,4,18,0,69,20,
|
||||||
0,0,113,6,90,2,33,0,81,5,90,6,12,0,81,6,
|
0,0,113,6,90,2,34,0,81,5,90,6,13,0,81,6,
|
||||||
90,5,90,6,2,0,0,0,12,0,49,4,51,1,0,0,
|
90,5,90,6,2,0,0,0,13,0,50,4,52,1,0,0,
|
||||||
0,0,0,0,31,0,74,22,0,0,9,0,30,0,81,0,
|
0,0,0,0,32,0,74,22,0,0,10,0,31,0,81,0,
|
||||||
35,0,41,7,78,122,18,70,114,111,122,101,110,32,72,101,
|
36,0,41,7,78,122,18,70,114,111,122,101,110,32,72,101,
|
||||||
108,108,111,32,87,111,114,108,100,122,8,115,121,115,46,97,
|
108,108,111,32,87,111,114,108,100,122,8,115,121,115,46,97,
|
||||||
114,103,118,218,6,99,111,110,102,105,103,41,5,218,12,112,
|
114,103,118,218,6,99,111,110,102,105,103,41,5,218,12,112,
|
||||||
114,111,103,114,97,109,95,110,97,109,101,218,10,101,120,101,
|
114,111,103,114,97,109,95,110,97,109,101,218,10,101,120,101,
|
||||||
|
|
|
@ -1665,10 +1665,13 @@ dummy_func(
|
||||||
}
|
}
|
||||||
|
|
||||||
// res[1] because we need a pointer to res to pass it to _PyEval_LoadGlobalStackRef
|
// res[1] because we need a pointer to res to pass it to _PyEval_LoadGlobalStackRef
|
||||||
op(_LOAD_GLOBAL, ( -- res[1], null if (oparg & 1))) {
|
op(_LOAD_GLOBAL, ( -- res[1])) {
|
||||||
PyObject *name = GETITEM(FRAME_CO_NAMES, oparg>>1);
|
PyObject *name = GETITEM(FRAME_CO_NAMES, oparg>>1);
|
||||||
_PyEval_LoadGlobalStackRef(GLOBALS(), BUILTINS(), name, res);
|
_PyEval_LoadGlobalStackRef(GLOBALS(), BUILTINS(), name, res);
|
||||||
ERROR_IF(PyStackRef_IsNull(*res), error);
|
ERROR_IF(PyStackRef_IsNull(*res), error);
|
||||||
|
}
|
||||||
|
|
||||||
|
op(_PUSH_NULL_CONDITIONAL, ( -- null if (oparg & 1))) {
|
||||||
null = PyStackRef_NULL;
|
null = PyStackRef_NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1677,7 +1680,8 @@ dummy_func(
|
||||||
counter/1 +
|
counter/1 +
|
||||||
globals_version/1 +
|
globals_version/1 +
|
||||||
builtins_version/1 +
|
builtins_version/1 +
|
||||||
_LOAD_GLOBAL;
|
_LOAD_GLOBAL +
|
||||||
|
_PUSH_NULL_CONDITIONAL;
|
||||||
|
|
||||||
op(_GUARD_GLOBALS_VERSION, (version/1 --)) {
|
op(_GUARD_GLOBALS_VERSION, (version/1 --)) {
|
||||||
PyDictObject *dict = (PyDictObject *)GLOBALS();
|
PyDictObject *dict = (PyDictObject *)GLOBALS();
|
||||||
|
@ -1707,7 +1711,7 @@ dummy_func(
|
||||||
assert(DK_IS_UNICODE(builtins_keys));
|
assert(DK_IS_UNICODE(builtins_keys));
|
||||||
}
|
}
|
||||||
|
|
||||||
op(_LOAD_GLOBAL_MODULE_FROM_KEYS, (index/1, globals_keys: PyDictKeysObject* -- res, null if (oparg & 1))) {
|
op(_LOAD_GLOBAL_MODULE_FROM_KEYS, (index/1, globals_keys: PyDictKeysObject* -- res)) {
|
||||||
PyDictUnicodeEntry *entries = DK_UNICODE_ENTRIES(globals_keys);
|
PyDictUnicodeEntry *entries = DK_UNICODE_ENTRIES(globals_keys);
|
||||||
PyObject *res_o = FT_ATOMIC_LOAD_PTR_RELAXED(entries[index].me_value);
|
PyObject *res_o = FT_ATOMIC_LOAD_PTR_RELAXED(entries[index].me_value);
|
||||||
DEAD(globals_keys);
|
DEAD(globals_keys);
|
||||||
|
@ -1721,10 +1725,9 @@ dummy_func(
|
||||||
res = PyStackRef_FromPyObjectSteal(res_o);
|
res = PyStackRef_FromPyObjectSteal(res_o);
|
||||||
#endif
|
#endif
|
||||||
STAT_INC(LOAD_GLOBAL, hit);
|
STAT_INC(LOAD_GLOBAL, hit);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
op(_LOAD_GLOBAL_BUILTINS_FROM_KEYS, (index/1, builtins_keys: PyDictKeysObject* -- res, null if (oparg & 1))) {
|
op(_LOAD_GLOBAL_BUILTINS_FROM_KEYS, (index/1, builtins_keys: PyDictKeysObject* -- res)) {
|
||||||
PyDictUnicodeEntry *entries = DK_UNICODE_ENTRIES(builtins_keys);
|
PyDictUnicodeEntry *entries = DK_UNICODE_ENTRIES(builtins_keys);
|
||||||
PyObject *res_o = FT_ATOMIC_LOAD_PTR_RELAXED(entries[index].me_value);
|
PyObject *res_o = FT_ATOMIC_LOAD_PTR_RELAXED(entries[index].me_value);
|
||||||
DEAD(builtins_keys);
|
DEAD(builtins_keys);
|
||||||
|
@ -1738,20 +1741,21 @@ dummy_func(
|
||||||
res = PyStackRef_FromPyObjectSteal(res_o);
|
res = PyStackRef_FromPyObjectSteal(res_o);
|
||||||
#endif
|
#endif
|
||||||
STAT_INC(LOAD_GLOBAL, hit);
|
STAT_INC(LOAD_GLOBAL, hit);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
macro(LOAD_GLOBAL_MODULE) =
|
macro(LOAD_GLOBAL_MODULE) =
|
||||||
unused/1 + // Skip over the counter
|
unused/1 + // Skip over the counter
|
||||||
_GUARD_GLOBALS_VERSION_PUSH_KEYS +
|
_GUARD_GLOBALS_VERSION_PUSH_KEYS +
|
||||||
unused/1 + // Skip over the builtins version
|
unused/1 + // Skip over the builtins version
|
||||||
_LOAD_GLOBAL_MODULE_FROM_KEYS;
|
_LOAD_GLOBAL_MODULE_FROM_KEYS +
|
||||||
|
_PUSH_NULL_CONDITIONAL;
|
||||||
|
|
||||||
macro(LOAD_GLOBAL_BUILTIN) =
|
macro(LOAD_GLOBAL_BUILTIN) =
|
||||||
unused/1 + // Skip over the counter
|
unused/1 + // Skip over the counter
|
||||||
_GUARD_GLOBALS_VERSION +
|
_GUARD_GLOBALS_VERSION +
|
||||||
_GUARD_BUILTINS_VERSION_PUSH_KEYS +
|
_GUARD_BUILTINS_VERSION_PUSH_KEYS +
|
||||||
_LOAD_GLOBAL_BUILTINS_FROM_KEYS;
|
_LOAD_GLOBAL_BUILTINS_FROM_KEYS +
|
||||||
|
_PUSH_NULL_CONDITIONAL;
|
||||||
|
|
||||||
inst(DELETE_FAST, (--)) {
|
inst(DELETE_FAST, (--)) {
|
||||||
_PyStackRef v = GETLOCAL(oparg);
|
_PyStackRef v = GETLOCAL(oparg);
|
||||||
|
@ -2030,7 +2034,7 @@ dummy_func(
|
||||||
#endif /* ENABLE_SPECIALIZATION_FT */
|
#endif /* ENABLE_SPECIALIZATION_FT */
|
||||||
}
|
}
|
||||||
|
|
||||||
tier1 op(_LOAD_SUPER_ATTR, (global_super_st, class_st, self_st -- attr, null if (oparg & 1))) {
|
tier1 op(_LOAD_SUPER_ATTR, (global_super_st, class_st, self_st -- attr)) {
|
||||||
PyObject *global_super = PyStackRef_AsPyObjectBorrow(global_super_st);
|
PyObject *global_super = PyStackRef_AsPyObjectBorrow(global_super_st);
|
||||||
PyObject *class = PyStackRef_AsPyObjectBorrow(class_st);
|
PyObject *class = PyStackRef_AsPyObjectBorrow(class_st);
|
||||||
PyObject *self = PyStackRef_AsPyObjectBorrow(self_st);
|
PyObject *self = PyStackRef_AsPyObjectBorrow(self_st);
|
||||||
|
@ -2072,12 +2076,11 @@ dummy_func(
|
||||||
Py_DECREF(super);
|
Py_DECREF(super);
|
||||||
ERROR_IF(attr_o == NULL, error);
|
ERROR_IF(attr_o == NULL, error);
|
||||||
attr = PyStackRef_FromPyObjectSteal(attr_o);
|
attr = PyStackRef_FromPyObjectSteal(attr_o);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
macro(LOAD_SUPER_ATTR) = _SPECIALIZE_LOAD_SUPER_ATTR + _LOAD_SUPER_ATTR;
|
macro(LOAD_SUPER_ATTR) = _SPECIALIZE_LOAD_SUPER_ATTR + _LOAD_SUPER_ATTR + _PUSH_NULL_CONDITIONAL;
|
||||||
|
|
||||||
inst(LOAD_SUPER_ATTR_ATTR, (unused/1, global_super_st, class_st, self_st -- attr_st, unused if (0))) {
|
inst(LOAD_SUPER_ATTR_ATTR, (unused/1, global_super_st, class_st, self_st -- attr_st)) {
|
||||||
PyObject *global_super = PyStackRef_AsPyObjectBorrow(global_super_st);
|
PyObject *global_super = PyStackRef_AsPyObjectBorrow(global_super_st);
|
||||||
PyObject *class = PyStackRef_AsPyObjectBorrow(class_st);
|
PyObject *class = PyStackRef_AsPyObjectBorrow(class_st);
|
||||||
PyObject *self = PyStackRef_AsPyObjectBorrow(self_st);
|
PyObject *self = PyStackRef_AsPyObjectBorrow(self_st);
|
||||||
|
@ -2152,7 +2155,7 @@ dummy_func(
|
||||||
#endif /* ENABLE_SPECIALIZATION_FT */
|
#endif /* ENABLE_SPECIALIZATION_FT */
|
||||||
}
|
}
|
||||||
|
|
||||||
op(_LOAD_ATTR, (owner -- attr, self_or_null if (oparg & 1))) {
|
op(_LOAD_ATTR, (owner -- attr, self_or_null[oparg&1])) {
|
||||||
PyObject *name = GETITEM(FRAME_CO_NAMES, oparg >> 1);
|
PyObject *name = GETITEM(FRAME_CO_NAMES, oparg >> 1);
|
||||||
PyObject *attr_o;
|
PyObject *attr_o;
|
||||||
if (oparg & 1) {
|
if (oparg & 1) {
|
||||||
|
@ -2165,7 +2168,7 @@ dummy_func(
|
||||||
meth | self | arg1 | ... | argN
|
meth | self | arg1 | ... | argN
|
||||||
*/
|
*/
|
||||||
assert(attr_o != NULL); // No errors on this branch
|
assert(attr_o != NULL); // No errors on this branch
|
||||||
self_or_null = owner; // Transfer ownership
|
self_or_null[0] = owner; // Transfer ownership
|
||||||
DEAD(owner);
|
DEAD(owner);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -2177,7 +2180,7 @@ dummy_func(
|
||||||
*/
|
*/
|
||||||
DECREF_INPUTS();
|
DECREF_INPUTS();
|
||||||
ERROR_IF(attr_o == NULL, error);
|
ERROR_IF(attr_o == NULL, error);
|
||||||
self_or_null = PyStackRef_NULL;
|
self_or_null[0] = PyStackRef_NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -2185,12 +2188,11 @@ dummy_func(
|
||||||
attr_o = PyObject_GetAttr(PyStackRef_AsPyObjectBorrow(owner), name);
|
attr_o = PyObject_GetAttr(PyStackRef_AsPyObjectBorrow(owner), name);
|
||||||
DECREF_INPUTS();
|
DECREF_INPUTS();
|
||||||
ERROR_IF(attr_o == NULL, error);
|
ERROR_IF(attr_o == NULL, error);
|
||||||
/* We need to define self_or_null on all paths */
|
|
||||||
self_or_null = PyStackRef_NULL;
|
|
||||||
}
|
}
|
||||||
attr = PyStackRef_FromPyObjectSteal(attr_o);
|
attr = PyStackRef_FromPyObjectSteal(attr_o);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
macro(LOAD_ATTR) =
|
macro(LOAD_ATTR) =
|
||||||
_SPECIALIZE_LOAD_ATTR +
|
_SPECIALIZE_LOAD_ATTR +
|
||||||
unused/8 +
|
unused/8 +
|
||||||
|
@ -2220,7 +2222,7 @@ dummy_func(
|
||||||
DEOPT_IF(!FT_ATOMIC_LOAD_UINT8(_PyObject_InlineValues(owner_o)->valid));
|
DEOPT_IF(!FT_ATOMIC_LOAD_UINT8(_PyObject_InlineValues(owner_o)->valid));
|
||||||
}
|
}
|
||||||
|
|
||||||
split op(_LOAD_ATTR_INSTANCE_VALUE, (offset/1, owner -- attr, null if (oparg & 1))) {
|
op(_LOAD_ATTR_INSTANCE_VALUE, (offset/1, owner -- attr)) {
|
||||||
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
|
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
|
||||||
PyObject **value_ptr = (PyObject**)(((char *)owner_o) + offset);
|
PyObject **value_ptr = (PyObject**)(((char *)owner_o) + offset);
|
||||||
PyObject *attr_o = FT_ATOMIC_LOAD_PTR_ACQUIRE(*value_ptr);
|
PyObject *attr_o = FT_ATOMIC_LOAD_PTR_ACQUIRE(*value_ptr);
|
||||||
|
@ -2233,7 +2235,6 @@ dummy_func(
|
||||||
attr = PyStackRef_FromPyObjectNew(attr_o);
|
attr = PyStackRef_FromPyObjectNew(attr_o);
|
||||||
#endif
|
#endif
|
||||||
STAT_INC(LOAD_ATTR, hit);
|
STAT_INC(LOAD_ATTR, hit);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
DECREF_INPUTS();
|
DECREF_INPUTS();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2242,7 +2243,8 @@ dummy_func(
|
||||||
_GUARD_TYPE_VERSION +
|
_GUARD_TYPE_VERSION +
|
||||||
_CHECK_MANAGED_OBJECT_HAS_VALUES +
|
_CHECK_MANAGED_OBJECT_HAS_VALUES +
|
||||||
_LOAD_ATTR_INSTANCE_VALUE +
|
_LOAD_ATTR_INSTANCE_VALUE +
|
||||||
unused/5; // Skip over rest of cache
|
unused/5 +
|
||||||
|
_PUSH_NULL_CONDITIONAL;
|
||||||
|
|
||||||
op(_CHECK_ATTR_MODULE_PUSH_KEYS, (dict_version/2, owner -- owner, mod_keys: PyDictKeysObject *)) {
|
op(_CHECK_ATTR_MODULE_PUSH_KEYS, (dict_version/2, owner -- owner, mod_keys: PyDictKeysObject *)) {
|
||||||
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
|
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
|
||||||
|
@ -2254,7 +2256,7 @@ dummy_func(
|
||||||
mod_keys = keys;
|
mod_keys = keys;
|
||||||
}
|
}
|
||||||
|
|
||||||
op(_LOAD_ATTR_MODULE_FROM_KEYS, (index/1, owner, mod_keys: PyDictKeysObject * -- attr, null if (oparg & 1))) {
|
op(_LOAD_ATTR_MODULE_FROM_KEYS, (index/1, owner, mod_keys: PyDictKeysObject * -- attr)) {
|
||||||
assert(mod_keys->dk_kind == DICT_KEYS_UNICODE);
|
assert(mod_keys->dk_kind == DICT_KEYS_UNICODE);
|
||||||
assert(index < FT_ATOMIC_LOAD_SSIZE_RELAXED(mod_keys->dk_nentries));
|
assert(index < FT_ATOMIC_LOAD_SSIZE_RELAXED(mod_keys->dk_nentries));
|
||||||
PyDictUnicodeEntry *ep = DK_UNICODE_ENTRIES(mod_keys) + index;
|
PyDictUnicodeEntry *ep = DK_UNICODE_ENTRIES(mod_keys) + index;
|
||||||
|
@ -2272,7 +2274,6 @@ dummy_func(
|
||||||
attr = PyStackRef_FromPyObjectSteal(attr_o);
|
attr = PyStackRef_FromPyObjectSteal(attr_o);
|
||||||
#endif
|
#endif
|
||||||
STAT_INC(LOAD_ATTR, hit);
|
STAT_INC(LOAD_ATTR, hit);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
PyStackRef_CLOSE(owner);
|
PyStackRef_CLOSE(owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2280,7 +2281,8 @@ dummy_func(
|
||||||
unused/1 +
|
unused/1 +
|
||||||
_CHECK_ATTR_MODULE_PUSH_KEYS +
|
_CHECK_ATTR_MODULE_PUSH_KEYS +
|
||||||
_LOAD_ATTR_MODULE_FROM_KEYS +
|
_LOAD_ATTR_MODULE_FROM_KEYS +
|
||||||
unused/5;
|
unused/5 +
|
||||||
|
_PUSH_NULL_CONDITIONAL;
|
||||||
|
|
||||||
op(_CHECK_ATTR_WITH_HINT, (owner -- owner, dict: PyDictObject *)) {
|
op(_CHECK_ATTR_WITH_HINT, (owner -- owner, dict: PyDictObject *)) {
|
||||||
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
|
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
|
||||||
|
@ -2292,7 +2294,7 @@ dummy_func(
|
||||||
dict = dict_o;
|
dict = dict_o;
|
||||||
}
|
}
|
||||||
|
|
||||||
op(_LOAD_ATTR_WITH_HINT, (hint/1, owner, dict: PyDictObject * -- attr, null if (oparg & 1))) {
|
op(_LOAD_ATTR_WITH_HINT, (hint/1, owner, dict: PyDictObject * -- attr)) {
|
||||||
PyObject *attr_o;
|
PyObject *attr_o;
|
||||||
if (!LOCK_OBJECT(dict)) {
|
if (!LOCK_OBJECT(dict)) {
|
||||||
POP_INPUT(dict);
|
POP_INPUT(dict);
|
||||||
|
@ -2326,7 +2328,6 @@ dummy_func(
|
||||||
attr = PyStackRef_FromPyObjectNew(attr_o);
|
attr = PyStackRef_FromPyObjectNew(attr_o);
|
||||||
UNLOCK_OBJECT(dict);
|
UNLOCK_OBJECT(dict);
|
||||||
DEAD(dict);
|
DEAD(dict);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
DECREF_INPUTS();
|
DECREF_INPUTS();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2335,9 +2336,10 @@ dummy_func(
|
||||||
_GUARD_TYPE_VERSION +
|
_GUARD_TYPE_VERSION +
|
||||||
_CHECK_ATTR_WITH_HINT +
|
_CHECK_ATTR_WITH_HINT +
|
||||||
_LOAD_ATTR_WITH_HINT +
|
_LOAD_ATTR_WITH_HINT +
|
||||||
unused/5;
|
unused/5 +
|
||||||
|
_PUSH_NULL_CONDITIONAL;
|
||||||
|
|
||||||
split op(_LOAD_ATTR_SLOT, (index/1, owner -- attr, null if (oparg & 1))) {
|
op(_LOAD_ATTR_SLOT, (index/1, owner -- attr)) {
|
||||||
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
|
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
|
||||||
|
|
||||||
PyObject **addr = (PyObject **)((char *)owner_o + index);
|
PyObject **addr = (PyObject **)((char *)owner_o + index);
|
||||||
|
@ -2350,7 +2352,6 @@ dummy_func(
|
||||||
attr = PyStackRef_FromPyObjectNew(attr_o);
|
attr = PyStackRef_FromPyObjectNew(attr_o);
|
||||||
#endif
|
#endif
|
||||||
STAT_INC(LOAD_ATTR, hit);
|
STAT_INC(LOAD_ATTR, hit);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
DECREF_INPUTS();
|
DECREF_INPUTS();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2358,7 +2359,8 @@ dummy_func(
|
||||||
unused/1 +
|
unused/1 +
|
||||||
_GUARD_TYPE_VERSION +
|
_GUARD_TYPE_VERSION +
|
||||||
_LOAD_ATTR_SLOT + // NOTE: This action may also deopt
|
_LOAD_ATTR_SLOT + // NOTE: This action may also deopt
|
||||||
unused/5;
|
unused/5 +
|
||||||
|
_PUSH_NULL_CONDITIONAL;
|
||||||
|
|
||||||
op(_CHECK_ATTR_CLASS, (type_version/2, owner -- owner)) {
|
op(_CHECK_ATTR_CLASS, (type_version/2, owner -- owner)) {
|
||||||
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
|
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
|
||||||
|
@ -2368,11 +2370,10 @@ dummy_func(
|
||||||
EXIT_IF(FT_ATOMIC_LOAD_UINT_RELAXED(((PyTypeObject *)owner_o)->tp_version_tag) != type_version);
|
EXIT_IF(FT_ATOMIC_LOAD_UINT_RELAXED(((PyTypeObject *)owner_o)->tp_version_tag) != type_version);
|
||||||
}
|
}
|
||||||
|
|
||||||
split op(_LOAD_ATTR_CLASS, (descr/4, owner -- attr, null if (oparg & 1))) {
|
op(_LOAD_ATTR_CLASS, (descr/4, owner -- attr)) {
|
||||||
STAT_INC(LOAD_ATTR, hit);
|
STAT_INC(LOAD_ATTR, hit);
|
||||||
assert(descr != NULL);
|
assert(descr != NULL);
|
||||||
attr = PyStackRef_FromPyObjectNew(descr);
|
attr = PyStackRef_FromPyObjectNew(descr);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
DECREF_INPUTS();
|
DECREF_INPUTS();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2380,13 +2381,15 @@ dummy_func(
|
||||||
unused/1 +
|
unused/1 +
|
||||||
_CHECK_ATTR_CLASS +
|
_CHECK_ATTR_CLASS +
|
||||||
unused/2 +
|
unused/2 +
|
||||||
_LOAD_ATTR_CLASS;
|
_LOAD_ATTR_CLASS +
|
||||||
|
_PUSH_NULL_CONDITIONAL;
|
||||||
|
|
||||||
macro(LOAD_ATTR_CLASS_WITH_METACLASS_CHECK) =
|
macro(LOAD_ATTR_CLASS_WITH_METACLASS_CHECK) =
|
||||||
unused/1 +
|
unused/1 +
|
||||||
_CHECK_ATTR_CLASS +
|
_CHECK_ATTR_CLASS +
|
||||||
_GUARD_TYPE_VERSION +
|
_GUARD_TYPE_VERSION +
|
||||||
_LOAD_ATTR_CLASS;
|
_LOAD_ATTR_CLASS +
|
||||||
|
_PUSH_NULL_CONDITIONAL;
|
||||||
|
|
||||||
op(_LOAD_ATTR_PROPERTY_FRAME, (fget/4, owner -- new_frame: _PyInterpreterFrame *)) {
|
op(_LOAD_ATTR_PROPERTY_FRAME, (fget/4, owner -- new_frame: _PyInterpreterFrame *)) {
|
||||||
assert((oparg & 1) == 0);
|
assert((oparg & 1) == 0);
|
||||||
|
@ -2412,7 +2415,7 @@ dummy_func(
|
||||||
_SAVE_RETURN_OFFSET +
|
_SAVE_RETURN_OFFSET +
|
||||||
_PUSH_FRAME;
|
_PUSH_FRAME;
|
||||||
|
|
||||||
inst(LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN, (unused/1, type_version/2, func_version/2, getattribute/4, owner -- unused, unused if (0))) {
|
inst(LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN, (unused/1, type_version/2, func_version/2, getattribute/4, owner -- unused)) {
|
||||||
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
|
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
|
||||||
|
|
||||||
assert((oparg & 1) == 0);
|
assert((oparg & 1) == 0);
|
||||||
|
@ -3348,7 +3351,7 @@ dummy_func(
|
||||||
DEOPT_IF(FT_ATOMIC_LOAD_UINT32_RELAXED(keys->dk_version) != keys_version);
|
DEOPT_IF(FT_ATOMIC_LOAD_UINT32_RELAXED(keys->dk_version) != keys_version);
|
||||||
}
|
}
|
||||||
|
|
||||||
split op(_LOAD_ATTR_METHOD_WITH_VALUES, (descr/4, owner -- attr, self if (1))) {
|
op(_LOAD_ATTR_METHOD_WITH_VALUES, (descr/4, owner -- attr, self)) {
|
||||||
assert(oparg & 1);
|
assert(oparg & 1);
|
||||||
/* Cached method object */
|
/* Cached method object */
|
||||||
STAT_INC(LOAD_ATTR, hit);
|
STAT_INC(LOAD_ATTR, hit);
|
||||||
|
@ -3366,7 +3369,7 @@ dummy_func(
|
||||||
_GUARD_KEYS_VERSION +
|
_GUARD_KEYS_VERSION +
|
||||||
_LOAD_ATTR_METHOD_WITH_VALUES;
|
_LOAD_ATTR_METHOD_WITH_VALUES;
|
||||||
|
|
||||||
op(_LOAD_ATTR_METHOD_NO_DICT, (descr/4, owner -- attr, self if (1))) {
|
op(_LOAD_ATTR_METHOD_NO_DICT, (descr/4, owner -- attr, self)) {
|
||||||
assert(oparg & 1);
|
assert(oparg & 1);
|
||||||
assert(Py_TYPE(PyStackRef_AsPyObjectBorrow(owner))->tp_dictoffset == 0);
|
assert(Py_TYPE(PyStackRef_AsPyObjectBorrow(owner))->tp_dictoffset == 0);
|
||||||
STAT_INC(LOAD_ATTR, hit);
|
STAT_INC(LOAD_ATTR, hit);
|
||||||
|
@ -3383,7 +3386,7 @@ dummy_func(
|
||||||
unused/2 +
|
unused/2 +
|
||||||
_LOAD_ATTR_METHOD_NO_DICT;
|
_LOAD_ATTR_METHOD_NO_DICT;
|
||||||
|
|
||||||
op(_LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES, (descr/4, owner -- attr, unused if (0))) {
|
op(_LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES, (descr/4, owner -- attr)) {
|
||||||
assert((oparg & 1) == 0);
|
assert((oparg & 1) == 0);
|
||||||
STAT_INC(LOAD_ATTR, hit);
|
STAT_INC(LOAD_ATTR, hit);
|
||||||
assert(descr != NULL);
|
assert(descr != NULL);
|
||||||
|
@ -3398,7 +3401,7 @@ dummy_func(
|
||||||
_GUARD_KEYS_VERSION +
|
_GUARD_KEYS_VERSION +
|
||||||
_LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES;
|
_LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES;
|
||||||
|
|
||||||
op(_LOAD_ATTR_NONDESCRIPTOR_NO_DICT, (descr/4, owner -- attr, unused if (0))) {
|
op(_LOAD_ATTR_NONDESCRIPTOR_NO_DICT, (descr/4, owner -- attr)) {
|
||||||
assert((oparg & 1) == 0);
|
assert((oparg & 1) == 0);
|
||||||
assert(Py_TYPE(PyStackRef_AsPyObjectBorrow(owner))->tp_dictoffset == 0);
|
assert(Py_TYPE(PyStackRef_AsPyObjectBorrow(owner))->tp_dictoffset == 0);
|
||||||
STAT_INC(LOAD_ATTR, hit);
|
STAT_INC(LOAD_ATTR, hit);
|
||||||
|
@ -3420,7 +3423,7 @@ dummy_func(
|
||||||
DEOPT_IF(dict != NULL);
|
DEOPT_IF(dict != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
op(_LOAD_ATTR_METHOD_LAZY_DICT, (descr/4, owner -- attr, self if (1))) {
|
op(_LOAD_ATTR_METHOD_LAZY_DICT, (descr/4, owner -- attr, self)) {
|
||||||
assert(oparg & 1);
|
assert(oparg & 1);
|
||||||
STAT_INC(LOAD_ATTR, hit);
|
STAT_INC(LOAD_ATTR, hit);
|
||||||
assert(descr != NULL);
|
assert(descr != NULL);
|
||||||
|
@ -4537,7 +4540,7 @@ dummy_func(
|
||||||
GO_TO_INSTRUCTION(CALL_FUNCTION_EX);
|
GO_TO_INSTRUCTION(CALL_FUNCTION_EX);
|
||||||
}
|
}
|
||||||
|
|
||||||
op(_MAKE_CALLARGS_A_TUPLE, (func, unused, callargs, kwargs_in if (oparg & 1) -- func, unused, tuple, kwargs_out if (oparg & 1))) {
|
op(_MAKE_CALLARGS_A_TUPLE, (func, unused, callargs, kwargs_in -- func, unused, tuple, kwargs_out)) {
|
||||||
PyObject *callargs_o = PyStackRef_AsPyObjectBorrow(callargs);
|
PyObject *callargs_o = PyStackRef_AsPyObjectBorrow(callargs);
|
||||||
if (PyTuple_CheckExact(callargs_o)) {
|
if (PyTuple_CheckExact(callargs_o)) {
|
||||||
tuple = callargs;
|
tuple = callargs;
|
||||||
|
@ -4561,7 +4564,7 @@ dummy_func(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
op(_DO_CALL_FUNCTION_EX, (func_st, unused, callargs_st, kwargs_st if (oparg & 1) -- result)) {
|
op(_DO_CALL_FUNCTION_EX, (func_st, unused, callargs_st, kwargs_st -- result)) {
|
||||||
PyObject *func = PyStackRef_AsPyObjectBorrow(func_st);
|
PyObject *func = PyStackRef_AsPyObjectBorrow(func_st);
|
||||||
|
|
||||||
// DICT_MERGE is called before this opcode if there are kwargs.
|
// DICT_MERGE is called before this opcode if there are kwargs.
|
||||||
|
@ -4695,11 +4698,10 @@ dummy_func(
|
||||||
LLTRACE_RESUME_FRAME();
|
LLTRACE_RESUME_FRAME();
|
||||||
}
|
}
|
||||||
|
|
||||||
inst(BUILD_SLICE, (start, stop, step if (oparg == 3) -- slice)) {
|
inst(BUILD_SLICE, (args[oparg] -- slice)) {
|
||||||
PyObject *start_o = PyStackRef_AsPyObjectBorrow(start);
|
PyObject *start_o = PyStackRef_AsPyObjectBorrow(args[0]);
|
||||||
PyObject *stop_o = PyStackRef_AsPyObjectBorrow(stop);
|
PyObject *stop_o = PyStackRef_AsPyObjectBorrow(args[1]);
|
||||||
PyObject *step_o = PyStackRef_AsPyObjectBorrow(step);
|
PyObject *step_o = oparg == 3 ? PyStackRef_AsPyObjectBorrow(args[2]) : NULL;
|
||||||
|
|
||||||
PyObject *slice_o = PySlice_New(start_o, stop_o, step_o);
|
PyObject *slice_o = PySlice_New(start_o, stop_o, step_o);
|
||||||
DECREF_INPUTS();
|
DECREF_INPUTS();
|
||||||
ERROR_IF(slice_o == NULL, error);
|
ERROR_IF(slice_o == NULL, error);
|
||||||
|
@ -5026,43 +5028,31 @@ dummy_func(
|
||||||
value = PyStackRef_FromPyObjectImmortal(ptr);
|
value = PyStackRef_FromPyObjectImmortal(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
tier2 pure op(_LOAD_CONST_INLINE_WITH_NULL, (ptr/4 -- value, null)) {
|
|
||||||
value = PyStackRef_FromPyObjectNew(ptr);
|
|
||||||
null = PyStackRef_NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
tier2 pure op(_LOAD_CONST_INLINE_BORROW_WITH_NULL, (ptr/4 -- value, null)) {
|
|
||||||
value = PyStackRef_FromPyObjectImmortal(ptr);
|
|
||||||
null = PyStackRef_NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
tier2 op(_CHECK_FUNCTION, (func_version/2 -- )) {
|
tier2 op(_CHECK_FUNCTION, (func_version/2 -- )) {
|
||||||
assert(PyStackRef_FunctionCheck(frame->f_funcobj));
|
assert(PyStackRef_FunctionCheck(frame->f_funcobj));
|
||||||
PyFunctionObject *func = (PyFunctionObject *)PyStackRef_AsPyObjectBorrow(frame->f_funcobj);
|
PyFunctionObject *func = (PyFunctionObject *)PyStackRef_AsPyObjectBorrow(frame->f_funcobj);
|
||||||
DEOPT_IF(func->func_version != func_version);
|
DEOPT_IF(func->func_version != func_version);
|
||||||
}
|
}
|
||||||
|
|
||||||
tier2 op(_LOAD_GLOBAL_MODULE, (index/1 -- res, null if (oparg & 1))) {
|
tier2 op(_LOAD_GLOBAL_MODULE, (index/1 -- res)) {
|
||||||
PyDictObject *dict = (PyDictObject *)GLOBALS();
|
PyDictObject *dict = (PyDictObject *)GLOBALS();
|
||||||
PyDictUnicodeEntry *entries = DK_UNICODE_ENTRIES(dict->ma_keys);
|
PyDictUnicodeEntry *entries = DK_UNICODE_ENTRIES(dict->ma_keys);
|
||||||
PyObject *res_o = entries[index].me_value;
|
PyObject *res_o = entries[index].me_value;
|
||||||
DEOPT_IF(res_o == NULL);
|
DEOPT_IF(res_o == NULL);
|
||||||
Py_INCREF(res_o);
|
Py_INCREF(res_o);
|
||||||
res = PyStackRef_FromPyObjectSteal(res_o);
|
res = PyStackRef_FromPyObjectSteal(res_o);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tier2 op(_LOAD_GLOBAL_BUILTINS, (index/1 -- res, null if (oparg & 1))) {
|
tier2 op(_LOAD_GLOBAL_BUILTINS, (index/1 -- res)) {
|
||||||
PyDictObject *dict = (PyDictObject *)BUILTINS();
|
PyDictObject *dict = (PyDictObject *)BUILTINS();
|
||||||
PyDictUnicodeEntry *entries = DK_UNICODE_ENTRIES(dict->ma_keys);
|
PyDictUnicodeEntry *entries = DK_UNICODE_ENTRIES(dict->ma_keys);
|
||||||
PyObject *res_o = entries[index].me_value;
|
PyObject *res_o = entries[index].me_value;
|
||||||
DEOPT_IF(res_o == NULL);
|
DEOPT_IF(res_o == NULL);
|
||||||
Py_INCREF(res_o);
|
Py_INCREF(res_o);
|
||||||
res = PyStackRef_FromPyObjectSteal(res_o);
|
res = PyStackRef_FromPyObjectSteal(res_o);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tier2 op(_LOAD_ATTR_MODULE, (index/1, owner -- attr, null if (oparg & 1))) {
|
tier2 op(_LOAD_ATTR_MODULE, (index/1, owner -- attr)) {
|
||||||
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
|
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
|
||||||
PyDictObject *dict = (PyDictObject *)((PyModuleObject *)owner_o)->md_dict;
|
PyDictObject *dict = (PyDictObject *)((PyModuleObject *)owner_o)->md_dict;
|
||||||
assert(dict->ma_keys->dk_kind == DICT_KEYS_UNICODE);
|
assert(dict->ma_keys->dk_kind == DICT_KEYS_UNICODE);
|
||||||
|
@ -5073,7 +5063,6 @@ dummy_func(
|
||||||
STAT_INC(LOAD_ATTR, hit);
|
STAT_INC(LOAD_ATTR, hit);
|
||||||
Py_INCREF(attr_o);
|
Py_INCREF(attr_o);
|
||||||
attr = PyStackRef_FromPyObjectSteal(attr_o);
|
attr = PyStackRef_FromPyObjectSteal(attr_o);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
DECREF_INPUTS();
|
DECREF_INPUTS();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4108,7 +4108,10 @@ ex_call:
|
||||||
}
|
}
|
||||||
assert(have_dict);
|
assert(have_dict);
|
||||||
}
|
}
|
||||||
ADDOP_I(c, loc, CALL_FUNCTION_EX, nkwelts > 0);
|
if (nkwelts == 0) {
|
||||||
|
ADDOP(c, loc, PUSH_NULL);
|
||||||
|
}
|
||||||
|
ADDOP(c, loc, CALL_FUNCTION_EX);
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
242
Python/executor_cases.c.h
generated
242
Python/executor_cases.c.h
generated
|
@ -1953,7 +1953,6 @@
|
||||||
|
|
||||||
case _LOAD_GLOBAL: {
|
case _LOAD_GLOBAL: {
|
||||||
_PyStackRef *res;
|
_PyStackRef *res;
|
||||||
_PyStackRef null = PyStackRef_NULL;
|
|
||||||
oparg = CURRENT_OPARG();
|
oparg = CURRENT_OPARG();
|
||||||
res = &stack_pointer[0];
|
res = &stack_pointer[0];
|
||||||
PyObject *name = GETITEM(FRAME_CO_NAMES, oparg>>1);
|
PyObject *name = GETITEM(FRAME_CO_NAMES, oparg>>1);
|
||||||
|
@ -1961,9 +1960,17 @@
|
||||||
_PyEval_LoadGlobalStackRef(GLOBALS(), BUILTINS(), name, res);
|
_PyEval_LoadGlobalStackRef(GLOBALS(), BUILTINS(), name, res);
|
||||||
stack_pointer = _PyFrame_GetStackPointer(frame);
|
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||||
if (PyStackRef_IsNull(*res)) JUMP_TO_ERROR();
|
if (PyStackRef_IsNull(*res)) JUMP_TO_ERROR();
|
||||||
|
stack_pointer += 1;
|
||||||
|
assert(WITHIN_STACK_BOUNDS());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case _PUSH_NULL_CONDITIONAL: {
|
||||||
|
_PyStackRef null = PyStackRef_NULL;
|
||||||
|
oparg = CURRENT_OPARG();
|
||||||
null = PyStackRef_NULL;
|
null = PyStackRef_NULL;
|
||||||
if (oparg & 1) stack_pointer[1] = null;
|
if (oparg & 1) stack_pointer[0] = null;
|
||||||
stack_pointer += 1 + (oparg & 1);
|
stack_pointer += (oparg & 1);
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
assert(WITHIN_STACK_BOUNDS());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2029,8 +2036,6 @@
|
||||||
case _LOAD_GLOBAL_MODULE_FROM_KEYS: {
|
case _LOAD_GLOBAL_MODULE_FROM_KEYS: {
|
||||||
PyDictKeysObject *globals_keys;
|
PyDictKeysObject *globals_keys;
|
||||||
_PyStackRef res;
|
_PyStackRef res;
|
||||||
_PyStackRef null = PyStackRef_NULL;
|
|
||||||
oparg = CURRENT_OPARG();
|
|
||||||
globals_keys = (PyDictKeysObject *)stack_pointer[-1].bits;
|
globals_keys = (PyDictKeysObject *)stack_pointer[-1].bits;
|
||||||
uint16_t index = (uint16_t)CURRENT_OPERAND0();
|
uint16_t index = (uint16_t)CURRENT_OPERAND0();
|
||||||
PyDictUnicodeEntry *entries = DK_UNICODE_ENTRIES(globals_keys);
|
PyDictUnicodeEntry *entries = DK_UNICODE_ENTRIES(globals_keys);
|
||||||
|
@ -2052,10 +2057,8 @@
|
||||||
res = PyStackRef_FromPyObjectSteal(res_o);
|
res = PyStackRef_FromPyObjectSteal(res_o);
|
||||||
#endif
|
#endif
|
||||||
STAT_INC(LOAD_GLOBAL, hit);
|
STAT_INC(LOAD_GLOBAL, hit);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
stack_pointer[0] = res;
|
stack_pointer[0] = res;
|
||||||
if (oparg & 1) stack_pointer[1] = null;
|
stack_pointer += 1;
|
||||||
stack_pointer += 1 + (oparg & 1);
|
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
assert(WITHIN_STACK_BOUNDS());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2063,8 +2066,6 @@
|
||||||
case _LOAD_GLOBAL_BUILTINS_FROM_KEYS: {
|
case _LOAD_GLOBAL_BUILTINS_FROM_KEYS: {
|
||||||
PyDictKeysObject *builtins_keys;
|
PyDictKeysObject *builtins_keys;
|
||||||
_PyStackRef res;
|
_PyStackRef res;
|
||||||
_PyStackRef null = PyStackRef_NULL;
|
|
||||||
oparg = CURRENT_OPARG();
|
|
||||||
builtins_keys = (PyDictKeysObject *)stack_pointer[-1].bits;
|
builtins_keys = (PyDictKeysObject *)stack_pointer[-1].bits;
|
||||||
uint16_t index = (uint16_t)CURRENT_OPERAND0();
|
uint16_t index = (uint16_t)CURRENT_OPERAND0();
|
||||||
PyDictUnicodeEntry *entries = DK_UNICODE_ENTRIES(builtins_keys);
|
PyDictUnicodeEntry *entries = DK_UNICODE_ENTRIES(builtins_keys);
|
||||||
|
@ -2086,10 +2087,8 @@
|
||||||
res = PyStackRef_FromPyObjectSteal(res_o);
|
res = PyStackRef_FromPyObjectSteal(res_o);
|
||||||
#endif
|
#endif
|
||||||
STAT_INC(LOAD_GLOBAL, hit);
|
STAT_INC(LOAD_GLOBAL, hit);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
stack_pointer[0] = res;
|
stack_pointer[0] = res;
|
||||||
if (oparg & 1) stack_pointer[1] = null;
|
stack_pointer += 1;
|
||||||
stack_pointer += 1 + (oparg & 1);
|
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
assert(WITHIN_STACK_BOUNDS());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2608,9 +2607,10 @@
|
||||||
case _LOAD_ATTR: {
|
case _LOAD_ATTR: {
|
||||||
_PyStackRef owner;
|
_PyStackRef owner;
|
||||||
_PyStackRef attr;
|
_PyStackRef attr;
|
||||||
_PyStackRef self_or_null = PyStackRef_NULL;
|
_PyStackRef *self_or_null;
|
||||||
oparg = CURRENT_OPARG();
|
oparg = CURRENT_OPARG();
|
||||||
owner = stack_pointer[-1];
|
owner = stack_pointer[-1];
|
||||||
|
self_or_null = &stack_pointer[0];
|
||||||
PyObject *name = GETITEM(FRAME_CO_NAMES, oparg >> 1);
|
PyObject *name = GETITEM(FRAME_CO_NAMES, oparg >> 1);
|
||||||
PyObject *attr_o;
|
PyObject *attr_o;
|
||||||
if (oparg & 1) {
|
if (oparg & 1) {
|
||||||
|
@ -2625,7 +2625,7 @@
|
||||||
meth | self | arg1 | ... | argN
|
meth | self | arg1 | ... | argN
|
||||||
*/
|
*/
|
||||||
assert(attr_o != NULL); // No errors on this branch
|
assert(attr_o != NULL); // No errors on this branch
|
||||||
self_or_null = owner; // Transfer ownership
|
self_or_null[0] = owner; // Transfer ownership
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* meth is not an unbound method (but a regular attr, or
|
/* meth is not an unbound method (but a regular attr, or
|
||||||
|
@ -2636,7 +2636,7 @@
|
||||||
*/
|
*/
|
||||||
PyStackRef_CLOSE(owner);
|
PyStackRef_CLOSE(owner);
|
||||||
if (attr_o == NULL) JUMP_TO_ERROR();
|
if (attr_o == NULL) JUMP_TO_ERROR();
|
||||||
self_or_null = PyStackRef_NULL;
|
self_or_null[0] = PyStackRef_NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -2646,12 +2646,9 @@
|
||||||
stack_pointer = _PyFrame_GetStackPointer(frame);
|
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||||
PyStackRef_CLOSE(owner);
|
PyStackRef_CLOSE(owner);
|
||||||
if (attr_o == NULL) JUMP_TO_ERROR();
|
if (attr_o == NULL) JUMP_TO_ERROR();
|
||||||
/* We need to define self_or_null on all paths */
|
|
||||||
self_or_null = PyStackRef_NULL;
|
|
||||||
}
|
}
|
||||||
attr = PyStackRef_FromPyObjectSteal(attr_o);
|
attr = PyStackRef_FromPyObjectSteal(attr_o);
|
||||||
stack_pointer[-1] = attr;
|
stack_pointer[-1] = attr;
|
||||||
if (oparg & 1) stack_pointer[0] = self_or_null;
|
|
||||||
stack_pointer += (oparg&1);
|
stack_pointer += (oparg&1);
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
assert(WITHIN_STACK_BOUNDS());
|
||||||
break;
|
break;
|
||||||
|
@ -2704,11 +2701,9 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case _LOAD_ATTR_INSTANCE_VALUE_0: {
|
case _LOAD_ATTR_INSTANCE_VALUE: {
|
||||||
_PyStackRef owner;
|
_PyStackRef owner;
|
||||||
_PyStackRef attr;
|
_PyStackRef attr;
|
||||||
_PyStackRef null = PyStackRef_NULL;
|
|
||||||
(void)null;
|
|
||||||
owner = stack_pointer[-1];
|
owner = stack_pointer[-1];
|
||||||
uint16_t offset = (uint16_t)CURRENT_OPERAND0();
|
uint16_t offset = (uint16_t)CURRENT_OPERAND0();
|
||||||
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
|
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
|
||||||
|
@ -2729,48 +2724,11 @@
|
||||||
attr = PyStackRef_FromPyObjectNew(attr_o);
|
attr = PyStackRef_FromPyObjectNew(attr_o);
|
||||||
#endif
|
#endif
|
||||||
STAT_INC(LOAD_ATTR, hit);
|
STAT_INC(LOAD_ATTR, hit);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
PyStackRef_CLOSE(owner);
|
PyStackRef_CLOSE(owner);
|
||||||
stack_pointer[-1] = attr;
|
stack_pointer[-1] = attr;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case _LOAD_ATTR_INSTANCE_VALUE_1: {
|
|
||||||
_PyStackRef owner;
|
|
||||||
_PyStackRef attr;
|
|
||||||
_PyStackRef null = PyStackRef_NULL;
|
|
||||||
(void)null;
|
|
||||||
owner = stack_pointer[-1];
|
|
||||||
uint16_t offset = (uint16_t)CURRENT_OPERAND0();
|
|
||||||
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
|
|
||||||
PyObject **value_ptr = (PyObject**)(((char *)owner_o) + offset);
|
|
||||||
PyObject *attr_o = FT_ATOMIC_LOAD_PTR_ACQUIRE(*value_ptr);
|
|
||||||
if (attr_o == NULL) {
|
|
||||||
UOP_STAT_INC(uopcode, miss);
|
|
||||||
JUMP_TO_JUMP_TARGET();
|
|
||||||
}
|
|
||||||
#ifdef Py_GIL_DISABLED
|
|
||||||
if (!_Py_TryIncrefCompareStackRef(value_ptr, attr_o, &attr)) {
|
|
||||||
if (true) {
|
|
||||||
UOP_STAT_INC(uopcode, miss);
|
|
||||||
JUMP_TO_JUMP_TARGET();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
attr = PyStackRef_FromPyObjectNew(attr_o);
|
|
||||||
#endif
|
|
||||||
STAT_INC(LOAD_ATTR, hit);
|
|
||||||
null = PyStackRef_NULL;
|
|
||||||
PyStackRef_CLOSE(owner);
|
|
||||||
stack_pointer[-1] = attr;
|
|
||||||
stack_pointer[0] = null;
|
|
||||||
stack_pointer += 1;
|
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* _LOAD_ATTR_INSTANCE_VALUE is split on (oparg & 1) */
|
|
||||||
|
|
||||||
case _CHECK_ATTR_MODULE_PUSH_KEYS: {
|
case _CHECK_ATTR_MODULE_PUSH_KEYS: {
|
||||||
_PyStackRef owner;
|
_PyStackRef owner;
|
||||||
PyDictKeysObject *mod_keys;
|
PyDictKeysObject *mod_keys;
|
||||||
|
@ -2799,8 +2757,6 @@
|
||||||
PyDictKeysObject *mod_keys;
|
PyDictKeysObject *mod_keys;
|
||||||
_PyStackRef owner;
|
_PyStackRef owner;
|
||||||
_PyStackRef attr;
|
_PyStackRef attr;
|
||||||
_PyStackRef null = PyStackRef_NULL;
|
|
||||||
oparg = CURRENT_OPARG();
|
|
||||||
mod_keys = (PyDictKeysObject *)stack_pointer[-1].bits;
|
mod_keys = (PyDictKeysObject *)stack_pointer[-1].bits;
|
||||||
owner = stack_pointer[-2];
|
owner = stack_pointer[-2];
|
||||||
uint16_t index = (uint16_t)CURRENT_OPERAND0();
|
uint16_t index = (uint16_t)CURRENT_OPERAND0();
|
||||||
|
@ -2828,12 +2784,8 @@
|
||||||
attr = PyStackRef_FromPyObjectSteal(attr_o);
|
attr = PyStackRef_FromPyObjectSteal(attr_o);
|
||||||
#endif
|
#endif
|
||||||
STAT_INC(LOAD_ATTR, hit);
|
STAT_INC(LOAD_ATTR, hit);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
PyStackRef_CLOSE(owner);
|
PyStackRef_CLOSE(owner);
|
||||||
stack_pointer[-1] = attr;
|
stack_pointer[-1] = attr;
|
||||||
if (oparg & 1) stack_pointer[0] = null;
|
|
||||||
stack_pointer += (oparg & 1);
|
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2860,7 +2812,6 @@
|
||||||
PyDictObject *dict;
|
PyDictObject *dict;
|
||||||
_PyStackRef owner;
|
_PyStackRef owner;
|
||||||
_PyStackRef attr;
|
_PyStackRef attr;
|
||||||
_PyStackRef null = PyStackRef_NULL;
|
|
||||||
oparg = CURRENT_OPARG();
|
oparg = CURRENT_OPARG();
|
||||||
dict = (PyDictObject *)stack_pointer[-1].bits;
|
dict = (PyDictObject *)stack_pointer[-1].bits;
|
||||||
owner = stack_pointer[-2];
|
owner = stack_pointer[-2];
|
||||||
|
@ -2916,20 +2867,16 @@
|
||||||
STAT_INC(LOAD_ATTR, hit);
|
STAT_INC(LOAD_ATTR, hit);
|
||||||
attr = PyStackRef_FromPyObjectNew(attr_o);
|
attr = PyStackRef_FromPyObjectNew(attr_o);
|
||||||
UNLOCK_OBJECT(dict);
|
UNLOCK_OBJECT(dict);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
PyStackRef_CLOSE(owner);
|
PyStackRef_CLOSE(owner);
|
||||||
stack_pointer[-2] = attr;
|
stack_pointer[-2] = attr;
|
||||||
if (oparg & 1) stack_pointer[-1] = null;
|
stack_pointer += -1;
|
||||||
stack_pointer += -1 + (oparg & 1);
|
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
assert(WITHIN_STACK_BOUNDS());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case _LOAD_ATTR_SLOT_0: {
|
case _LOAD_ATTR_SLOT: {
|
||||||
_PyStackRef owner;
|
_PyStackRef owner;
|
||||||
_PyStackRef attr;
|
_PyStackRef attr;
|
||||||
_PyStackRef null = PyStackRef_NULL;
|
|
||||||
(void)null;
|
|
||||||
owner = stack_pointer[-1];
|
owner = stack_pointer[-1];
|
||||||
uint16_t index = (uint16_t)CURRENT_OPERAND0();
|
uint16_t index = (uint16_t)CURRENT_OPERAND0();
|
||||||
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
|
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
|
||||||
|
@ -2949,47 +2896,11 @@
|
||||||
attr = PyStackRef_FromPyObjectNew(attr_o);
|
attr = PyStackRef_FromPyObjectNew(attr_o);
|
||||||
#endif
|
#endif
|
||||||
STAT_INC(LOAD_ATTR, hit);
|
STAT_INC(LOAD_ATTR, hit);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
PyStackRef_CLOSE(owner);
|
PyStackRef_CLOSE(owner);
|
||||||
stack_pointer[-1] = attr;
|
stack_pointer[-1] = attr;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case _LOAD_ATTR_SLOT_1: {
|
|
||||||
_PyStackRef owner;
|
|
||||||
_PyStackRef attr;
|
|
||||||
_PyStackRef null = PyStackRef_NULL;
|
|
||||||
(void)null;
|
|
||||||
owner = stack_pointer[-1];
|
|
||||||
uint16_t index = (uint16_t)CURRENT_OPERAND0();
|
|
||||||
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
|
|
||||||
PyObject **addr = (PyObject **)((char *)owner_o + index);
|
|
||||||
PyObject *attr_o = FT_ATOMIC_LOAD_PTR(*addr);
|
|
||||||
if (attr_o == NULL) {
|
|
||||||
UOP_STAT_INC(uopcode, miss);
|
|
||||||
JUMP_TO_JUMP_TARGET();
|
|
||||||
}
|
|
||||||
#ifdef Py_GIL_DISABLED
|
|
||||||
int increfed = _Py_TryIncrefCompareStackRef(addr, attr_o, &attr);
|
|
||||||
if (!increfed) {
|
|
||||||
UOP_STAT_INC(uopcode, miss);
|
|
||||||
JUMP_TO_JUMP_TARGET();
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
attr = PyStackRef_FromPyObjectNew(attr_o);
|
|
||||||
#endif
|
|
||||||
STAT_INC(LOAD_ATTR, hit);
|
|
||||||
null = PyStackRef_NULL;
|
|
||||||
PyStackRef_CLOSE(owner);
|
|
||||||
stack_pointer[-1] = attr;
|
|
||||||
stack_pointer[0] = null;
|
|
||||||
stack_pointer += 1;
|
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* _LOAD_ATTR_SLOT is split on (oparg & 1) */
|
|
||||||
|
|
||||||
case _CHECK_ATTR_CLASS: {
|
case _CHECK_ATTR_CLASS: {
|
||||||
_PyStackRef owner;
|
_PyStackRef owner;
|
||||||
owner = stack_pointer[-1];
|
owner = stack_pointer[-1];
|
||||||
|
@ -3007,43 +2918,19 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case _LOAD_ATTR_CLASS_0: {
|
case _LOAD_ATTR_CLASS: {
|
||||||
_PyStackRef owner;
|
_PyStackRef owner;
|
||||||
_PyStackRef attr;
|
_PyStackRef attr;
|
||||||
_PyStackRef null = PyStackRef_NULL;
|
|
||||||
(void)null;
|
|
||||||
owner = stack_pointer[-1];
|
owner = stack_pointer[-1];
|
||||||
PyObject *descr = (PyObject *)CURRENT_OPERAND0();
|
PyObject *descr = (PyObject *)CURRENT_OPERAND0();
|
||||||
STAT_INC(LOAD_ATTR, hit);
|
STAT_INC(LOAD_ATTR, hit);
|
||||||
assert(descr != NULL);
|
assert(descr != NULL);
|
||||||
attr = PyStackRef_FromPyObjectNew(descr);
|
attr = PyStackRef_FromPyObjectNew(descr);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
PyStackRef_CLOSE(owner);
|
PyStackRef_CLOSE(owner);
|
||||||
stack_pointer[-1] = attr;
|
stack_pointer[-1] = attr;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case _LOAD_ATTR_CLASS_1: {
|
|
||||||
_PyStackRef owner;
|
|
||||||
_PyStackRef attr;
|
|
||||||
_PyStackRef null = PyStackRef_NULL;
|
|
||||||
(void)null;
|
|
||||||
owner = stack_pointer[-1];
|
|
||||||
PyObject *descr = (PyObject *)CURRENT_OPERAND0();
|
|
||||||
STAT_INC(LOAD_ATTR, hit);
|
|
||||||
assert(descr != NULL);
|
|
||||||
attr = PyStackRef_FromPyObjectNew(descr);
|
|
||||||
null = PyStackRef_NULL;
|
|
||||||
PyStackRef_CLOSE(owner);
|
|
||||||
stack_pointer[-1] = attr;
|
|
||||||
stack_pointer[0] = null;
|
|
||||||
stack_pointer += 1;
|
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* _LOAD_ATTR_CLASS is split on (oparg & 1) */
|
|
||||||
|
|
||||||
case _LOAD_ATTR_PROPERTY_FRAME: {
|
case _LOAD_ATTR_PROPERTY_FRAME: {
|
||||||
_PyStackRef owner;
|
_PyStackRef owner;
|
||||||
_PyInterpreterFrame *new_frame;
|
_PyInterpreterFrame *new_frame;
|
||||||
|
@ -4059,7 +3946,7 @@
|
||||||
case _LOAD_ATTR_METHOD_WITH_VALUES: {
|
case _LOAD_ATTR_METHOD_WITH_VALUES: {
|
||||||
_PyStackRef owner;
|
_PyStackRef owner;
|
||||||
_PyStackRef attr;
|
_PyStackRef attr;
|
||||||
_PyStackRef self = PyStackRef_NULL;
|
_PyStackRef self;
|
||||||
oparg = CURRENT_OPARG();
|
oparg = CURRENT_OPARG();
|
||||||
owner = stack_pointer[-1];
|
owner = stack_pointer[-1];
|
||||||
PyObject *descr = (PyObject *)CURRENT_OPERAND0();
|
PyObject *descr = (PyObject *)CURRENT_OPERAND0();
|
||||||
|
@ -4080,7 +3967,7 @@
|
||||||
case _LOAD_ATTR_METHOD_NO_DICT: {
|
case _LOAD_ATTR_METHOD_NO_DICT: {
|
||||||
_PyStackRef owner;
|
_PyStackRef owner;
|
||||||
_PyStackRef attr;
|
_PyStackRef attr;
|
||||||
_PyStackRef self = PyStackRef_NULL;
|
_PyStackRef self;
|
||||||
oparg = CURRENT_OPARG();
|
oparg = CURRENT_OPARG();
|
||||||
owner = stack_pointer[-1];
|
owner = stack_pointer[-1];
|
||||||
PyObject *descr = (PyObject *)CURRENT_OPERAND0();
|
PyObject *descr = (PyObject *)CURRENT_OPERAND0();
|
||||||
|
@ -4146,7 +4033,7 @@
|
||||||
case _LOAD_ATTR_METHOD_LAZY_DICT: {
|
case _LOAD_ATTR_METHOD_LAZY_DICT: {
|
||||||
_PyStackRef owner;
|
_PyStackRef owner;
|
||||||
_PyStackRef attr;
|
_PyStackRef attr;
|
||||||
_PyStackRef self = PyStackRef_NULL;
|
_PyStackRef self;
|
||||||
oparg = CURRENT_OPARG();
|
oparg = CURRENT_OPARG();
|
||||||
owner = stack_pointer[-1];
|
owner = stack_pointer[-1];
|
||||||
PyObject *descr = (PyObject *)CURRENT_OPERAND0();
|
PyObject *descr = (PyObject *)CURRENT_OPERAND0();
|
||||||
|
@ -5644,15 +5531,14 @@
|
||||||
/* _INSTRUMENTED_CALL_FUNCTION_EX is not a viable micro-op for tier 2 because it is instrumented */
|
/* _INSTRUMENTED_CALL_FUNCTION_EX is not a viable micro-op for tier 2 because it is instrumented */
|
||||||
|
|
||||||
case _MAKE_CALLARGS_A_TUPLE: {
|
case _MAKE_CALLARGS_A_TUPLE: {
|
||||||
_PyStackRef kwargs_in = PyStackRef_NULL;
|
_PyStackRef kwargs_in;
|
||||||
_PyStackRef callargs;
|
_PyStackRef callargs;
|
||||||
_PyStackRef func;
|
_PyStackRef func;
|
||||||
_PyStackRef tuple;
|
_PyStackRef tuple;
|
||||||
_PyStackRef kwargs_out = PyStackRef_NULL;
|
_PyStackRef kwargs_out;
|
||||||
oparg = CURRENT_OPARG();
|
kwargs_in = stack_pointer[-1];
|
||||||
if (oparg & 1) { kwargs_in = stack_pointer[-(oparg & 1)]; }
|
callargs = stack_pointer[-2];
|
||||||
callargs = stack_pointer[-1 - (oparg & 1)];
|
func = stack_pointer[-4];
|
||||||
func = stack_pointer[-3 - (oparg & 1)];
|
|
||||||
PyObject *callargs_o = PyStackRef_AsPyObjectBorrow(callargs);
|
PyObject *callargs_o = PyStackRef_AsPyObjectBorrow(callargs);
|
||||||
if (PyTuple_CheckExact(callargs_o)) {
|
if (PyTuple_CheckExact(callargs_o)) {
|
||||||
tuple = callargs;
|
tuple = callargs;
|
||||||
|
@ -5675,8 +5561,8 @@
|
||||||
PyStackRef_CLOSE(callargs);
|
PyStackRef_CLOSE(callargs);
|
||||||
tuple = PyStackRef_FromPyObjectSteal(tuple_o);
|
tuple = PyStackRef_FromPyObjectSteal(tuple_o);
|
||||||
}
|
}
|
||||||
stack_pointer[-1 - (oparg & 1)] = tuple;
|
stack_pointer[-2] = tuple;
|
||||||
if (oparg & 1) stack_pointer[-(oparg & 1)] = kwargs_out;
|
stack_pointer[-1] = kwargs_out;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5753,25 +5639,21 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
case _BUILD_SLICE: {
|
case _BUILD_SLICE: {
|
||||||
_PyStackRef step = PyStackRef_NULL;
|
_PyStackRef *args;
|
||||||
_PyStackRef stop;
|
|
||||||
_PyStackRef start;
|
|
||||||
_PyStackRef slice;
|
_PyStackRef slice;
|
||||||
oparg = CURRENT_OPARG();
|
oparg = CURRENT_OPARG();
|
||||||
if (oparg == 3) { step = stack_pointer[-((oparg == 3) ? 1 : 0)]; }
|
args = &stack_pointer[-oparg];
|
||||||
stop = stack_pointer[-1 - ((oparg == 3) ? 1 : 0)];
|
PyObject *start_o = PyStackRef_AsPyObjectBorrow(args[0]);
|
||||||
start = stack_pointer[-2 - ((oparg == 3) ? 1 : 0)];
|
PyObject *stop_o = PyStackRef_AsPyObjectBorrow(args[1]);
|
||||||
PyObject *start_o = PyStackRef_AsPyObjectBorrow(start);
|
PyObject *step_o = oparg == 3 ? PyStackRef_AsPyObjectBorrow(args[2]) : NULL;
|
||||||
PyObject *stop_o = PyStackRef_AsPyObjectBorrow(stop);
|
|
||||||
PyObject *step_o = PyStackRef_AsPyObjectBorrow(step);
|
|
||||||
PyObject *slice_o = PySlice_New(start_o, stop_o, step_o);
|
PyObject *slice_o = PySlice_New(start_o, stop_o, step_o);
|
||||||
PyStackRef_CLOSE(start);
|
for (int _i = oparg; --_i >= 0;) {
|
||||||
PyStackRef_CLOSE(stop);
|
PyStackRef_CLOSE(args[_i]);
|
||||||
PyStackRef_XCLOSE(step);
|
}
|
||||||
if (slice_o == NULL) JUMP_TO_ERROR();
|
if (slice_o == NULL) JUMP_TO_ERROR();
|
||||||
slice = PyStackRef_FromPyObjectSteal(slice_o);
|
slice = PyStackRef_FromPyObjectSteal(slice_o);
|
||||||
stack_pointer[-2 - ((oparg == 3) ? 1 : 0)] = slice;
|
stack_pointer[-oparg] = slice;
|
||||||
stack_pointer += -1 - ((oparg == 3) ? 1 : 0);
|
stack_pointer += 1 - oparg;
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
assert(WITHIN_STACK_BOUNDS());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -6099,32 +5981,6 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case _LOAD_CONST_INLINE_WITH_NULL: {
|
|
||||||
_PyStackRef value;
|
|
||||||
_PyStackRef null;
|
|
||||||
PyObject *ptr = (PyObject *)CURRENT_OPERAND0();
|
|
||||||
value = PyStackRef_FromPyObjectNew(ptr);
|
|
||||||
null = PyStackRef_NULL;
|
|
||||||
stack_pointer[0] = value;
|
|
||||||
stack_pointer[1] = null;
|
|
||||||
stack_pointer += 2;
|
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case _LOAD_CONST_INLINE_BORROW_WITH_NULL: {
|
|
||||||
_PyStackRef value;
|
|
||||||
_PyStackRef null;
|
|
||||||
PyObject *ptr = (PyObject *)CURRENT_OPERAND0();
|
|
||||||
value = PyStackRef_FromPyObjectImmortal(ptr);
|
|
||||||
null = PyStackRef_NULL;
|
|
||||||
stack_pointer[0] = value;
|
|
||||||
stack_pointer[1] = null;
|
|
||||||
stack_pointer += 2;
|
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case _CHECK_FUNCTION: {
|
case _CHECK_FUNCTION: {
|
||||||
uint32_t func_version = (uint32_t)CURRENT_OPERAND0();
|
uint32_t func_version = (uint32_t)CURRENT_OPERAND0();
|
||||||
assert(PyStackRef_FunctionCheck(frame->f_funcobj));
|
assert(PyStackRef_FunctionCheck(frame->f_funcobj));
|
||||||
|
@ -6138,8 +5994,6 @@
|
||||||
|
|
||||||
case _LOAD_GLOBAL_MODULE: {
|
case _LOAD_GLOBAL_MODULE: {
|
||||||
_PyStackRef res;
|
_PyStackRef res;
|
||||||
_PyStackRef null = PyStackRef_NULL;
|
|
||||||
oparg = CURRENT_OPARG();
|
|
||||||
uint16_t index = (uint16_t)CURRENT_OPERAND0();
|
uint16_t index = (uint16_t)CURRENT_OPERAND0();
|
||||||
PyDictObject *dict = (PyDictObject *)GLOBALS();
|
PyDictObject *dict = (PyDictObject *)GLOBALS();
|
||||||
PyDictUnicodeEntry *entries = DK_UNICODE_ENTRIES(dict->ma_keys);
|
PyDictUnicodeEntry *entries = DK_UNICODE_ENTRIES(dict->ma_keys);
|
||||||
|
@ -6150,18 +6004,14 @@
|
||||||
}
|
}
|
||||||
Py_INCREF(res_o);
|
Py_INCREF(res_o);
|
||||||
res = PyStackRef_FromPyObjectSteal(res_o);
|
res = PyStackRef_FromPyObjectSteal(res_o);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
stack_pointer[0] = res;
|
stack_pointer[0] = res;
|
||||||
if (oparg & 1) stack_pointer[1] = null;
|
stack_pointer += 1;
|
||||||
stack_pointer += 1 + (oparg & 1);
|
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
assert(WITHIN_STACK_BOUNDS());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case _LOAD_GLOBAL_BUILTINS: {
|
case _LOAD_GLOBAL_BUILTINS: {
|
||||||
_PyStackRef res;
|
_PyStackRef res;
|
||||||
_PyStackRef null = PyStackRef_NULL;
|
|
||||||
oparg = CURRENT_OPARG();
|
|
||||||
uint16_t index = (uint16_t)CURRENT_OPERAND0();
|
uint16_t index = (uint16_t)CURRENT_OPERAND0();
|
||||||
PyDictObject *dict = (PyDictObject *)BUILTINS();
|
PyDictObject *dict = (PyDictObject *)BUILTINS();
|
||||||
PyDictUnicodeEntry *entries = DK_UNICODE_ENTRIES(dict->ma_keys);
|
PyDictUnicodeEntry *entries = DK_UNICODE_ENTRIES(dict->ma_keys);
|
||||||
|
@ -6172,10 +6022,8 @@
|
||||||
}
|
}
|
||||||
Py_INCREF(res_o);
|
Py_INCREF(res_o);
|
||||||
res = PyStackRef_FromPyObjectSteal(res_o);
|
res = PyStackRef_FromPyObjectSteal(res_o);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
stack_pointer[0] = res;
|
stack_pointer[0] = res;
|
||||||
if (oparg & 1) stack_pointer[1] = null;
|
stack_pointer += 1;
|
||||||
stack_pointer += 1 + (oparg & 1);
|
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
assert(WITHIN_STACK_BOUNDS());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -6183,8 +6031,6 @@
|
||||||
case _LOAD_ATTR_MODULE: {
|
case _LOAD_ATTR_MODULE: {
|
||||||
_PyStackRef owner;
|
_PyStackRef owner;
|
||||||
_PyStackRef attr;
|
_PyStackRef attr;
|
||||||
_PyStackRef null = PyStackRef_NULL;
|
|
||||||
oparg = CURRENT_OPARG();
|
|
||||||
owner = stack_pointer[-1];
|
owner = stack_pointer[-1];
|
||||||
uint16_t index = (uint16_t)CURRENT_OPERAND0();
|
uint16_t index = (uint16_t)CURRENT_OPERAND0();
|
||||||
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
|
PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
|
||||||
|
@ -6200,12 +6046,8 @@
|
||||||
STAT_INC(LOAD_ATTR, hit);
|
STAT_INC(LOAD_ATTR, hit);
|
||||||
Py_INCREF(attr_o);
|
Py_INCREF(attr_o);
|
||||||
attr = PyStackRef_FromPyObjectSteal(attr_o);
|
attr = PyStackRef_FromPyObjectSteal(attr_o);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
PyStackRef_CLOSE(owner);
|
PyStackRef_CLOSE(owner);
|
||||||
stack_pointer[-1] = attr;
|
stack_pointer[-1] = attr;
|
||||||
if (oparg & 1) stack_pointer[0] = null;
|
|
||||||
stack_pointer += (oparg & 1);
|
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
122
Python/generated_cases.c.h
generated
122
Python/generated_cases.c.h
generated
|
@ -840,28 +840,24 @@
|
||||||
frame->instr_ptr = next_instr;
|
frame->instr_ptr = next_instr;
|
||||||
next_instr += 1;
|
next_instr += 1;
|
||||||
INSTRUCTION_STATS(BUILD_SLICE);
|
INSTRUCTION_STATS(BUILD_SLICE);
|
||||||
_PyStackRef start;
|
_PyStackRef *args;
|
||||||
_PyStackRef stop;
|
|
||||||
_PyStackRef step = PyStackRef_NULL;
|
|
||||||
_PyStackRef slice;
|
_PyStackRef slice;
|
||||||
if (oparg == 3) { step = stack_pointer[-((oparg == 3) ? 1 : 0)]; }
|
args = &stack_pointer[-oparg];
|
||||||
stop = stack_pointer[-1 - ((oparg == 3) ? 1 : 0)];
|
PyObject *start_o = PyStackRef_AsPyObjectBorrow(args[0]);
|
||||||
start = stack_pointer[-2 - ((oparg == 3) ? 1 : 0)];
|
PyObject *stop_o = PyStackRef_AsPyObjectBorrow(args[1]);
|
||||||
PyObject *start_o = PyStackRef_AsPyObjectBorrow(start);
|
PyObject *step_o = oparg == 3 ? PyStackRef_AsPyObjectBorrow(args[2]) : NULL;
|
||||||
PyObject *stop_o = PyStackRef_AsPyObjectBorrow(stop);
|
|
||||||
PyObject *step_o = PyStackRef_AsPyObjectBorrow(step);
|
|
||||||
PyObject *slice_o = PySlice_New(start_o, stop_o, step_o);
|
PyObject *slice_o = PySlice_New(start_o, stop_o, step_o);
|
||||||
PyStackRef_CLOSE(start);
|
for (int _i = oparg; --_i >= 0;) {
|
||||||
PyStackRef_CLOSE(stop);
|
PyStackRef_CLOSE(args[_i]);
|
||||||
PyStackRef_XCLOSE(step);
|
}
|
||||||
if (slice_o == NULL) {
|
if (slice_o == NULL) {
|
||||||
stack_pointer += -2 - ((oparg == 3) ? 1 : 0);
|
stack_pointer += -oparg;
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
assert(WITHIN_STACK_BOUNDS());
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
slice = PyStackRef_FromPyObjectSteal(slice_o);
|
slice = PyStackRef_FromPyObjectSteal(slice_o);
|
||||||
stack_pointer[-2 - ((oparg == 3) ? 1 : 0)] = slice;
|
stack_pointer[-oparg] = slice;
|
||||||
stack_pointer += -1 - ((oparg == 3) ? 1 : 0);
|
stack_pointer += 1 - oparg;
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
assert(WITHIN_STACK_BOUNDS());
|
||||||
DISPATCH();
|
DISPATCH();
|
||||||
}
|
}
|
||||||
|
@ -1713,18 +1709,18 @@
|
||||||
(void)this_instr;
|
(void)this_instr;
|
||||||
_PyStackRef func;
|
_PyStackRef func;
|
||||||
_PyStackRef callargs;
|
_PyStackRef callargs;
|
||||||
_PyStackRef kwargs_in = PyStackRef_NULL;
|
_PyStackRef kwargs_in;
|
||||||
_PyStackRef tuple;
|
_PyStackRef tuple;
|
||||||
_PyStackRef kwargs_out = PyStackRef_NULL;
|
_PyStackRef kwargs_out;
|
||||||
_PyStackRef func_st;
|
_PyStackRef func_st;
|
||||||
_PyStackRef callargs_st;
|
_PyStackRef callargs_st;
|
||||||
_PyStackRef kwargs_st = PyStackRef_NULL;
|
_PyStackRef kwargs_st;
|
||||||
_PyStackRef result;
|
_PyStackRef result;
|
||||||
// _MAKE_CALLARGS_A_TUPLE
|
// _MAKE_CALLARGS_A_TUPLE
|
||||||
{
|
{
|
||||||
if (oparg & 1) { kwargs_in = stack_pointer[-(oparg & 1)]; }
|
kwargs_in = stack_pointer[-1];
|
||||||
callargs = stack_pointer[-1 - (oparg & 1)];
|
callargs = stack_pointer[-2];
|
||||||
func = stack_pointer[-3 - (oparg & 1)];
|
func = stack_pointer[-4];
|
||||||
PyObject *callargs_o = PyStackRef_AsPyObjectBorrow(callargs);
|
PyObject *callargs_o = PyStackRef_AsPyObjectBorrow(callargs);
|
||||||
if (PyTuple_CheckExact(callargs_o)) {
|
if (PyTuple_CheckExact(callargs_o)) {
|
||||||
tuple = callargs;
|
tuple = callargs;
|
||||||
|
@ -1766,8 +1762,8 @@
|
||||||
assert(PyTuple_CheckExact(callargs));
|
assert(PyTuple_CheckExact(callargs));
|
||||||
PyObject *arg = PyTuple_GET_SIZE(callargs) > 0 ?
|
PyObject *arg = PyTuple_GET_SIZE(callargs) > 0 ?
|
||||||
PyTuple_GET_ITEM(callargs, 0) : &_PyInstrumentation_MISSING;
|
PyTuple_GET_ITEM(callargs, 0) : &_PyInstrumentation_MISSING;
|
||||||
stack_pointer[-1 - (oparg & 1)] = callargs_st;
|
stack_pointer[-2] = callargs_st;
|
||||||
if (oparg & 1) stack_pointer[-(oparg & 1)] = kwargs_st;
|
stack_pointer[-1] = kwargs_st;
|
||||||
_PyFrame_SetStackPointer(frame, stack_pointer);
|
_PyFrame_SetStackPointer(frame, stack_pointer);
|
||||||
int err = _Py_call_instrumentation_2args(
|
int err = _Py_call_instrumentation_2args(
|
||||||
tstate, PY_MONITORING_EVENT_CALL,
|
tstate, PY_MONITORING_EVENT_CALL,
|
||||||
|
@ -1810,7 +1806,7 @@
|
||||||
Py_ssize_t nargs = PyTuple_GET_SIZE(callargs);
|
Py_ssize_t nargs = PyTuple_GET_SIZE(callargs);
|
||||||
int code_flags = ((PyCodeObject *)PyFunction_GET_CODE(func))->co_flags;
|
int code_flags = ((PyCodeObject *)PyFunction_GET_CODE(func))->co_flags;
|
||||||
PyObject *locals = code_flags & CO_OPTIMIZED ? NULL : Py_NewRef(PyFunction_GET_GLOBALS(func));
|
PyObject *locals = code_flags & CO_OPTIMIZED ? NULL : Py_NewRef(PyFunction_GET_GLOBALS(func));
|
||||||
stack_pointer += -2 - (oparg & 1);
|
stack_pointer += -3;
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
assert(WITHIN_STACK_BOUNDS());
|
||||||
_PyFrame_SetStackPointer(frame, stack_pointer);
|
_PyFrame_SetStackPointer(frame, stack_pointer);
|
||||||
_PyInterpreterFrame *new_frame = _PyEvalFramePushAndInit_Ex(
|
_PyInterpreterFrame *new_frame = _PyEvalFramePushAndInit_Ex(
|
||||||
|
@ -1831,8 +1827,8 @@
|
||||||
assert(PyTuple_CheckExact(callargs));
|
assert(PyTuple_CheckExact(callargs));
|
||||||
PyObject *kwargs = PyStackRef_AsPyObjectBorrow(kwargs_st);
|
PyObject *kwargs = PyStackRef_AsPyObjectBorrow(kwargs_st);
|
||||||
assert(kwargs == NULL || PyDict_CheckExact(kwargs));
|
assert(kwargs == NULL || PyDict_CheckExact(kwargs));
|
||||||
stack_pointer[-1 - (oparg & 1)] = callargs_st;
|
stack_pointer[-2] = callargs_st;
|
||||||
if (oparg & 1) stack_pointer[-(oparg & 1)] = kwargs_st;
|
stack_pointer[-1] = kwargs_st;
|
||||||
_PyFrame_SetStackPointer(frame, stack_pointer);
|
_PyFrame_SetStackPointer(frame, stack_pointer);
|
||||||
result_o = PyObject_Call(func, callargs, kwargs);
|
result_o = PyObject_Call(func, callargs, kwargs);
|
||||||
stack_pointer = _PyFrame_GetStackPointer(frame);
|
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||||
|
@ -1842,11 +1838,7 @@
|
||||||
stack_pointer = _PyFrame_GetStackPointer(frame);
|
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||||
PyStackRef_CLOSE(callargs_st);
|
PyStackRef_CLOSE(callargs_st);
|
||||||
PyStackRef_CLOSE(func_st);
|
PyStackRef_CLOSE(func_st);
|
||||||
if (result_o == NULL) {
|
if (result_o == NULL) goto pop_4_error;
|
||||||
stack_pointer += -3 - (oparg & 1);
|
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
result = PyStackRef_FromPyObjectSteal(result_o);
|
result = PyStackRef_FromPyObjectSteal(result_o);
|
||||||
}
|
}
|
||||||
// _CHECK_PERIODIC
|
// _CHECK_PERIODIC
|
||||||
|
@ -1854,19 +1846,19 @@
|
||||||
_Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY();
|
_Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY();
|
||||||
QSBR_QUIESCENT_STATE(tstate);
|
QSBR_QUIESCENT_STATE(tstate);
|
||||||
if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) {
|
if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) {
|
||||||
stack_pointer[-3 - (oparg & 1)] = result;
|
stack_pointer[-4] = result;
|
||||||
stack_pointer += -2 - (oparg & 1);
|
stack_pointer += -3;
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
assert(WITHIN_STACK_BOUNDS());
|
||||||
_PyFrame_SetStackPointer(frame, stack_pointer);
|
_PyFrame_SetStackPointer(frame, stack_pointer);
|
||||||
int err = _Py_HandlePending(tstate);
|
int err = _Py_HandlePending(tstate);
|
||||||
stack_pointer = _PyFrame_GetStackPointer(frame);
|
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||||
if (err != 0) goto error;
|
if (err != 0) goto error;
|
||||||
stack_pointer += 2 + (oparg & 1);
|
stack_pointer += 3;
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
assert(WITHIN_STACK_BOUNDS());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stack_pointer[-3 - (oparg & 1)] = result;
|
stack_pointer[-4] = result;
|
||||||
stack_pointer += -2 - (oparg & 1);
|
stack_pointer += -3;
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
assert(WITHIN_STACK_BOUNDS());
|
||||||
DISPATCH();
|
DISPATCH();
|
||||||
}
|
}
|
||||||
|
@ -5308,7 +5300,7 @@
|
||||||
(void)this_instr;
|
(void)this_instr;
|
||||||
_PyStackRef owner;
|
_PyStackRef owner;
|
||||||
_PyStackRef attr;
|
_PyStackRef attr;
|
||||||
_PyStackRef self_or_null = PyStackRef_NULL;
|
_PyStackRef *self_or_null;
|
||||||
// _SPECIALIZE_LOAD_ATTR
|
// _SPECIALIZE_LOAD_ATTR
|
||||||
{
|
{
|
||||||
owner = stack_pointer[-1];
|
owner = stack_pointer[-1];
|
||||||
|
@ -5330,6 +5322,7 @@
|
||||||
/* Skip 8 cache entries */
|
/* Skip 8 cache entries */
|
||||||
// _LOAD_ATTR
|
// _LOAD_ATTR
|
||||||
{
|
{
|
||||||
|
self_or_null = &stack_pointer[0];
|
||||||
PyObject *name = GETITEM(FRAME_CO_NAMES, oparg >> 1);
|
PyObject *name = GETITEM(FRAME_CO_NAMES, oparg >> 1);
|
||||||
PyObject *attr_o;
|
PyObject *attr_o;
|
||||||
if (oparg & 1) {
|
if (oparg & 1) {
|
||||||
|
@ -5344,7 +5337,7 @@
|
||||||
meth | self | arg1 | ... | argN
|
meth | self | arg1 | ... | argN
|
||||||
*/
|
*/
|
||||||
assert(attr_o != NULL); // No errors on this branch
|
assert(attr_o != NULL); // No errors on this branch
|
||||||
self_or_null = owner; // Transfer ownership
|
self_or_null[0] = owner; // Transfer ownership
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* meth is not an unbound method (but a regular attr, or
|
/* meth is not an unbound method (but a regular attr, or
|
||||||
|
@ -5355,7 +5348,7 @@
|
||||||
*/
|
*/
|
||||||
PyStackRef_CLOSE(owner);
|
PyStackRef_CLOSE(owner);
|
||||||
if (attr_o == NULL) goto pop_1_error;
|
if (attr_o == NULL) goto pop_1_error;
|
||||||
self_or_null = PyStackRef_NULL;
|
self_or_null[0] = PyStackRef_NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -5365,13 +5358,10 @@
|
||||||
stack_pointer = _PyFrame_GetStackPointer(frame);
|
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||||
PyStackRef_CLOSE(owner);
|
PyStackRef_CLOSE(owner);
|
||||||
if (attr_o == NULL) goto pop_1_error;
|
if (attr_o == NULL) goto pop_1_error;
|
||||||
/* We need to define self_or_null on all paths */
|
|
||||||
self_or_null = PyStackRef_NULL;
|
|
||||||
}
|
}
|
||||||
attr = PyStackRef_FromPyObjectSteal(attr_o);
|
attr = PyStackRef_FromPyObjectSteal(attr_o);
|
||||||
}
|
}
|
||||||
stack_pointer[-1] = attr;
|
stack_pointer[-1] = attr;
|
||||||
if (oparg & 1) stack_pointer[0] = self_or_null;
|
|
||||||
stack_pointer += (oparg&1);
|
stack_pointer += (oparg&1);
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
assert(WITHIN_STACK_BOUNDS());
|
||||||
DISPATCH();
|
DISPATCH();
|
||||||
|
@ -5402,9 +5392,12 @@
|
||||||
STAT_INC(LOAD_ATTR, hit);
|
STAT_INC(LOAD_ATTR, hit);
|
||||||
assert(descr != NULL);
|
assert(descr != NULL);
|
||||||
attr = PyStackRef_FromPyObjectNew(descr);
|
attr = PyStackRef_FromPyObjectNew(descr);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
PyStackRef_CLOSE(owner);
|
PyStackRef_CLOSE(owner);
|
||||||
}
|
}
|
||||||
|
// _PUSH_NULL_CONDITIONAL
|
||||||
|
{
|
||||||
|
null = PyStackRef_NULL;
|
||||||
|
}
|
||||||
stack_pointer[-1] = attr;
|
stack_pointer[-1] = attr;
|
||||||
if (oparg & 1) stack_pointer[0] = null;
|
if (oparg & 1) stack_pointer[0] = null;
|
||||||
stack_pointer += (oparg & 1);
|
stack_pointer += (oparg & 1);
|
||||||
|
@ -5443,9 +5436,12 @@
|
||||||
STAT_INC(LOAD_ATTR, hit);
|
STAT_INC(LOAD_ATTR, hit);
|
||||||
assert(descr != NULL);
|
assert(descr != NULL);
|
||||||
attr = PyStackRef_FromPyObjectNew(descr);
|
attr = PyStackRef_FromPyObjectNew(descr);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
PyStackRef_CLOSE(owner);
|
PyStackRef_CLOSE(owner);
|
||||||
}
|
}
|
||||||
|
// _PUSH_NULL_CONDITIONAL
|
||||||
|
{
|
||||||
|
null = PyStackRef_NULL;
|
||||||
|
}
|
||||||
stack_pointer[-1] = attr;
|
stack_pointer[-1] = attr;
|
||||||
if (oparg & 1) stack_pointer[0] = null;
|
if (oparg & 1) stack_pointer[0] = null;
|
||||||
stack_pointer += (oparg & 1);
|
stack_pointer += (oparg & 1);
|
||||||
|
@ -5528,10 +5524,13 @@
|
||||||
attr = PyStackRef_FromPyObjectNew(attr_o);
|
attr = PyStackRef_FromPyObjectNew(attr_o);
|
||||||
#endif
|
#endif
|
||||||
STAT_INC(LOAD_ATTR, hit);
|
STAT_INC(LOAD_ATTR, hit);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
PyStackRef_CLOSE(owner);
|
PyStackRef_CLOSE(owner);
|
||||||
}
|
}
|
||||||
/* Skip 5 cache entries */
|
/* Skip 5 cache entries */
|
||||||
|
// _PUSH_NULL_CONDITIONAL
|
||||||
|
{
|
||||||
|
null = PyStackRef_NULL;
|
||||||
|
}
|
||||||
stack_pointer[-1] = attr;
|
stack_pointer[-1] = attr;
|
||||||
if (oparg & 1) stack_pointer[0] = null;
|
if (oparg & 1) stack_pointer[0] = null;
|
||||||
stack_pointer += (oparg & 1);
|
stack_pointer += (oparg & 1);
|
||||||
|
@ -5546,7 +5545,7 @@
|
||||||
static_assert(INLINE_CACHE_ENTRIES_LOAD_ATTR == 9, "incorrect cache size");
|
static_assert(INLINE_CACHE_ENTRIES_LOAD_ATTR == 9, "incorrect cache size");
|
||||||
_PyStackRef owner;
|
_PyStackRef owner;
|
||||||
_PyStackRef attr;
|
_PyStackRef attr;
|
||||||
_PyStackRef self = PyStackRef_NULL;
|
_PyStackRef self;
|
||||||
/* Skip 1 cache entry */
|
/* Skip 1 cache entry */
|
||||||
// _GUARD_TYPE_VERSION
|
// _GUARD_TYPE_VERSION
|
||||||
{
|
{
|
||||||
|
@ -5589,7 +5588,7 @@
|
||||||
static_assert(INLINE_CACHE_ENTRIES_LOAD_ATTR == 9, "incorrect cache size");
|
static_assert(INLINE_CACHE_ENTRIES_LOAD_ATTR == 9, "incorrect cache size");
|
||||||
_PyStackRef owner;
|
_PyStackRef owner;
|
||||||
_PyStackRef attr;
|
_PyStackRef attr;
|
||||||
_PyStackRef self = PyStackRef_NULL;
|
_PyStackRef self;
|
||||||
/* Skip 1 cache entry */
|
/* Skip 1 cache entry */
|
||||||
// _GUARD_TYPE_VERSION
|
// _GUARD_TYPE_VERSION
|
||||||
{
|
{
|
||||||
|
@ -5625,7 +5624,7 @@
|
||||||
static_assert(INLINE_CACHE_ENTRIES_LOAD_ATTR == 9, "incorrect cache size");
|
static_assert(INLINE_CACHE_ENTRIES_LOAD_ATTR == 9, "incorrect cache size");
|
||||||
_PyStackRef owner;
|
_PyStackRef owner;
|
||||||
_PyStackRef attr;
|
_PyStackRef attr;
|
||||||
_PyStackRef self = PyStackRef_NULL;
|
_PyStackRef self;
|
||||||
/* Skip 1 cache entry */
|
/* Skip 1 cache entry */
|
||||||
// _GUARD_TYPE_VERSION
|
// _GUARD_TYPE_VERSION
|
||||||
{
|
{
|
||||||
|
@ -5709,10 +5708,13 @@
|
||||||
attr = PyStackRef_FromPyObjectSteal(attr_o);
|
attr = PyStackRef_FromPyObjectSteal(attr_o);
|
||||||
#endif
|
#endif
|
||||||
STAT_INC(LOAD_ATTR, hit);
|
STAT_INC(LOAD_ATTR, hit);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
PyStackRef_CLOSE(owner);
|
PyStackRef_CLOSE(owner);
|
||||||
}
|
}
|
||||||
/* Skip 5 cache entries */
|
/* Skip 5 cache entries */
|
||||||
|
// _PUSH_NULL_CONDITIONAL
|
||||||
|
{
|
||||||
|
null = PyStackRef_NULL;
|
||||||
|
}
|
||||||
stack_pointer[-1] = attr;
|
stack_pointer[-1] = attr;
|
||||||
if (oparg & 1) stack_pointer[0] = null;
|
if (oparg & 1) stack_pointer[0] = null;
|
||||||
stack_pointer += (oparg & 1);
|
stack_pointer += (oparg & 1);
|
||||||
|
@ -5891,10 +5893,13 @@
|
||||||
attr = PyStackRef_FromPyObjectNew(attr_o);
|
attr = PyStackRef_FromPyObjectNew(attr_o);
|
||||||
#endif
|
#endif
|
||||||
STAT_INC(LOAD_ATTR, hit);
|
STAT_INC(LOAD_ATTR, hit);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
PyStackRef_CLOSE(owner);
|
PyStackRef_CLOSE(owner);
|
||||||
}
|
}
|
||||||
/* Skip 5 cache entries */
|
/* Skip 5 cache entries */
|
||||||
|
// _PUSH_NULL_CONDITIONAL
|
||||||
|
{
|
||||||
|
null = PyStackRef_NULL;
|
||||||
|
}
|
||||||
stack_pointer[-1] = attr;
|
stack_pointer[-1] = attr;
|
||||||
if (oparg & 1) stack_pointer[0] = null;
|
if (oparg & 1) stack_pointer[0] = null;
|
||||||
stack_pointer += (oparg & 1);
|
stack_pointer += (oparg & 1);
|
||||||
|
@ -5958,10 +5963,13 @@
|
||||||
STAT_INC(LOAD_ATTR, hit);
|
STAT_INC(LOAD_ATTR, hit);
|
||||||
attr = PyStackRef_FromPyObjectNew(attr_o);
|
attr = PyStackRef_FromPyObjectNew(attr_o);
|
||||||
UNLOCK_OBJECT(dict);
|
UNLOCK_OBJECT(dict);
|
||||||
null = PyStackRef_NULL;
|
|
||||||
PyStackRef_CLOSE(owner);
|
PyStackRef_CLOSE(owner);
|
||||||
}
|
}
|
||||||
/* Skip 5 cache entries */
|
/* Skip 5 cache entries */
|
||||||
|
// _PUSH_NULL_CONDITIONAL
|
||||||
|
{
|
||||||
|
null = PyStackRef_NULL;
|
||||||
|
}
|
||||||
stack_pointer[-1] = attr;
|
stack_pointer[-1] = attr;
|
||||||
if (oparg & 1) stack_pointer[0] = null;
|
if (oparg & 1) stack_pointer[0] = null;
|
||||||
stack_pointer += (oparg & 1);
|
stack_pointer += (oparg & 1);
|
||||||
|
@ -6295,6 +6303,9 @@
|
||||||
_PyEval_LoadGlobalStackRef(GLOBALS(), BUILTINS(), name, res);
|
_PyEval_LoadGlobalStackRef(GLOBALS(), BUILTINS(), name, res);
|
||||||
stack_pointer = _PyFrame_GetStackPointer(frame);
|
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||||
if (PyStackRef_IsNull(*res)) goto error;
|
if (PyStackRef_IsNull(*res)) goto error;
|
||||||
|
}
|
||||||
|
// _PUSH_NULL_CONDITIONAL
|
||||||
|
{
|
||||||
null = PyStackRef_NULL;
|
null = PyStackRef_NULL;
|
||||||
}
|
}
|
||||||
if (oparg & 1) stack_pointer[1] = null;
|
if (oparg & 1) stack_pointer[1] = null;
|
||||||
|
@ -6345,6 +6356,9 @@
|
||||||
res = PyStackRef_FromPyObjectSteal(res_o);
|
res = PyStackRef_FromPyObjectSteal(res_o);
|
||||||
#endif
|
#endif
|
||||||
STAT_INC(LOAD_GLOBAL, hit);
|
STAT_INC(LOAD_GLOBAL, hit);
|
||||||
|
}
|
||||||
|
// _PUSH_NULL_CONDITIONAL
|
||||||
|
{
|
||||||
null = PyStackRef_NULL;
|
null = PyStackRef_NULL;
|
||||||
}
|
}
|
||||||
stack_pointer[0] = res;
|
stack_pointer[0] = res;
|
||||||
|
@ -6388,6 +6402,9 @@
|
||||||
res = PyStackRef_FromPyObjectSteal(res_o);
|
res = PyStackRef_FromPyObjectSteal(res_o);
|
||||||
#endif
|
#endif
|
||||||
STAT_INC(LOAD_GLOBAL, hit);
|
STAT_INC(LOAD_GLOBAL, hit);
|
||||||
|
}
|
||||||
|
// _PUSH_NULL_CONDITIONAL
|
||||||
|
{
|
||||||
null = PyStackRef_NULL;
|
null = PyStackRef_NULL;
|
||||||
}
|
}
|
||||||
stack_pointer[0] = res;
|
stack_pointer[0] = res;
|
||||||
|
@ -6575,6 +6592,9 @@
|
||||||
stack_pointer = _PyFrame_GetStackPointer(frame);
|
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||||
if (attr_o == NULL) goto error;
|
if (attr_o == NULL) goto error;
|
||||||
attr = PyStackRef_FromPyObjectSteal(attr_o);
|
attr = PyStackRef_FromPyObjectSteal(attr_o);
|
||||||
|
}
|
||||||
|
// _PUSH_NULL_CONDITIONAL
|
||||||
|
{
|
||||||
null = PyStackRef_NULL;
|
null = PyStackRef_NULL;
|
||||||
}
|
}
|
||||||
stack_pointer[0] = attr;
|
stack_pointer[0] = attr;
|
||||||
|
|
4
Python/opcode_targets.h
generated
4
Python/opcode_targets.h
generated
|
@ -3,6 +3,7 @@ static void *opcode_targets[256] = {
|
||||||
&&TARGET_BINARY_SLICE,
|
&&TARGET_BINARY_SLICE,
|
||||||
&&TARGET_BINARY_SUBSCR,
|
&&TARGET_BINARY_SUBSCR,
|
||||||
&&TARGET_BINARY_OP_INPLACE_ADD_UNICODE,
|
&&TARGET_BINARY_OP_INPLACE_ADD_UNICODE,
|
||||||
|
&&TARGET_CALL_FUNCTION_EX,
|
||||||
&&TARGET_CHECK_EG_MATCH,
|
&&TARGET_CHECK_EG_MATCH,
|
||||||
&&TARGET_CHECK_EXC_MATCH,
|
&&TARGET_CHECK_EXC_MATCH,
|
||||||
&&TARGET_CLEANUP_THROW,
|
&&TARGET_CLEANUP_THROW,
|
||||||
|
@ -15,8 +16,8 @@ static void *opcode_targets[256] = {
|
||||||
&&TARGET_FORMAT_WITH_SPEC,
|
&&TARGET_FORMAT_WITH_SPEC,
|
||||||
&&TARGET_GET_AITER,
|
&&TARGET_GET_AITER,
|
||||||
&&TARGET_GET_ANEXT,
|
&&TARGET_GET_ANEXT,
|
||||||
&&TARGET_GET_ITER,
|
|
||||||
&&TARGET_RESERVED,
|
&&TARGET_RESERVED,
|
||||||
|
&&TARGET_GET_ITER,
|
||||||
&&TARGET_GET_LEN,
|
&&TARGET_GET_LEN,
|
||||||
&&TARGET_GET_YIELD_FROM_ITER,
|
&&TARGET_GET_YIELD_FROM_ITER,
|
||||||
&&TARGET_INTERPRETER_EXIT,
|
&&TARGET_INTERPRETER_EXIT,
|
||||||
|
@ -51,7 +52,6 @@ static void *opcode_targets[256] = {
|
||||||
&&TARGET_BUILD_STRING,
|
&&TARGET_BUILD_STRING,
|
||||||
&&TARGET_BUILD_TUPLE,
|
&&TARGET_BUILD_TUPLE,
|
||||||
&&TARGET_CALL,
|
&&TARGET_CALL,
|
||||||
&&TARGET_CALL_FUNCTION_EX,
|
|
||||||
&&TARGET_CALL_INTRINSIC_1,
|
&&TARGET_CALL_INTRINSIC_1,
|
||||||
&&TARGET_CALL_INTRINSIC_2,
|
&&TARGET_CALL_INTRINSIC_2,
|
||||||
&&TARGET_CALL_KW,
|
&&TARGET_CALL_KW,
|
||||||
|
|
|
@ -1276,15 +1276,16 @@ uop_optimize(
|
||||||
int oparg = buffer[pc].oparg;
|
int oparg = buffer[pc].oparg;
|
||||||
if (_PyUop_Flags[opcode] & HAS_OPARG_AND_1_FLAG) {
|
if (_PyUop_Flags[opcode] & HAS_OPARG_AND_1_FLAG) {
|
||||||
buffer[pc].opcode = opcode + 1 + (oparg & 1);
|
buffer[pc].opcode = opcode + 1 + (oparg & 1);
|
||||||
|
assert(strncmp(_PyOpcode_uop_name[buffer[pc].opcode], _PyOpcode_uop_name[opcode], strlen(_PyOpcode_uop_name[opcode])) == 0);
|
||||||
}
|
}
|
||||||
else if (oparg < _PyUop_Replication[opcode]) {
|
else if (oparg < _PyUop_Replication[opcode]) {
|
||||||
buffer[pc].opcode = opcode + oparg + 1;
|
buffer[pc].opcode = opcode + oparg + 1;
|
||||||
|
assert(strncmp(_PyOpcode_uop_name[buffer[pc].opcode], _PyOpcode_uop_name[opcode], strlen(_PyOpcode_uop_name[opcode])) == 0);
|
||||||
}
|
}
|
||||||
else if (is_terminator(&buffer[pc])) {
|
else if (is_terminator(&buffer[pc])) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
assert(_PyOpcode_uop_name[buffer[pc].opcode]);
|
assert(_PyOpcode_uop_name[buffer[pc].opcode]);
|
||||||
assert(strncmp(_PyOpcode_uop_name[buffer[pc].opcode], _PyOpcode_uop_name[opcode], strlen(_PyOpcode_uop_name[opcode])) == 0);
|
|
||||||
}
|
}
|
||||||
OPT_HIST(effective_trace_length(buffer, length), optimized_trace_length_hist);
|
OPT_HIST(effective_trace_length(buffer, length), optimized_trace_length_hist);
|
||||||
length = prepare_for_execution(buffer, length);
|
length = prepare_for_execution(buffer, length);
|
||||||
|
|
|
@ -109,10 +109,14 @@ convert_global_to_const(_PyUOpInstruction *inst, PyObject *obj)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (_Py_IsImmortal(res)) {
|
if (_Py_IsImmortal(res)) {
|
||||||
inst->opcode = (inst->oparg & 1) ? _LOAD_CONST_INLINE_BORROW_WITH_NULL : _LOAD_CONST_INLINE_BORROW;
|
inst->opcode = _LOAD_CONST_INLINE_BORROW;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
inst->opcode = (inst->oparg & 1) ? _LOAD_CONST_INLINE_WITH_NULL : _LOAD_CONST_INLINE;
|
inst->opcode = _LOAD_CONST_INLINE;
|
||||||
|
}
|
||||||
|
if (inst->oparg & 1) {
|
||||||
|
assert(inst[1].opcode == _PUSH_NULL_CONDITIONAL);
|
||||||
|
assert(inst[1].oparg & 1);
|
||||||
}
|
}
|
||||||
inst->operand0 = (uint64_t)res;
|
inst->operand0 = (uint64_t)res;
|
||||||
return res;
|
return res;
|
||||||
|
|
|
@ -507,16 +507,6 @@ dummy_func(void) {
|
||||||
value = sym_new_const(ctx, ptr);
|
value = sym_new_const(ctx, ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
op(_LOAD_CONST_INLINE_WITH_NULL, (ptr/4 -- value, null)) {
|
|
||||||
value = sym_new_const(ctx, ptr);
|
|
||||||
null = sym_new_null(ctx);
|
|
||||||
}
|
|
||||||
|
|
||||||
op(_LOAD_CONST_INLINE_BORROW_WITH_NULL, (ptr/4 -- value, null)) {
|
|
||||||
value = sym_new_const(ctx, ptr);
|
|
||||||
null = sym_new_null(ctx);
|
|
||||||
}
|
|
||||||
|
|
||||||
op(_COPY, (bottom, unused[oparg-1] -- bottom, unused[oparg-1], top)) {
|
op(_COPY, (bottom, unused[oparg-1] -- bottom, unused[oparg-1], top)) {
|
||||||
assert(oparg > 0);
|
assert(oparg > 0);
|
||||||
top = bottom;
|
top = bottom;
|
||||||
|
@ -528,9 +518,8 @@ dummy_func(void) {
|
||||||
top_out = top_in;
|
top_out = top_in;
|
||||||
}
|
}
|
||||||
|
|
||||||
op(_LOAD_ATTR_INSTANCE_VALUE, (offset/1, owner -- attr, null if (oparg & 1))) {
|
op(_LOAD_ATTR_INSTANCE_VALUE, (offset/1, owner -- attr)) {
|
||||||
attr = sym_new_not_null(ctx);
|
attr = sym_new_not_null(ctx);
|
||||||
null = sym_new_null(ctx);
|
|
||||||
(void)offset;
|
(void)offset;
|
||||||
(void)owner;
|
(void)owner;
|
||||||
}
|
}
|
||||||
|
@ -553,15 +542,22 @@ dummy_func(void) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
op(_LOAD_ATTR, (owner -- attr, self_or_null if (oparg & 1))) {
|
op (_PUSH_NULL_CONDITIONAL, ( -- null if (oparg & 1))) {
|
||||||
(void)owner;
|
int opcode = (oparg & 1) ? _PUSH_NULL : _NOP;
|
||||||
attr = sym_new_not_null(ctx);
|
REPLACE_OP(this_instr, opcode, 0, 0);
|
||||||
self_or_null = sym_new_unknown(ctx);
|
null = sym_new_null(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
op(_LOAD_ATTR_MODULE_FROM_KEYS, (index/1, owner, mod_keys -- attr, null if (oparg & 1))) {
|
op(_LOAD_ATTR, (owner -- attr, self_or_null[oparg&1])) {
|
||||||
|
(void)owner;
|
||||||
|
attr = sym_new_not_null(ctx);
|
||||||
|
if (oparg &1) {
|
||||||
|
self_or_null[0] = sym_new_unknown(ctx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
op(_LOAD_ATTR_MODULE_FROM_KEYS, (index/1, owner, mod_keys -- attr)) {
|
||||||
(void)index;
|
(void)index;
|
||||||
null = sym_new_null(ctx);
|
|
||||||
attr = NULL;
|
attr = NULL;
|
||||||
if (this_instr[-1].opcode == _NOP) {
|
if (this_instr[-1].opcode == _NOP) {
|
||||||
// Preceding _CHECK_ATTR_MODULE_PUSH_KEYS was removed: mod is const and dict is watched.
|
// Preceding _CHECK_ATTR_MODULE_PUSH_KEYS was removed: mod is const and dict is watched.
|
||||||
|
@ -589,41 +585,38 @@ dummy_func(void) {
|
||||||
(void)owner;
|
(void)owner;
|
||||||
}
|
}
|
||||||
|
|
||||||
op(_LOAD_ATTR_WITH_HINT, (hint/1, owner, dict -- attr, null if (oparg & 1))) {
|
op(_LOAD_ATTR_WITH_HINT, (hint/1, owner, dict -- attr)) {
|
||||||
attr = sym_new_not_null(ctx);
|
attr = sym_new_not_null(ctx);
|
||||||
null = sym_new_null(ctx);
|
|
||||||
(void)hint;
|
(void)hint;
|
||||||
(void)owner;
|
(void)owner;
|
||||||
(void)dict;
|
(void)dict;
|
||||||
}
|
}
|
||||||
|
|
||||||
op(_LOAD_ATTR_SLOT, (index/1, owner -- attr, null if (oparg & 1))) {
|
op(_LOAD_ATTR_SLOT, (index/1, owner -- attr)) {
|
||||||
attr = sym_new_not_null(ctx);
|
attr = sym_new_not_null(ctx);
|
||||||
null = sym_new_null(ctx);
|
|
||||||
(void)index;
|
(void)index;
|
||||||
(void)owner;
|
(void)owner;
|
||||||
}
|
}
|
||||||
|
|
||||||
op(_LOAD_ATTR_CLASS, (descr/4, owner -- attr, null if (oparg & 1))) {
|
op(_LOAD_ATTR_CLASS, (descr/4, owner -- attr)) {
|
||||||
attr = sym_new_not_null(ctx);
|
attr = sym_new_not_null(ctx);
|
||||||
null = sym_new_null(ctx);
|
|
||||||
(void)descr;
|
(void)descr;
|
||||||
(void)owner;
|
(void)owner;
|
||||||
}
|
}
|
||||||
|
|
||||||
op(_LOAD_ATTR_METHOD_WITH_VALUES, (descr/4, owner -- attr, self if (1))) {
|
op(_LOAD_ATTR_METHOD_WITH_VALUES, (descr/4, owner -- attr, self)) {
|
||||||
(void)descr;
|
(void)descr;
|
||||||
attr = sym_new_not_null(ctx);
|
attr = sym_new_not_null(ctx);
|
||||||
self = owner;
|
self = owner;
|
||||||
}
|
}
|
||||||
|
|
||||||
op(_LOAD_ATTR_METHOD_NO_DICT, (descr/4, owner -- attr, self if (1))) {
|
op(_LOAD_ATTR_METHOD_NO_DICT, (descr/4, owner -- attr, self)) {
|
||||||
(void)descr;
|
(void)descr;
|
||||||
attr = sym_new_not_null(ctx);
|
attr = sym_new_not_null(ctx);
|
||||||
self = owner;
|
self = owner;
|
||||||
}
|
}
|
||||||
|
|
||||||
op(_LOAD_ATTR_METHOD_LAZY_DICT, (descr/4, owner -- attr, self if (1))) {
|
op(_LOAD_ATTR_METHOD_LAZY_DICT, (descr/4, owner -- attr, self)) {
|
||||||
(void)descr;
|
(void)descr;
|
||||||
attr = sym_new_not_null(ctx);
|
attr = sym_new_not_null(ctx);
|
||||||
self = owner;
|
self = owner;
|
||||||
|
|
119
Python/optimizer_cases.c.h
generated
119
Python/optimizer_cases.c.h
generated
|
@ -928,12 +928,20 @@
|
||||||
|
|
||||||
case _LOAD_GLOBAL: {
|
case _LOAD_GLOBAL: {
|
||||||
JitOptSymbol **res;
|
JitOptSymbol **res;
|
||||||
JitOptSymbol *null = NULL;
|
|
||||||
res = &stack_pointer[0];
|
res = &stack_pointer[0];
|
||||||
res[0] = sym_new_not_null(ctx);
|
res[0] = sym_new_not_null(ctx);
|
||||||
|
stack_pointer += 1;
|
||||||
|
assert(WITHIN_STACK_BOUNDS());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case _PUSH_NULL_CONDITIONAL: {
|
||||||
|
JitOptSymbol *null = NULL;
|
||||||
|
int opcode = (oparg & 1) ? _PUSH_NULL : _NOP;
|
||||||
|
REPLACE_OP(this_instr, opcode, 0, 0);
|
||||||
null = sym_new_null(ctx);
|
null = sym_new_null(ctx);
|
||||||
if (oparg & 1) stack_pointer[1] = null;
|
if (oparg & 1) stack_pointer[0] = null;
|
||||||
stack_pointer += 1 + (oparg & 1);
|
stack_pointer += (oparg & 1);
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
assert(WITHIN_STACK_BOUNDS());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -966,25 +974,15 @@
|
||||||
|
|
||||||
case _LOAD_GLOBAL_MODULE_FROM_KEYS: {
|
case _LOAD_GLOBAL_MODULE_FROM_KEYS: {
|
||||||
JitOptSymbol *res;
|
JitOptSymbol *res;
|
||||||
JitOptSymbol *null = NULL;
|
|
||||||
res = sym_new_not_null(ctx);
|
res = sym_new_not_null(ctx);
|
||||||
null = sym_new_null(ctx);
|
|
||||||
stack_pointer[-1] = res;
|
stack_pointer[-1] = res;
|
||||||
if (oparg & 1) stack_pointer[0] = null;
|
|
||||||
stack_pointer += (oparg & 1);
|
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case _LOAD_GLOBAL_BUILTINS_FROM_KEYS: {
|
case _LOAD_GLOBAL_BUILTINS_FROM_KEYS: {
|
||||||
JitOptSymbol *res;
|
JitOptSymbol *res;
|
||||||
JitOptSymbol *null = NULL;
|
|
||||||
res = sym_new_not_null(ctx);
|
res = sym_new_not_null(ctx);
|
||||||
null = sym_new_null(ctx);
|
|
||||||
stack_pointer[-1] = res;
|
stack_pointer[-1] = res;
|
||||||
if (oparg & 1) stack_pointer[0] = null;
|
|
||||||
stack_pointer += (oparg & 1);
|
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1133,13 +1131,15 @@
|
||||||
case _LOAD_ATTR: {
|
case _LOAD_ATTR: {
|
||||||
JitOptSymbol *owner;
|
JitOptSymbol *owner;
|
||||||
JitOptSymbol *attr;
|
JitOptSymbol *attr;
|
||||||
JitOptSymbol *self_or_null = NULL;
|
JitOptSymbol **self_or_null;
|
||||||
owner = stack_pointer[-1];
|
owner = stack_pointer[-1];
|
||||||
|
self_or_null = &stack_pointer[0];
|
||||||
(void)owner;
|
(void)owner;
|
||||||
attr = sym_new_not_null(ctx);
|
attr = sym_new_not_null(ctx);
|
||||||
self_or_null = sym_new_unknown(ctx);
|
if (oparg &1) {
|
||||||
|
self_or_null[0] = sym_new_unknown(ctx);
|
||||||
|
}
|
||||||
stack_pointer[-1] = attr;
|
stack_pointer[-1] = attr;
|
||||||
if (oparg & 1) stack_pointer[0] = self_or_null;
|
|
||||||
stack_pointer += (oparg&1);
|
stack_pointer += (oparg&1);
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
assert(WITHIN_STACK_BOUNDS());
|
||||||
break;
|
break;
|
||||||
|
@ -1182,17 +1182,12 @@
|
||||||
case _LOAD_ATTR_INSTANCE_VALUE: {
|
case _LOAD_ATTR_INSTANCE_VALUE: {
|
||||||
JitOptSymbol *owner;
|
JitOptSymbol *owner;
|
||||||
JitOptSymbol *attr;
|
JitOptSymbol *attr;
|
||||||
JitOptSymbol *null = NULL;
|
|
||||||
owner = stack_pointer[-1];
|
owner = stack_pointer[-1];
|
||||||
uint16_t offset = (uint16_t)this_instr->operand0;
|
uint16_t offset = (uint16_t)this_instr->operand0;
|
||||||
attr = sym_new_not_null(ctx);
|
attr = sym_new_not_null(ctx);
|
||||||
null = sym_new_null(ctx);
|
|
||||||
(void)offset;
|
(void)offset;
|
||||||
(void)owner;
|
(void)owner;
|
||||||
stack_pointer[-1] = attr;
|
stack_pointer[-1] = attr;
|
||||||
if (oparg & 1) stack_pointer[0] = null;
|
|
||||||
stack_pointer += (oparg & 1);
|
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1230,11 +1225,9 @@
|
||||||
case _LOAD_ATTR_MODULE_FROM_KEYS: {
|
case _LOAD_ATTR_MODULE_FROM_KEYS: {
|
||||||
JitOptSymbol *owner;
|
JitOptSymbol *owner;
|
||||||
JitOptSymbol *attr;
|
JitOptSymbol *attr;
|
||||||
JitOptSymbol *null = NULL;
|
|
||||||
owner = stack_pointer[-2];
|
owner = stack_pointer[-2];
|
||||||
uint16_t index = (uint16_t)this_instr->operand0;
|
uint16_t index = (uint16_t)this_instr->operand0;
|
||||||
(void)index;
|
(void)index;
|
||||||
null = sym_new_null(ctx);
|
|
||||||
attr = NULL;
|
attr = NULL;
|
||||||
if (this_instr[-1].opcode == _NOP) {
|
if (this_instr[-1].opcode == _NOP) {
|
||||||
// Preceding _CHECK_ATTR_MODULE_PUSH_KEYS was removed: mod is const and dict is watched.
|
// Preceding _CHECK_ATTR_MODULE_PUSH_KEYS was removed: mod is const and dict is watched.
|
||||||
|
@ -1243,8 +1236,7 @@
|
||||||
assert(PyModule_CheckExact(mod));
|
assert(PyModule_CheckExact(mod));
|
||||||
PyObject *dict = mod->md_dict;
|
PyObject *dict = mod->md_dict;
|
||||||
stack_pointer[-2] = attr;
|
stack_pointer[-2] = attr;
|
||||||
if (oparg & 1) stack_pointer[-1] = null;
|
stack_pointer += -1;
|
||||||
stack_pointer += -1 + (oparg & 1);
|
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
assert(WITHIN_STACK_BOUNDS());
|
||||||
PyObject *res = convert_global_to_const(this_instr, dict);
|
PyObject *res = convert_global_to_const(this_instr, dict);
|
||||||
if (res != NULL) {
|
if (res != NULL) {
|
||||||
|
@ -1254,7 +1246,7 @@
|
||||||
else {
|
else {
|
||||||
this_instr->opcode = _LOAD_ATTR_MODULE;
|
this_instr->opcode = _LOAD_ATTR_MODULE;
|
||||||
}
|
}
|
||||||
stack_pointer += 1 - (oparg & 1);
|
stack_pointer += 1;
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
assert(WITHIN_STACK_BOUNDS());
|
||||||
}
|
}
|
||||||
if (attr == NULL) {
|
if (attr == NULL) {
|
||||||
|
@ -1262,8 +1254,7 @@
|
||||||
attr = sym_new_not_null(ctx);
|
attr = sym_new_not_null(ctx);
|
||||||
}
|
}
|
||||||
stack_pointer[-2] = attr;
|
stack_pointer[-2] = attr;
|
||||||
if (oparg & 1) stack_pointer[-1] = null;
|
stack_pointer += -1;
|
||||||
stack_pointer += -1 + (oparg & 1);
|
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
assert(WITHIN_STACK_BOUNDS());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1284,18 +1275,15 @@
|
||||||
JitOptSymbol *dict;
|
JitOptSymbol *dict;
|
||||||
JitOptSymbol *owner;
|
JitOptSymbol *owner;
|
||||||
JitOptSymbol *attr;
|
JitOptSymbol *attr;
|
||||||
JitOptSymbol *null = NULL;
|
|
||||||
dict = stack_pointer[-1];
|
dict = stack_pointer[-1];
|
||||||
owner = stack_pointer[-2];
|
owner = stack_pointer[-2];
|
||||||
uint16_t hint = (uint16_t)this_instr->operand0;
|
uint16_t hint = (uint16_t)this_instr->operand0;
|
||||||
attr = sym_new_not_null(ctx);
|
attr = sym_new_not_null(ctx);
|
||||||
null = sym_new_null(ctx);
|
|
||||||
(void)hint;
|
(void)hint;
|
||||||
(void)owner;
|
(void)owner;
|
||||||
(void)dict;
|
(void)dict;
|
||||||
stack_pointer[-2] = attr;
|
stack_pointer[-2] = attr;
|
||||||
if (oparg & 1) stack_pointer[-1] = null;
|
stack_pointer += -1;
|
||||||
stack_pointer += -1 + (oparg & 1);
|
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
assert(WITHIN_STACK_BOUNDS());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1303,17 +1291,12 @@
|
||||||
case _LOAD_ATTR_SLOT: {
|
case _LOAD_ATTR_SLOT: {
|
||||||
JitOptSymbol *owner;
|
JitOptSymbol *owner;
|
||||||
JitOptSymbol *attr;
|
JitOptSymbol *attr;
|
||||||
JitOptSymbol *null = NULL;
|
|
||||||
owner = stack_pointer[-1];
|
owner = stack_pointer[-1];
|
||||||
uint16_t index = (uint16_t)this_instr->operand0;
|
uint16_t index = (uint16_t)this_instr->operand0;
|
||||||
attr = sym_new_not_null(ctx);
|
attr = sym_new_not_null(ctx);
|
||||||
null = sym_new_null(ctx);
|
|
||||||
(void)index;
|
(void)index;
|
||||||
(void)owner;
|
(void)owner;
|
||||||
stack_pointer[-1] = attr;
|
stack_pointer[-1] = attr;
|
||||||
if (oparg & 1) stack_pointer[0] = null;
|
|
||||||
stack_pointer += (oparg & 1);
|
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1324,17 +1307,12 @@
|
||||||
case _LOAD_ATTR_CLASS: {
|
case _LOAD_ATTR_CLASS: {
|
||||||
JitOptSymbol *owner;
|
JitOptSymbol *owner;
|
||||||
JitOptSymbol *attr;
|
JitOptSymbol *attr;
|
||||||
JitOptSymbol *null = NULL;
|
|
||||||
owner = stack_pointer[-1];
|
owner = stack_pointer[-1];
|
||||||
PyObject *descr = (PyObject *)this_instr->operand0;
|
PyObject *descr = (PyObject *)this_instr->operand0;
|
||||||
attr = sym_new_not_null(ctx);
|
attr = sym_new_not_null(ctx);
|
||||||
null = sym_new_null(ctx);
|
|
||||||
(void)descr;
|
(void)descr;
|
||||||
(void)owner;
|
(void)owner;
|
||||||
stack_pointer[-1] = attr;
|
stack_pointer[-1] = attr;
|
||||||
if (oparg & 1) stack_pointer[0] = null;
|
|
||||||
stack_pointer += (oparg & 1);
|
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1723,7 +1701,7 @@
|
||||||
case _LOAD_ATTR_METHOD_WITH_VALUES: {
|
case _LOAD_ATTR_METHOD_WITH_VALUES: {
|
||||||
JitOptSymbol *owner;
|
JitOptSymbol *owner;
|
||||||
JitOptSymbol *attr;
|
JitOptSymbol *attr;
|
||||||
JitOptSymbol *self = NULL;
|
JitOptSymbol *self;
|
||||||
owner = stack_pointer[-1];
|
owner = stack_pointer[-1];
|
||||||
PyObject *descr = (PyObject *)this_instr->operand0;
|
PyObject *descr = (PyObject *)this_instr->operand0;
|
||||||
(void)descr;
|
(void)descr;
|
||||||
|
@ -1739,7 +1717,7 @@
|
||||||
case _LOAD_ATTR_METHOD_NO_DICT: {
|
case _LOAD_ATTR_METHOD_NO_DICT: {
|
||||||
JitOptSymbol *owner;
|
JitOptSymbol *owner;
|
||||||
JitOptSymbol *attr;
|
JitOptSymbol *attr;
|
||||||
JitOptSymbol *self = NULL;
|
JitOptSymbol *self;
|
||||||
owner = stack_pointer[-1];
|
owner = stack_pointer[-1];
|
||||||
PyObject *descr = (PyObject *)this_instr->operand0;
|
PyObject *descr = (PyObject *)this_instr->operand0;
|
||||||
(void)descr;
|
(void)descr;
|
||||||
|
@ -1773,7 +1751,7 @@
|
||||||
case _LOAD_ATTR_METHOD_LAZY_DICT: {
|
case _LOAD_ATTR_METHOD_LAZY_DICT: {
|
||||||
JitOptSymbol *owner;
|
JitOptSymbol *owner;
|
||||||
JitOptSymbol *attr;
|
JitOptSymbol *attr;
|
||||||
JitOptSymbol *self = NULL;
|
JitOptSymbol *self;
|
||||||
owner = stack_pointer[-1];
|
owner = stack_pointer[-1];
|
||||||
PyObject *descr = (PyObject *)this_instr->operand0;
|
PyObject *descr = (PyObject *)this_instr->operand0;
|
||||||
(void)descr;
|
(void)descr;
|
||||||
|
@ -2262,11 +2240,11 @@
|
||||||
|
|
||||||
case _MAKE_CALLARGS_A_TUPLE: {
|
case _MAKE_CALLARGS_A_TUPLE: {
|
||||||
JitOptSymbol *tuple;
|
JitOptSymbol *tuple;
|
||||||
JitOptSymbol *kwargs_out = NULL;
|
JitOptSymbol *kwargs_out;
|
||||||
tuple = sym_new_not_null(ctx);
|
tuple = sym_new_not_null(ctx);
|
||||||
kwargs_out = sym_new_not_null(ctx);
|
kwargs_out = sym_new_not_null(ctx);
|
||||||
stack_pointer[-1 - (oparg & 1)] = tuple;
|
stack_pointer[-2] = tuple;
|
||||||
if (oparg & 1) stack_pointer[-(oparg & 1)] = kwargs_out;
|
stack_pointer[-1] = kwargs_out;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2315,8 +2293,8 @@
|
||||||
case _BUILD_SLICE: {
|
case _BUILD_SLICE: {
|
||||||
JitOptSymbol *slice;
|
JitOptSymbol *slice;
|
||||||
slice = sym_new_not_null(ctx);
|
slice = sym_new_not_null(ctx);
|
||||||
stack_pointer[-2 - ((oparg == 3) ? 1 : 0)] = slice;
|
stack_pointer[-oparg] = slice;
|
||||||
stack_pointer += -1 - ((oparg == 3) ? 1 : 0);
|
stack_pointer += 1 - oparg;
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
assert(WITHIN_STACK_BOUNDS());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2607,69 +2585,32 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case _LOAD_CONST_INLINE_WITH_NULL: {
|
|
||||||
JitOptSymbol *value;
|
|
||||||
JitOptSymbol *null;
|
|
||||||
PyObject *ptr = (PyObject *)this_instr->operand0;
|
|
||||||
value = sym_new_const(ctx, ptr);
|
|
||||||
null = sym_new_null(ctx);
|
|
||||||
stack_pointer[0] = value;
|
|
||||||
stack_pointer[1] = null;
|
|
||||||
stack_pointer += 2;
|
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case _LOAD_CONST_INLINE_BORROW_WITH_NULL: {
|
|
||||||
JitOptSymbol *value;
|
|
||||||
JitOptSymbol *null;
|
|
||||||
PyObject *ptr = (PyObject *)this_instr->operand0;
|
|
||||||
value = sym_new_const(ctx, ptr);
|
|
||||||
null = sym_new_null(ctx);
|
|
||||||
stack_pointer[0] = value;
|
|
||||||
stack_pointer[1] = null;
|
|
||||||
stack_pointer += 2;
|
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case _CHECK_FUNCTION: {
|
case _CHECK_FUNCTION: {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case _LOAD_GLOBAL_MODULE: {
|
case _LOAD_GLOBAL_MODULE: {
|
||||||
JitOptSymbol *res;
|
JitOptSymbol *res;
|
||||||
JitOptSymbol *null = NULL;
|
|
||||||
res = sym_new_not_null(ctx);
|
res = sym_new_not_null(ctx);
|
||||||
null = sym_new_null(ctx);
|
|
||||||
stack_pointer[0] = res;
|
stack_pointer[0] = res;
|
||||||
if (oparg & 1) stack_pointer[1] = null;
|
stack_pointer += 1;
|
||||||
stack_pointer += 1 + (oparg & 1);
|
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
assert(WITHIN_STACK_BOUNDS());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case _LOAD_GLOBAL_BUILTINS: {
|
case _LOAD_GLOBAL_BUILTINS: {
|
||||||
JitOptSymbol *res;
|
JitOptSymbol *res;
|
||||||
JitOptSymbol *null = NULL;
|
|
||||||
res = sym_new_not_null(ctx);
|
res = sym_new_not_null(ctx);
|
||||||
null = sym_new_null(ctx);
|
|
||||||
stack_pointer[0] = res;
|
stack_pointer[0] = res;
|
||||||
if (oparg & 1) stack_pointer[1] = null;
|
stack_pointer += 1;
|
||||||
stack_pointer += 1 + (oparg & 1);
|
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
assert(WITHIN_STACK_BOUNDS());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case _LOAD_ATTR_MODULE: {
|
case _LOAD_ATTR_MODULE: {
|
||||||
JitOptSymbol *attr;
|
JitOptSymbol *attr;
|
||||||
JitOptSymbol *null = NULL;
|
|
||||||
attr = sym_new_not_null(ctx);
|
attr = sym_new_not_null(ctx);
|
||||||
null = sym_new_null(ctx);
|
|
||||||
stack_pointer[-1] = attr;
|
stack_pointer[-1] = attr;
|
||||||
if (oparg & 1) stack_pointer[0] = null;
|
|
||||||
stack_pointer += (oparg & 1);
|
|
||||||
assert(WITHIN_STACK_BOUNDS());
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue