From d06fd46eb2add3a459dfbbbe178b00f0bd1e17ac Mon Sep 17 00:00:00 2001 From: Irit Katriel Date: Fri, 9 Sep 2022 17:56:36 +0100 Subject: [PATCH] update test_dis --- Lib/test/test_dis.py | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/Lib/test/test_dis.py b/Lib/test/test_dis.py index 48d596027870fc..fc2862c61baadb 100644 --- a/Lib/test/test_dis.py +++ b/Lib/test/test_dis.py @@ -360,13 +360,13 @@ def bug42562(): --> BINARY_OP 11 (/) POP_TOP -%3d >> LOAD_FAST_CHECK 1 (tb) +%3d LOAD_FAST_CHECK 1 (tb) RETURN_VALUE >> PUSH_EXC_INFO %3d LOAD_GLOBAL 0 (Exception) CHECK_EXC_MATCH - POP_JUMP_IF_FALSE 22 (to 80) + POP_JUMP_IF_FALSE 23 (to 82) STORE_FAST 0 (e) %3d LOAD_FAST 0 (e) @@ -376,7 +376,9 @@ def bug42562(): LOAD_CONST 0 (None) STORE_FAST 0 (e) DELETE_FAST 0 (e) - JUMP_BACKWARD 29 (to 14) + +%3d LOAD_FAST 1 (tb) + RETURN_VALUE >> LOAD_CONST 0 (None) STORE_FAST 0 (e) DELETE_FAST 0 (e) @@ -394,6 +396,7 @@ def bug42562(): TRACEBACK_CODE.co_firstlineno + 5, TRACEBACK_CODE.co_firstlineno + 3, TRACEBACK_CODE.co_firstlineno + 4, + TRACEBACK_CODE.co_firstlineno + 5, TRACEBACK_CODE.co_firstlineno + 3) def _fstring(a, b, c, d): @@ -440,7 +443,7 @@ def _with(c): CALL 2 POP_TOP -%3d >> LOAD_CONST 2 (2) +%3d LOAD_CONST 2 (2) STORE_FAST 2 (y) LOAD_CONST 0 (None) RETURN_VALUE @@ -453,7 +456,11 @@ def _with(c): POP_EXCEPT POP_TOP POP_TOP - JUMP_BACKWARD 13 (to 30) + +%3d LOAD_CONST 2 (2) + STORE_FAST 2 (y) + LOAD_CONST 0 (None) + RETURN_VALUE >> COPY 3 POP_EXCEPT RERAISE 1 @@ -465,6 +472,7 @@ def _with(c): _with.__code__.co_firstlineno + 1, _with.__code__.co_firstlineno + 3, _with.__code__.co_firstlineno + 1, + _with.__code__.co_firstlineno + 3, ) async def _asyncwith(c): @@ -502,7 +510,7 @@ async def _asyncwith(c): JUMP_BACKWARD_NO_INTERRUPT 4 (to 48) >> POP_TOP -%3d >> LOAD_CONST 2 (2) +%3d LOAD_CONST 2 (2) STORE_FAST 2 (y) LOAD_CONST 0 (None) RETURN_VALUE @@ -526,7 +534,11 @@ async def _asyncwith(c): POP_EXCEPT POP_TOP POP_TOP - JUMP_BACKWARD 24 (to 58) + +%3d LOAD_CONST 2 (2) + STORE_FAST 2 (y) + LOAD_CONST 0 (None) + RETURN_VALUE >> COPY 3 POP_EXCEPT RERAISE 1 @@ -538,6 +550,7 @@ async def _asyncwith(c): _asyncwith.__code__.co_firstlineno + 1, _asyncwith.__code__.co_firstlineno + 3, _asyncwith.__code__.co_firstlineno + 1, + _asyncwith.__code__.co_firstlineno + 3, )