bpo-34880: Add the LOAD_ASSERTION_ERROR opcode. (GH-15073)

Fix assert statement misbehavior if AssertionError is shadowed.
This commit is contained in:
Zackery Spytz 2019-08-25 03:44:09 -06:00 committed by Serhiy Storchaka
parent 8371799e30
commit ce6a070414
14 changed files with 2664 additions and 2627 deletions

View File

@ -752,6 +752,14 @@ iterations of the loop.
from the block stack. from the block stack.
.. opcode:: LOAD_ASSERTION_ERROR
Pushes :exc:`AssertionError` onto the stack. Used by the :keyword:`assert`
statement.
.. versionadded:: 3.9
.. opcode:: LOAD_BUILD_CLASS .. opcode:: LOAD_BUILD_CLASS
Pushes :func:`builtins.__build_class__` onto the stack. It is later called Pushes :func:`builtins.__build_class__` onto the stack. It is later called

View File

@ -226,3 +226,12 @@ Changes in the Python API
* The :mod:`venv` activation scripts no longer special-case when * The :mod:`venv` activation scripts no longer special-case when
``__VENV_PROMPT__`` is set to ``""``. ``__VENV_PROMPT__`` is set to ``""``.
CPython bytecode changes
------------------------
* The :opcode:`LOAD_ASSERTION_ERROR` opcode was added for handling the
:keyword:`assert` statement. Previously, the assert statement would not work
correctly if the :exc:`AssertionError` exception was being shadowed.
(Contributed by Zackery Spytz in :issue:`34880`.)

1
Include/opcode.h generated
View File

@ -53,6 +53,7 @@ extern "C" {
#define LOAD_BUILD_CLASS 71 #define LOAD_BUILD_CLASS 71
#define YIELD_FROM 72 #define YIELD_FROM 72
#define GET_AWAITABLE 73 #define GET_AWAITABLE 73
#define LOAD_ASSERTION_ERROR 74
#define INPLACE_LSHIFT 75 #define INPLACE_LSHIFT 75
#define INPLACE_RSHIFT 76 #define INPLACE_RSHIFT 76
#define INPLACE_AND 77 #define INPLACE_AND 77

View File

@ -271,6 +271,7 @@ _code_type = type(_write_atomic.__code__)
# Python 3.8b2 3412 (Swap the position of positional args and positional # Python 3.8b2 3412 (Swap the position of positional args and positional
# only args in ast.arguments #37593) # only args in ast.arguments #37593)
# Python 3.8b4 3413 (Fix "break" and "continue" in "finally" #37830) # Python 3.8b4 3413 (Fix "break" and "continue" in "finally" #37830)
# Python 3.9a0 3420 (add LOAD_ASSERTION_ERROR #34880)
# #
# MAGIC must change whenever the bytecode emitted by the compiler may no # MAGIC must change whenever the bytecode emitted by the compiler may no
# longer be understood by older implementations of the eval loop (usually # longer be understood by older implementations of the eval loop (usually
@ -279,7 +280,7 @@ _code_type = type(_write_atomic.__code__)
# Whenever MAGIC_NUMBER is changed, the ranges in the magic_values array # Whenever MAGIC_NUMBER is changed, the ranges in the magic_values array
# in PC/launcher.c must also be updated. # in PC/launcher.c must also be updated.
MAGIC_NUMBER = (3413).to_bytes(2, 'little') + b'\r\n' MAGIC_NUMBER = (3420).to_bytes(2, 'little') + b'\r\n'
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c _RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c
_PYCACHE = '__pycache__' _PYCACHE = '__pycache__'

View File

@ -109,7 +109,7 @@ def_op('PRINT_EXPR', 70)
def_op('LOAD_BUILD_CLASS', 71) def_op('LOAD_BUILD_CLASS', 71)
def_op('YIELD_FROM', 72) def_op('YIELD_FROM', 72)
def_op('GET_AWAITABLE', 73) def_op('GET_AWAITABLE', 73)
def_op('LOAD_ASSERTION_ERROR', 74)
def_op('INPLACE_LSHIFT', 75) def_op('INPLACE_LSHIFT', 75)
def_op('INPLACE_RSHIFT', 76) def_op('INPLACE_RSHIFT', 76)
def_op('INPLACE_AND', 77) def_op('INPLACE_AND', 77)

View File

@ -147,7 +147,7 @@ def bug1333982(x=[]):
dis_bug1333982 = """\ dis_bug1333982 = """\
%3d 0 LOAD_CONST 1 (0) %3d 0 LOAD_CONST 1 (0)
2 POP_JUMP_IF_TRUE 26 2 POP_JUMP_IF_TRUE 26
4 LOAD_GLOBAL 0 (AssertionError) 4 LOAD_ASSERTION_ERROR
6 LOAD_CONST 2 (<code object <listcomp> at 0x..., file "%s", line %d>) 6 LOAD_CONST 2 (<code object <listcomp> at 0x..., file "%s", line %d>)
8 LOAD_CONST 3 ('bug1333982.<locals>.<listcomp>') 8 LOAD_CONST 3 ('bug1333982.<locals>.<listcomp>')
10 MAKE_FUNCTION 0 10 MAKE_FUNCTION 0

View File

@ -1285,6 +1285,22 @@ class ExceptionTests(unittest.TestCase):
next(i) next(i)
next(i) next(i)
@unittest.skipUnless(__debug__, "Won't work if __debug__ is False")
def test_assert_shadowing(self):
# Shadowing AssertionError would cause the assert statement to
# misbehave.
global AssertionError
AssertionError = TypeError
try:
assert False, 'hello'
except BaseException as e:
del AssertionError
self.assertIsInstance(e, AssertionError)
self.assertEqual(str(e), 'hello')
else:
del AssertionError
self.fail('Expected exception')
class ImportErrorTests(unittest.TestCase): class ImportErrorTests(unittest.TestCase):

View File

@ -0,0 +1,3 @@
The :keyword:`assert` statement now works properly if the
:exc:`AssertionError` exception is being shadowed.
Patch by Zackery Spytz.

View File

@ -2242,6 +2242,13 @@ main_loop:
} }
} }
case TARGET(LOAD_ASSERTION_ERROR): {
PyObject *value = PyExc_AssertionError;
Py_INCREF(value);
PUSH(value);
FAST_DISPATCH();
}
case TARGET(LOAD_BUILD_CLASS): { case TARGET(LOAD_BUILD_CLASS): {
_Py_IDENTIFIER(__build_class__); _Py_IDENTIFIER(__build_class__);

View File

@ -1129,6 +1129,8 @@ stack_effect(int opcode, int oparg, int jump)
return (oparg & FVS_MASK) == FVS_HAVE_SPEC ? -1 : 0; return (oparg & FVS_MASK) == FVS_HAVE_SPEC ? -1 : 0;
case LOAD_METHOD: case LOAD_METHOD:
return 1; return 1;
case LOAD_ASSERTION_ERROR:
return 1;
default: default:
return PY_INVALID_STACK_EFFECT; return PY_INVALID_STACK_EFFECT;
} }
@ -3253,16 +3255,10 @@ compiler_from_import(struct compiler *c, stmt_ty s)
static int static int
compiler_assert(struct compiler *c, stmt_ty s) compiler_assert(struct compiler *c, stmt_ty s)
{ {
static PyObject *assertion_error = NULL;
basicblock *end; basicblock *end;
if (c->c_optimize) if (c->c_optimize)
return 1; return 1;
if (assertion_error == NULL) {
assertion_error = PyUnicode_InternFromString("AssertionError");
if (assertion_error == NULL)
return 0;
}
if (s->v.Assert.test->kind == Tuple_kind && if (s->v.Assert.test->kind == Tuple_kind &&
asdl_seq_LEN(s->v.Assert.test->v.Tuple.elts) > 0) asdl_seq_LEN(s->v.Assert.test->v.Tuple.elts) > 0)
{ {
@ -3277,7 +3273,7 @@ compiler_assert(struct compiler *c, stmt_ty s)
return 0; return 0;
if (!compiler_jump_if(c, s->v.Assert.test, end, 1)) if (!compiler_jump_if(c, s->v.Assert.test, end, 1))
return 0; return 0;
ADDOP_O(c, LOAD_GLOBAL, assertion_error, names); ADDOP(c, LOAD_ASSERTION_ERROR);
if (s->v.Assert.msg) { if (s->v.Assert.msg) {
VISIT(c, expr, s->v.Assert.msg); VISIT(c, expr, s->v.Assert.msg);
ADDOP_I(c, CALL_FUNCTION, 1); ADDOP_I(c, CALL_FUNCTION, 1);

635
Python/importlib.h generated

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -879,17 +879,16 @@ const unsigned char _Py_M__zipimport[] = {
10,1,2,0,2,0,2,249,114,169,0,0,0,99,2,0, 10,1,2,0,2,0,2,249,114,169,0,0,0,99,2,0,
0,0,0,0,0,0,0,0,0,0,6,0,0,0,10,0, 0,0,0,0,0,0,0,0,0,0,6,0,0,0,10,0,
0,0,67,0,0,0,115,116,0,0,0,122,82,124,1,100, 0,0,67,0,0,0,115,116,0,0,0,122,82,124,1,100,
1,100,0,133,2,25,0,100,2,107,6,115,22,116,0,130, 1,100,0,133,2,25,0,100,2,107,6,115,22,74,0,130,
1,124,1,100,0,100,1,133,2,25,0,125,1,124,0,106, 1,124,1,100,0,100,1,133,2,25,0,125,1,124,0,106,
1,124,1,25,0,125,2,124,2,100,3,25,0,125,3,124, 0,124,1,25,0,125,2,124,2,100,3,25,0,125,3,124,
2,100,4,25,0,125,4,124,2,100,5,25,0,125,5,116, 2,100,4,25,0,125,4,124,2,100,5,25,0,125,5,116,
2,124,4,124,3,131,2,124,5,102,2,87,0,83,0,4, 1,124,4,124,3,131,2,124,5,102,2,87,0,83,0,4,
0,116,3,116,4,116,5,102,3,107,10,114,110,1,0,1, 0,116,2,116,3,116,4,102,3,107,10,114,110,1,0,1,
0,1,0,89,0,100,6,83,0,88,0,100,0,83,0,41, 0,1,0,89,0,100,6,83,0,88,0,100,0,83,0,41,
7,78,114,14,0,0,0,169,2,218,1,99,218,1,111,114, 7,78,114,14,0,0,0,169,2,218,1,99,218,1,111,114,
163,0,0,0,233,6,0,0,0,233,3,0,0,0,41,2, 163,0,0,0,233,6,0,0,0,233,3,0,0,0,41,2,
114,0,0,0,0,114,0,0,0,0,41,6,218,14,65,115, 114,0,0,0,0,114,0,0,0,0,41,5,114,28,0,0,
115,101,114,116,105,111,110,69,114,114,111,114,114,28,0,0,
0,114,169,0,0,0,114,26,0,0,0,218,10,73,110,100, 0,114,169,0,0,0,114,26,0,0,0,218,10,73,110,100,
101,120,69,114,114,111,114,114,154,0,0,0,41,6,114,32, 101,120,69,114,114,111,114,114,154,0,0,0,41,6,114,32,
0,0,0,114,13,0,0,0,114,54,0,0,0,114,131,0, 0,0,0,114,13,0,0,0,114,54,0,0,0,114,131,0,
@ -900,184 +899,183 @@ const unsigned char _Py_M__zipimport[] = {
3,8,1,8,1,8,1,16,1,20,1,114,151,0,0,0, 3,8,1,8,1,8,1,16,1,20,1,114,151,0,0,0,
99,2,0,0,0,0,0,0,0,0,0,0,0,3,0,0, 99,2,0,0,0,0,0,0,0,0,0,0,0,3,0,0,
0,8,0,0,0,67,0,0,0,115,86,0,0,0,124,1, 0,8,0,0,0,67,0,0,0,115,86,0,0,0,124,1,
100,1,100,0,133,2,25,0,100,2,107,6,115,20,116,0, 100,1,100,0,133,2,25,0,100,2,107,6,115,20,74,0,
130,1,124,1,100,0,100,1,133,2,25,0,125,1,122,14, 130,1,124,1,100,0,100,1,133,2,25,0,125,1,122,14,
124,0,106,1,124,1,25,0,125,2,87,0,110,22,4,0, 124,0,106,0,124,1,25,0,125,2,87,0,110,22,4,0,
116,2,107,10,114,68,1,0,1,0,1,0,89,0,100,0, 116,1,107,10,114,68,1,0,1,0,1,0,89,0,100,0,
83,0,88,0,116,3,124,0,106,4,124,2,131,2,83,0, 83,0,88,0,116,2,124,0,106,3,124,2,131,2,83,0,
100,0,83,0,41,3,78,114,14,0,0,0,114,170,0,0, 100,0,83,0,41,3,78,114,14,0,0,0,114,170,0,0,
0,41,5,114,175,0,0,0,114,28,0,0,0,114,26,0, 0,41,4,114,28,0,0,0,114,26,0,0,0,114,52,0,
0,0,114,52,0,0,0,114,29,0,0,0,41,3,114,32, 0,0,114,29,0,0,0,41,3,114,32,0,0,0,114,13,
0,0,0,114,13,0,0,0,114,54,0,0,0,114,9,0, 0,0,0,114,54,0,0,0,114,9,0,0,0,114,9,0,
0,0,114,9,0,0,0,114,10,0,0,0,114,149,0,0, 0,0,114,10,0,0,0,114,149,0,0,0,171,2,0,0,
0,171,2,0,0,115,14,0,0,0,0,2,20,1,12,2, 115,14,0,0,0,0,2,20,1,12,2,2,1,14,1,14,
2,1,14,1,14,1,8,2,114,149,0,0,0,99,2,0, 1,8,2,114,149,0,0,0,99,2,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,11,0,0,0,9,0, 0,0,0,0,0,11,0,0,0,9,0,0,0,67,0,0,
0,0,67,0,0,0,115,198,0,0,0,116,0,124,0,124, 0,115,198,0,0,0,116,0,124,0,124,1,131,2,125,2,
1,131,2,125,2,116,1,68,0,93,160,92,3,125,3,125, 116,1,68,0,93,160,92,3,125,3,125,4,125,5,124,2,
4,125,5,124,2,124,3,23,0,125,6,116,2,106,3,100, 124,3,23,0,125,6,116,2,106,3,100,1,124,0,106,4,
1,124,0,106,4,116,5,124,6,100,2,100,3,141,5,1, 116,5,124,6,100,2,100,3,141,5,1,0,122,14,124,0,
0,122,14,124,0,106,6,124,6,25,0,125,7,87,0,110, 106,6,124,6,25,0,125,7,87,0,110,20,4,0,116,7,
20,4,0,116,7,107,10,114,88,1,0,1,0,1,0,89, 107,10,114,88,1,0,1,0,1,0,89,0,113,14,88,0,
0,113,14,88,0,124,7,100,4,25,0,125,8,116,8,124, 124,7,100,4,25,0,125,8,116,8,124,0,106,4,124,7,
0,106,4,124,7,131,2,125,9,124,4,114,132,116,9,124, 131,2,125,9,124,4,114,132,116,9,124,0,124,8,124,6,
0,124,8,124,6,124,1,124,9,131,5,125,10,110,10,116, 124,1,124,9,131,5,125,10,110,10,116,10,124,8,124,9,
10,124,8,124,9,131,2,125,10,124,10,100,0,107,8,114, 131,2,125,10,124,10,100,0,107,8,114,152,113,14,124,7,
152,113,14,124,7,100,4,25,0,125,8,124,10,124,5,124, 100,4,25,0,125,8,124,10,124,5,124,8,102,3,2,0,
8,102,3,2,0,1,0,83,0,113,14,116,11,100,5,124, 1,0,83,0,113,14,116,11,100,5,124,1,155,2,157,2,
1,155,2,157,2,124,1,100,6,141,2,130,1,100,0,83, 124,1,100,6,141,2,130,1,100,0,83,0,41,7,78,122,
0,41,7,78,122,13,116,114,121,105,110,103,32,123,125,123, 13,116,114,121,105,110,103,32,123,125,123,125,123,125,114,86,
125,123,125,114,86,0,0,0,41,1,90,9,118,101,114,98, 0,0,0,41,1,90,9,118,101,114,98,111,115,105,116,121,
111,115,105,116,121,114,0,0,0,0,114,57,0,0,0,114, 114,0,0,0,0,114,57,0,0,0,114,58,0,0,0,41,
58,0,0,0,41,12,114,36,0,0,0,114,89,0,0,0, 12,114,36,0,0,0,114,89,0,0,0,114,76,0,0,0,
114,76,0,0,0,114,77,0,0,0,114,29,0,0,0,114, 114,77,0,0,0,114,29,0,0,0,114,20,0,0,0,114,
20,0,0,0,114,28,0,0,0,114,26,0,0,0,114,52, 28,0,0,0,114,26,0,0,0,114,52,0,0,0,114,155,
0,0,0,114,155,0,0,0,114,161,0,0,0,114,3,0, 0,0,0,114,161,0,0,0,114,3,0,0,0,41,11,114,
0,0,41,11,114,32,0,0,0,114,38,0,0,0,114,13, 32,0,0,0,114,38,0,0,0,114,13,0,0,0,114,90,
0,0,0,114,90,0,0,0,114,91,0,0,0,114,47,0, 0,0,0,114,91,0,0,0,114,47,0,0,0,114,63,0,
0,0,114,63,0,0,0,114,54,0,0,0,114,40,0,0, 0,0,114,54,0,0,0,114,40,0,0,0,114,126,0,0,
0,114,126,0,0,0,114,46,0,0,0,114,9,0,0,0, 0,114,46,0,0,0,114,9,0,0,0,114,9,0,0,0,
114,9,0,0,0,114,10,0,0,0,114,44,0,0,0,186, 114,10,0,0,0,114,44,0,0,0,186,2,0,0,115,36,
2,0,0,115,36,0,0,0,0,1,10,1,14,1,8,1, 0,0,0,0,1,10,1,14,1,8,1,22,1,2,1,14,
22,1,2,1,14,1,14,1,6,2,8,1,12,1,4,1, 1,14,1,6,2,8,1,12,1,4,1,18,2,10,1,8,
18,2,10,1,8,3,2,1,8,1,16,2,114,44,0,0, 3,2,1,8,1,16,2,114,44,0,0,0,99,0,0,0,
0,99,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,
0,0,2,0,0,0,64,0,0,0,115,60,0,0,0,101, 0,64,0,0,0,115,60,0,0,0,101,0,90,1,100,0,
0,90,1,100,0,90,2,100,1,90,3,100,2,90,4,100, 90,2,100,1,90,3,100,2,90,4,100,3,100,4,132,0,
3,100,4,132,0,90,5,100,5,100,6,132,0,90,6,100, 90,5,100,5,100,6,132,0,90,6,100,7,100,8,132,0,
7,100,8,132,0,90,7,100,9,100,10,132,0,90,8,100, 90,7,100,9,100,10,132,0,90,8,100,11,100,12,132,0,
11,100,12,132,0,90,9,100,13,83,0,41,14,114,80,0, 90,9,100,13,83,0,41,14,114,80,0,0,0,122,165,80,
0,0,122,165,80,114,105,118,97,116,101,32,99,108,97,115, 114,105,118,97,116,101,32,99,108,97,115,115,32,117,115,101,
115,32,117,115,101,100,32,116,111,32,115,117,112,112,111,114, 100,32,116,111,32,115,117,112,112,111,114,116,32,90,105,112,
116,32,90,105,112,73,109,112,111,114,116,46,103,101,116,95, 73,109,112,111,114,116,46,103,101,116,95,114,101,115,111,117,
114,101,115,111,117,114,99,101,95,114,101,97,100,101,114,40, 114,99,101,95,114,101,97,100,101,114,40,41,46,10,10,32,
41,46,10,10,32,32,32,32,84,104,105,115,32,99,108,97, 32,32,32,84,104,105,115,32,99,108,97,115,115,32,105,115,
115,115,32,105,115,32,97,108,108,111,119,101,100,32,116,111, 32,97,108,108,111,119,101,100,32,116,111,32,114,101,102,101,
32,114,101,102,101,114,101,110,99,101,32,97,108,108,32,116, 114,101,110,99,101,32,97,108,108,32,116,104,101,32,105,110,
104,101,32,105,110,110,97,114,100,115,32,97,110,100,32,112, 110,97,114,100,115,32,97,110,100,32,112,114,105,118,97,116,
114,105,118,97,116,101,32,112,97,114,116,115,32,111,102,10, 101,32,112,97,114,116,115,32,111,102,10,32,32,32,32,116,
32,32,32,32,116,104,101,32,122,105,112,105,109,112,111,114, 104,101,32,122,105,112,105,109,112,111,114,116,101,114,46,10,
116,101,114,46,10,32,32,32,32,70,99,3,0,0,0,0, 32,32,32,32,70,99,3,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,67, 0,0,3,0,0,0,2,0,0,0,67,0,0,0,115,16,
0,0,0,115,16,0,0,0,124,1,124,0,95,0,124,2, 0,0,0,124,1,124,0,95,0,124,2,124,0,95,1,100,
124,0,95,1,100,0,83,0,114,88,0,0,0,41,2,114, 0,83,0,114,88,0,0,0,41,2,114,4,0,0,0,114,
4,0,0,0,114,38,0,0,0,41,3,114,32,0,0,0, 38,0,0,0,41,3,114,32,0,0,0,114,4,0,0,0,
114,4,0,0,0,114,38,0,0,0,114,9,0,0,0,114, 114,38,0,0,0,114,9,0,0,0,114,9,0,0,0,114,
9,0,0,0,114,10,0,0,0,114,34,0,0,0,220,2, 10,0,0,0,114,34,0,0,0,220,2,0,0,115,4,0,
0,0,115,4,0,0,0,0,1,6,1,122,33,95,90,105, 0,0,0,1,6,1,122,33,95,90,105,112,73,109,112,111,
112,73,109,112,111,114,116,82,101,115,111,117,114,99,101,82, 114,116,82,101,115,111,117,114,99,101,82,101,97,100,101,114,
101,97,100,101,114,46,95,95,105,110,105,116,95,95,99,2, 46,95,95,105,110,105,116,95,95,99,2,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,8, 0,0,0,0,0,0,5,0,0,0,8,0,0,0,67,0,
0,0,0,67,0,0,0,115,92,0,0,0,124,0,106,0, 0,0,115,92,0,0,0,124,0,106,0,160,1,100,1,100,
160,1,100,1,100,2,161,2,125,2,124,2,155,0,100,2, 2,161,2,125,2,124,2,155,0,100,2,124,1,155,0,157,
124,1,155,0,157,3,125,3,100,3,100,4,108,2,109,3, 3,125,3,100,3,100,4,108,2,109,3,125,4,1,0,122,
125,4,1,0,122,18,124,4,124,0,106,4,160,5,124,3, 18,124,4,124,0,106,4,160,5,124,3,161,1,131,1,87,
161,1,131,1,87,0,83,0,4,0,116,6,107,10,114,86, 0,83,0,4,0,116,6,107,10,114,86,1,0,1,0,1,
1,0,1,0,1,0,116,7,124,3,131,1,130,1,89,0, 0,116,7,124,3,131,1,130,1,89,0,110,2,88,0,100,
110,2,88,0,100,0,83,0,41,5,78,114,85,0,0,0, 0,83,0,41,5,78,114,85,0,0,0,114,109,0,0,0,
114,109,0,0,0,114,0,0,0,0,41,1,218,7,66,121, 114,0,0,0,0,41,1,218,7,66,121,116,101,115,73,79,
116,101,115,73,79,41,8,114,38,0,0,0,114,19,0,0, 41,8,114,38,0,0,0,114,19,0,0,0,90,2,105,111,
0,90,2,105,111,114,177,0,0,0,114,4,0,0,0,114, 114,176,0,0,0,114,4,0,0,0,114,55,0,0,0,114,
55,0,0,0,114,22,0,0,0,218,17,70,105,108,101,78, 22,0,0,0,218,17,70,105,108,101,78,111,116,70,111,117,
111,116,70,111,117,110,100,69,114,114,111,114,41,5,114,32, 110,100,69,114,114,111,114,41,5,114,32,0,0,0,218,8,
0,0,0,218,8,114,101,115,111,117,114,99,101,218,16,102, 114,101,115,111,117,114,99,101,218,16,102,117,108,108,110,97,
117,108,108,110,97,109,101,95,97,115,95,112,97,116,104,114, 109,101,95,97,115,95,112,97,116,104,114,13,0,0,0,114,
13,0,0,0,114,177,0,0,0,114,9,0,0,0,114,9, 176,0,0,0,114,9,0,0,0,114,9,0,0,0,114,10,
0,0,0,114,10,0,0,0,218,13,111,112,101,110,95,114, 0,0,0,218,13,111,112,101,110,95,114,101,115,111,117,114,
101,115,111,117,114,99,101,224,2,0,0,115,14,0,0,0, 99,101,224,2,0,0,115,14,0,0,0,0,1,14,1,14,
0,1,14,1,14,1,12,1,2,1,18,1,14,1,122,38, 1,12,1,2,1,18,1,14,1,122,38,95,90,105,112,73,
95,90,105,112,73,109,112,111,114,116,82,101,115,111,117,114, 109,112,111,114,116,82,101,115,111,117,114,99,101,82,101,97,
99,101,82,101,97,100,101,114,46,111,112,101,110,95,114,101, 100,101,114,46,111,112,101,110,95,114,101,115,111,117,114,99,
115,111,117,114,99,101,99,2,0,0,0,0,0,0,0,0, 101,99,2,0,0,0,0,0,0,0,0,0,0,0,2,0,
0,0,0,2,0,0,0,1,0,0,0,67,0,0,0,115, 0,0,1,0,0,0,67,0,0,0,115,8,0,0,0,116,
8,0,0,0,116,0,130,1,100,0,83,0,114,88,0,0, 0,130,1,100,0,83,0,114,88,0,0,0,41,1,114,177,
0,41,1,114,178,0,0,0,41,2,114,32,0,0,0,114, 0,0,0,41,2,114,32,0,0,0,114,178,0,0,0,114,
179,0,0,0,114,9,0,0,0,114,9,0,0,0,114,10, 9,0,0,0,114,9,0,0,0,114,10,0,0,0,218,13,
0,0,0,218,13,114,101,115,111,117,114,99,101,95,112,97, 114,101,115,111,117,114,99,101,95,112,97,116,104,233,2,0,
116,104,233,2,0,0,115,2,0,0,0,0,4,122,38,95, 0,115,2,0,0,0,0,4,122,38,95,90,105,112,73,109,
90,105,112,73,109,112,111,114,116,82,101,115,111,117,114,99,
101,82,101,97,100,101,114,46,114,101,115,111,117,114,99,101,
95,112,97,116,104,99,2,0,0,0,0,0,0,0,0,0,
0,0,4,0,0,0,8,0,0,0,67,0,0,0,115,72,
0,0,0,124,0,106,0,160,1,100,1,100,2,161,2,125,
2,124,2,155,0,100,2,124,1,155,0,157,3,125,3,122,
16,124,0,106,2,160,3,124,3,161,1,1,0,87,0,110,
22,4,0,116,4,107,10,114,66,1,0,1,0,1,0,89,
0,100,3,83,0,88,0,100,4,83,0,41,5,78,114,85,
0,0,0,114,109,0,0,0,70,84,41,5,114,38,0,0,
0,114,19,0,0,0,114,4,0,0,0,114,55,0,0,0,
114,22,0,0,0,41,4,114,32,0,0,0,114,59,0,0,
0,114,180,0,0,0,114,13,0,0,0,114,9,0,0,0,
114,9,0,0,0,114,10,0,0,0,218,11,105,115,95,114,
101,115,111,117,114,99,101,239,2,0,0,115,14,0,0,0,
0,3,14,1,14,1,2,1,16,1,14,1,8,1,122,36,
95,90,105,112,73,109,112,111,114,116,82,101,115,111,117,114,
99,101,82,101,97,100,101,114,46,105,115,95,114,101,115,111,
117,114,99,101,99,1,0,0,0,0,0,0,0,0,0,0,
0,9,0,0,0,9,0,0,0,99,0,0,0,115,186,0,
0,0,100,1,100,2,108,0,109,1,125,1,1,0,124,1,
124,0,106,2,160,3,124,0,106,4,161,1,131,1,125,2,
124,2,160,5,124,0,106,2,106,6,161,1,125,3,124,3,
106,7,100,3,107,2,115,58,116,8,130,1,124,3,106,9,
125,4,116,10,131,0,125,5,124,0,106,2,106,11,68,0,
93,102,125,6,122,18,124,1,124,6,131,1,160,5,124,4,
161,1,125,7,87,0,110,24,4,0,116,12,107,10,114,124,
1,0,1,0,1,0,89,0,113,78,89,0,110,2,88,0,
124,7,106,9,106,7,125,8,116,13,124,8,131,1,100,1,
107,2,114,156,124,7,106,7,86,0,1,0,113,78,124,8,
124,5,107,7,114,78,124,5,160,14,124,8,161,1,1,0,
124,8,86,0,1,0,113,78,100,0,83,0,41,4,78,114,
0,0,0,0,41,1,218,4,80,97,116,104,114,60,0,0,
0,41,15,90,7,112,97,116,104,108,105,98,114,184,0,0,
0,114,4,0,0,0,114,56,0,0,0,114,38,0,0,0,
90,11,114,101,108,97,116,105,118,101,95,116,111,114,29,0,
0,0,114,59,0,0,0,114,175,0,0,0,90,6,112,97,
114,101,110,116,218,3,115,101,116,114,28,0,0,0,114,23,
0,0,0,114,51,0,0,0,218,3,97,100,100,41,9,114,
32,0,0,0,114,184,0,0,0,90,13,102,117,108,108,110,
97,109,101,95,112,97,116,104,90,13,114,101,108,97,116,105,
118,101,95,112,97,116,104,90,12,112,97,99,107,97,103,101,
95,112,97,116,104,90,12,115,117,98,100,105,114,115,95,115,
101,101,110,218,8,102,105,108,101,110,97,109,101,90,8,114,
101,108,97,116,105,118,101,90,11,112,97,114,101,110,116,95,
110,97,109,101,114,9,0,0,0,114,9,0,0,0,114,10,
0,0,0,218,8,99,111,110,116,101,110,116,115,250,2,0,
0,115,34,0,0,0,0,8,12,1,18,1,14,3,14,1,
6,1,6,1,12,1,2,1,18,1,14,1,10,5,8,1,
12,1,10,1,8,1,10,1,122,33,95,90,105,112,73,109,
112,111,114,116,82,101,115,111,117,114,99,101,82,101,97,100, 112,111,114,116,82,101,115,111,117,114,99,101,82,101,97,100,
101,114,46,99,111,110,116,101,110,116,115,78,41,10,114,6, 101,114,46,114,101,115,111,117,114,99,101,95,112,97,116,104,
0,0,0,114,7,0,0,0,114,8,0,0,0,114,84,0, 99,2,0,0,0,0,0,0,0,0,0,0,0,4,0,0,
0,0,114,81,0,0,0,114,34,0,0,0,114,181,0,0, 0,8,0,0,0,67,0,0,0,115,72,0,0,0,124,0,
0,114,182,0,0,0,114,183,0,0,0,114,188,0,0,0, 106,0,160,1,100,1,100,2,161,2,125,2,124,2,155,0,
114,9,0,0,0,114,9,0,0,0,114,9,0,0,0,114, 100,2,124,1,155,0,157,3,125,3,122,16,124,0,106,2,
10,0,0,0,114,80,0,0,0,212,2,0,0,115,14,0, 160,3,124,3,161,1,1,0,87,0,110,22,4,0,116,4,
0,0,8,1,4,5,4,2,8,4,8,9,8,6,8,11, 107,10,114,66,1,0,1,0,1,0,89,0,100,3,83,0,
114,80,0,0,0,41,45,114,84,0,0,0,90,26,95,102, 88,0,100,4,83,0,41,5,78,114,85,0,0,0,114,109,
114,111,122,101,110,95,105,109,112,111,114,116,108,105,98,95, 0,0,0,70,84,41,5,114,38,0,0,0,114,19,0,0,
101,120,116,101,114,110,97,108,114,21,0,0,0,114,1,0, 0,114,4,0,0,0,114,55,0,0,0,114,22,0,0,0,
0,0,114,2,0,0,0,90,17,95,102,114,111,122,101,110, 41,4,114,32,0,0,0,114,59,0,0,0,114,179,0,0,
95,105,109,112,111,114,116,108,105,98,114,76,0,0,0,114, 0,114,13,0,0,0,114,9,0,0,0,114,9,0,0,0,
148,0,0,0,114,110,0,0,0,114,152,0,0,0,114,67, 114,10,0,0,0,218,11,105,115,95,114,101,115,111,117,114,
0,0,0,114,131,0,0,0,90,7,95,95,97,108,108,95, 99,101,239,2,0,0,115,14,0,0,0,0,3,14,1,14,
95,114,20,0,0,0,90,15,112,97,116,104,95,115,101,112, 1,2,1,16,1,14,1,8,1,122,36,95,90,105,112,73,
97,114,97,116,111,114,115,114,18,0,0,0,114,75,0,0, 109,112,111,114,116,82,101,115,111,117,114,99,101,82,101,97,
0,114,3,0,0,0,114,25,0,0,0,218,4,116,121,112, 100,101,114,46,105,115,95,114,101,115,111,117,114,99,101,99,
101,114,70,0,0,0,114,113,0,0,0,114,115,0,0,0, 1,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,
114,117,0,0,0,114,4,0,0,0,114,89,0,0,0,114, 9,0,0,0,99,0,0,0,115,186,0,0,0,100,1,100,
36,0,0,0,114,37,0,0,0,114,35,0,0,0,114,27, 2,108,0,109,1,125,1,1,0,124,1,124,0,106,2,160,
0,0,0,114,122,0,0,0,114,142,0,0,0,114,144,0, 3,124,0,106,4,161,1,131,1,125,2,124,2,160,5,124,
0,0,114,52,0,0,0,114,147,0,0,0,114,155,0,0, 0,106,2,106,6,161,1,125,3,124,3,106,7,100,3,107,
0,218,8,95,95,99,111,100,101,95,95,114,153,0,0,0, 2,115,58,74,0,130,1,124,3,106,8,125,4,116,9,131,
114,159,0,0,0,114,161,0,0,0,114,169,0,0,0,114, 0,125,5,124,0,106,2,106,10,68,0,93,102,125,6,122,
151,0,0,0,114,149,0,0,0,114,44,0,0,0,114,80, 18,124,1,124,6,131,1,160,5,124,4,161,1,125,7,87,
0,0,0,114,9,0,0,0,114,9,0,0,0,114,9,0, 0,110,24,4,0,116,11,107,10,114,124,1,0,1,0,1,
0,0,114,10,0,0,0,218,8,60,109,111,100,117,108,101, 0,89,0,113,78,89,0,110,2,88,0,124,7,106,8,106,
62,1,0,0,0,115,88,0,0,0,4,16,8,1,16,1, 7,125,8,116,12,124,8,131,1,100,1,107,2,114,156,124,
8,1,8,1,8,1,8,1,8,1,8,2,8,3,6,1, 7,106,7,86,0,1,0,113,78,124,8,124,5,107,7,114,
14,3,16,4,4,2,8,2,4,1,4,1,4,2,14,127, 78,124,5,160,13,124,8,161,1,1,0,124,8,86,0,1,
0,127,0,1,12,1,12,1,2,1,2,252,4,9,8,4, 0,113,78,100,0,83,0,41,4,78,114,0,0,0,0,41,
8,9,8,31,8,126,2,254,2,29,4,5,8,21,8,46, 1,218,4,80,97,116,104,114,60,0,0,0,41,14,90,7,
8,10,8,46,10,5,8,7,8,6,8,13,8,19,8,15, 112,97,116,104,108,105,98,114,183,0,0,0,114,4,0,0,
8,26, 0,114,56,0,0,0,114,38,0,0,0,90,11,114,101,108,
97,116,105,118,101,95,116,111,114,29,0,0,0,114,59,0,
0,0,90,6,112,97,114,101,110,116,218,3,115,101,116,114,
28,0,0,0,114,23,0,0,0,114,51,0,0,0,218,3,
97,100,100,41,9,114,32,0,0,0,114,183,0,0,0,90,
13,102,117,108,108,110,97,109,101,95,112,97,116,104,90,13,
114,101,108,97,116,105,118,101,95,112,97,116,104,90,12,112,
97,99,107,97,103,101,95,112,97,116,104,90,12,115,117,98,
100,105,114,115,95,115,101,101,110,218,8,102,105,108,101,110,
97,109,101,90,8,114,101,108,97,116,105,118,101,90,11,112,
97,114,101,110,116,95,110,97,109,101,114,9,0,0,0,114,
9,0,0,0,114,10,0,0,0,218,8,99,111,110,116,101,
110,116,115,250,2,0,0,115,34,0,0,0,0,8,12,1,
18,1,14,3,14,1,6,1,6,1,12,1,2,1,18,1,
14,1,10,5,8,1,12,1,10,1,8,1,10,1,122,33,
95,90,105,112,73,109,112,111,114,116,82,101,115,111,117,114,
99,101,82,101,97,100,101,114,46,99,111,110,116,101,110,116,
115,78,41,10,114,6,0,0,0,114,7,0,0,0,114,8,
0,0,0,114,84,0,0,0,114,81,0,0,0,114,34,0,
0,0,114,180,0,0,0,114,181,0,0,0,114,182,0,0,
0,114,187,0,0,0,114,9,0,0,0,114,9,0,0,0,
114,9,0,0,0,114,10,0,0,0,114,80,0,0,0,212,
2,0,0,115,14,0,0,0,8,1,4,5,4,2,8,4,
8,9,8,6,8,11,114,80,0,0,0,41,45,114,84,0,
0,0,90,26,95,102,114,111,122,101,110,95,105,109,112,111,
114,116,108,105,98,95,101,120,116,101,114,110,97,108,114,21,
0,0,0,114,1,0,0,0,114,2,0,0,0,90,17,95,
102,114,111,122,101,110,95,105,109,112,111,114,116,108,105,98,
114,76,0,0,0,114,148,0,0,0,114,110,0,0,0,114,
152,0,0,0,114,67,0,0,0,114,131,0,0,0,90,7,
95,95,97,108,108,95,95,114,20,0,0,0,90,15,112,97,
116,104,95,115,101,112,97,114,97,116,111,114,115,114,18,0,
0,0,114,75,0,0,0,114,3,0,0,0,114,25,0,0,
0,218,4,116,121,112,101,114,70,0,0,0,114,113,0,0,
0,114,115,0,0,0,114,117,0,0,0,114,4,0,0,0,
114,89,0,0,0,114,36,0,0,0,114,37,0,0,0,114,
35,0,0,0,114,27,0,0,0,114,122,0,0,0,114,142,
0,0,0,114,144,0,0,0,114,52,0,0,0,114,147,0,
0,0,114,155,0,0,0,218,8,95,95,99,111,100,101,95,
95,114,153,0,0,0,114,159,0,0,0,114,161,0,0,0,
114,169,0,0,0,114,151,0,0,0,114,149,0,0,0,114,
44,0,0,0,114,80,0,0,0,114,9,0,0,0,114,9,
0,0,0,114,9,0,0,0,114,10,0,0,0,218,8,60,
109,111,100,117,108,101,62,1,0,0,0,115,88,0,0,0,
4,16,8,1,16,1,8,1,8,1,8,1,8,1,8,1,
8,2,8,3,6,1,14,3,16,4,4,2,8,2,4,1,
4,1,4,2,14,127,0,127,0,1,12,1,12,1,2,1,
2,252,4,9,8,4,8,9,8,31,8,126,2,254,2,29,
4,5,8,21,8,46,8,10,8,46,10,5,8,7,8,6,
8,13,8,19,8,15,8,26,
}; };

View File

@ -73,7 +73,7 @@ static void *opcode_targets[256] = {
&&TARGET_LOAD_BUILD_CLASS, &&TARGET_LOAD_BUILD_CLASS,
&&TARGET_YIELD_FROM, &&TARGET_YIELD_FROM,
&&TARGET_GET_AWAITABLE, &&TARGET_GET_AWAITABLE,
&&_unknown_opcode, &&TARGET_LOAD_ASSERTION_ERROR,
&&TARGET_INPLACE_LSHIFT, &&TARGET_INPLACE_LSHIFT,
&&TARGET_INPLACE_RSHIFT, &&TARGET_INPLACE_RSHIFT,
&&TARGET_INPLACE_AND, &&TARGET_INPLACE_AND,