| 
									
										
										
										
											2024-02-26 08:42:53 -08:00
										 |  |  | // This file is generated by Tools/cases_generator/optimizer_generator.py
 | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  | // from:
 | 
					
						
							| 
									
										
										
										
											2024-02-26 08:42:53 -08:00
										 |  |  | //   Python/optimizer_bytecodes.c
 | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  | // Do not edit!
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _NOP: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 |  |  |         case _CHECK_PERIODIC: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CHECK_PERIODIC_IF_NOT_YIELD_FROM: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         /* _QUICKEN_RESUME is not a viable micro-op for tier 2 */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-11-04 11:13:32 -08:00
										 |  |  |         /* _LOAD_BYTECODE is not a viable micro-op for tier 2 */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |         case _RESUME_CHECK: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 |  |  |         /* _MONITOR_RESUME is not a viable micro-op for tier 2 */ | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_FAST_CHECK: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *value; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             value = GETLOCAL(oparg); | 
					
						
							|  |  |  |             // We guarantee this will error - just bail and don't optimize it.
 | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             if (sym_is_null(value)) { | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |                 ctx->done = true; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             } | 
					
						
							|  |  |  |             stack_pointer[0] = value; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_FAST: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *value; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             value = GETLOCAL(oparg); | 
					
						
							|  |  |  |             stack_pointer[0] = value; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_FAST_AND_CLEAR: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *value; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             value = GETLOCAL(oparg); | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             _Py_UopsSymbol *temp = sym_new_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             GETLOCAL(oparg) = temp; | 
					
						
							|  |  |  |             stack_pointer[0] = value; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_CONST: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *value; | 
					
						
							| 
									
										
										
										
											2024-04-18 11:09:30 +01:00
										 |  |  |             PyObject *val = PyTuple_GET_ITEM(co->co_consts, this_instr->oparg); | 
					
						
							|  |  |  |             int opcode = _Py_IsImmortal(val) ? _LOAD_CONST_INLINE_BORROW : _LOAD_CONST_INLINE; | 
					
						
							|  |  |  |             REPLACE_OP(this_instr, opcode, 0, (uintptr_t)val); | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             value = sym_new_const(ctx, val); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[0] = value; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-10-29 11:15:42 +00:00
										 |  |  |         case _LOAD_CONST_IMMORTAL: { | 
					
						
							|  |  |  |             _Py_UopsSymbol *value; | 
					
						
							|  |  |  |             PyObject *val = PyTuple_GET_ITEM(co->co_consts, this_instr->oparg); | 
					
						
							|  |  |  |             REPLACE_OP(this_instr, _LOAD_CONST_INLINE_BORROW, 0, (uintptr_t)val); | 
					
						
							|  |  |  |             value = sym_new_const(ctx, val); | 
					
						
							|  |  |  |             stack_pointer[0] = value; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							|  |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_SMALL_INT: { | 
					
						
							|  |  |  |             _Py_UopsSymbol *value; | 
					
						
							|  |  |  |             PyObject *val = PyLong_FromLong(this_instr->oparg); | 
					
						
							|  |  |  |             value = sym_new_const(ctx, val); | 
					
						
							|  |  |  |             stack_pointer[0] = value; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							|  |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |         case _STORE_FAST: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *value; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             value = stack_pointer[-1]; | 
					
						
							|  |  |  |             GETLOCAL(oparg) = value; | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _POP_TOP: { | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _PUSH_NULL: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							|  |  |  |             res = sym_new_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[0] = res; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _END_SEND: { | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |             _Py_UopsSymbol *val; | 
					
						
							|  |  |  |             val = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             stack_pointer[-2] = val; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _UNARY_NEGATIVE: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = res; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _UNARY_NOT: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = res; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _TO_BOOL: { | 
					
						
							| 
									
										
										
										
											2024-03-01 06:13:38 +08:00
										 |  |  |             _Py_UopsSymbol *value; | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-01 06:13:38 +08:00
										 |  |  |             value = stack_pointer[-1]; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             if (!optimize_to_bool(this_instr, ctx, value, &res)) { | 
					
						
							| 
									
										
										
										
											2024-03-05 11:23:46 +00:00
										 |  |  |                 res = sym_new_type(ctx, &PyBool_Type); | 
					
						
							|  |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = res; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _TO_BOOL_BOOL: { | 
					
						
							| 
									
										
										
										
											2024-03-01 06:13:38 +08:00
										 |  |  |             _Py_UopsSymbol *value; | 
					
						
							| 
									
										
										
										
											2024-03-05 11:23:46 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-01 06:13:38 +08:00
										 |  |  |             value = stack_pointer[-1]; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             if (!optimize_to_bool(this_instr, ctx, value, &res)) { | 
					
						
							|  |  |  |                 sym_set_type(value, &PyBool_Type); | 
					
						
							| 
									
										
										
										
											2024-03-05 11:23:46 +00:00
										 |  |  |                 res = value; | 
					
						
							| 
									
										
										
										
											2024-03-01 06:13:38 +08:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-03-05 11:23:46 +00:00
										 |  |  |             stack_pointer[-1] = res; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _TO_BOOL_INT: { | 
					
						
							| 
									
										
										
										
											2024-03-01 06:13:38 +08:00
										 |  |  |             _Py_UopsSymbol *value; | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-01 06:13:38 +08:00
										 |  |  |             value = stack_pointer[-1]; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             if (!optimize_to_bool(this_instr, ctx, value, &res)) { | 
					
						
							|  |  |  |                 sym_set_type(value, &PyLong_Type); | 
					
						
							|  |  |  |                 res = sym_new_type(ctx, &PyBool_Type); | 
					
						
							| 
									
										
										
										
											2024-03-01 06:13:38 +08:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = res; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _TO_BOOL_LIST: { | 
					
						
							| 
									
										
										
										
											2024-03-01 06:13:38 +08:00
										 |  |  |             _Py_UopsSymbol *value; | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-01 06:13:38 +08:00
										 |  |  |             value = stack_pointer[-1]; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             if (!optimize_to_bool(this_instr, ctx, value, &res)) { | 
					
						
							|  |  |  |                 sym_set_type(value, &PyList_Type); | 
					
						
							|  |  |  |                 res = sym_new_type(ctx, &PyBool_Type); | 
					
						
							| 
									
										
										
										
											2024-03-01 06:13:38 +08:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = res; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _TO_BOOL_NONE: { | 
					
						
							| 
									
										
										
										
											2024-03-01 06:13:38 +08:00
										 |  |  |             _Py_UopsSymbol *value; | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-01 06:13:38 +08:00
										 |  |  |             value = stack_pointer[-1]; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             if (!optimize_to_bool(this_instr, ctx, value, &res)) { | 
					
						
							|  |  |  |                 sym_set_const(value, Py_None); | 
					
						
							|  |  |  |                 res = sym_new_const(ctx, Py_False); | 
					
						
							| 
									
										
										
										
											2024-03-01 06:13:38 +08:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = res; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _TO_BOOL_STR: { | 
					
						
							| 
									
										
										
										
											2024-03-01 06:13:38 +08:00
										 |  |  |             _Py_UopsSymbol *value; | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-01 06:13:38 +08:00
										 |  |  |             value = stack_pointer[-1]; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             if (!optimize_to_bool(this_instr, ctx, value, &res)) { | 
					
						
							|  |  |  |                 res = sym_new_type(ctx, &PyBool_Type); | 
					
						
							|  |  |  |                 sym_set_type(value, &PyUnicode_Type); | 
					
						
							| 
									
										
										
										
											2024-03-01 06:13:38 +08:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = res; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-05 15:23:08 +00:00
										 |  |  |         case _REPLACE_WITH_TRUE: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = res; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _UNARY_INVERT: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = res; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _GUARD_BOTH_INT: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *right; | 
					
						
							|  |  |  |             _Py_UopsSymbol *left; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             right = stack_pointer[-1]; | 
					
						
							|  |  |  |             left = stack_pointer[-2]; | 
					
						
							| 
									
										
										
										
											2024-04-22 13:34:06 +01:00
										 |  |  |             if (sym_matches_type(left, &PyLong_Type)) { | 
					
						
							|  |  |  |                 if (sym_matches_type(right, &PyLong_Type)) { | 
					
						
							|  |  |  |                     REPLACE_OP(this_instr, _NOP, 0, 0); | 
					
						
							|  |  |  |                 } | 
					
						
							|  |  |  |                 else { | 
					
						
							|  |  |  |                     REPLACE_OP(this_instr, _GUARD_TOS_INT, 0, 0); | 
					
						
							|  |  |  |                 } | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |             else { | 
					
						
							|  |  |  |                 if (sym_matches_type(right, &PyLong_Type)) { | 
					
						
							|  |  |  |                     REPLACE_OP(this_instr, _GUARD_NOS_INT, 0, 0); | 
					
						
							|  |  |  |                 } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             sym_set_type(left, &PyLong_Type); | 
					
						
							|  |  |  |             sym_set_type(right, &PyLong_Type); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-22 13:34:06 +01:00
										 |  |  |         case _GUARD_NOS_INT: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _GUARD_TOS_INT: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |         case _BINARY_OP_MULTIPLY_INT: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *right; | 
					
						
							|  |  |  |             _Py_UopsSymbol *left; | 
					
						
							|  |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-02-15 14:02:18 +08:00
										 |  |  |             right = stack_pointer[-1]; | 
					
						
							|  |  |  |             left = stack_pointer[-2]; | 
					
						
							| 
									
										
										
										
											2024-02-28 14:38:01 -08:00
										 |  |  |             if (sym_is_const(left) && sym_is_const(right) && | 
					
						
							|  |  |  |                 sym_matches_type(left, &PyLong_Type) && sym_matches_type(right, &PyLong_Type)) | 
					
						
							|  |  |  |             { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |                 assert(PyLong_CheckExact(sym_get_const(left))); | 
					
						
							|  |  |  |                 assert(PyLong_CheckExact(sym_get_const(right))); | 
					
						
							|  |  |  |                 PyObject *temp = _PyLong_Multiply((PyLongObject *)sym_get_const(left), | 
					
						
							|  |  |  |                     (PyLongObject *)sym_get_const(right)); | 
					
						
							| 
									
										
										
										
											2024-02-15 14:02:18 +08:00
										 |  |  |                 if (temp == NULL) { | 
					
						
							|  |  |  |                     goto error; | 
					
						
							|  |  |  |                 } | 
					
						
							| 
									
										
										
										
											2024-02-28 14:38:01 -08:00
										 |  |  |                 res = sym_new_const(ctx, temp); | 
					
						
							|  |  |  |                 Py_DECREF(temp); | 
					
						
							| 
									
										
										
										
											2024-02-16 22:59:43 +08:00
										 |  |  |                 // TODO gh-115506:
 | 
					
						
							|  |  |  |                 // replace opcode with constant propagated one and add tests!
 | 
					
						
							| 
									
										
										
										
											2024-02-15 14:02:18 +08:00
										 |  |  |             } | 
					
						
							|  |  |  |             else { | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |                 res = sym_new_type(ctx, &PyLong_Type); | 
					
						
							| 
									
										
										
										
											2024-02-15 14:02:18 +08:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2] = res; | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _BINARY_OP_ADD_INT: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *right; | 
					
						
							|  |  |  |             _Py_UopsSymbol *left; | 
					
						
							|  |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             right = stack_pointer[-1]; | 
					
						
							|  |  |  |             left = stack_pointer[-2]; | 
					
						
							| 
									
										
										
										
											2024-02-28 14:38:01 -08:00
										 |  |  |             if (sym_is_const(left) && sym_is_const(right) && | 
					
						
							|  |  |  |                 sym_matches_type(left, &PyLong_Type) && sym_matches_type(right, &PyLong_Type)) | 
					
						
							|  |  |  |             { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |                 assert(PyLong_CheckExact(sym_get_const(left))); | 
					
						
							|  |  |  |                 assert(PyLong_CheckExact(sym_get_const(right))); | 
					
						
							|  |  |  |                 PyObject *temp = _PyLong_Add((PyLongObject *)sym_get_const(left), | 
					
						
							|  |  |  |                     (PyLongObject *)sym_get_const(right)); | 
					
						
							| 
									
										
										
										
											2024-02-15 14:02:18 +08:00
										 |  |  |                 if (temp == NULL) { | 
					
						
							|  |  |  |                     goto error; | 
					
						
							|  |  |  |                 } | 
					
						
							| 
									
										
										
										
											2024-02-28 14:38:01 -08:00
										 |  |  |                 res = sym_new_const(ctx, temp); | 
					
						
							|  |  |  |                 Py_DECREF(temp); | 
					
						
							| 
									
										
										
										
											2024-02-16 22:59:43 +08:00
										 |  |  |                 // TODO gh-115506:
 | 
					
						
							|  |  |  |                 // replace opcode with constant propagated one and add tests!
 | 
					
						
							| 
									
										
										
										
											2024-02-15 14:02:18 +08:00
										 |  |  |             } | 
					
						
							|  |  |  |             else { | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |                 res = sym_new_type(ctx, &PyLong_Type); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             } | 
					
						
							|  |  |  |             stack_pointer[-2] = res; | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _BINARY_OP_SUBTRACT_INT: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *right; | 
					
						
							|  |  |  |             _Py_UopsSymbol *left; | 
					
						
							|  |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-02-15 14:02:18 +08:00
										 |  |  |             right = stack_pointer[-1]; | 
					
						
							|  |  |  |             left = stack_pointer[-2]; | 
					
						
							| 
									
										
										
										
											2024-02-28 14:38:01 -08:00
										 |  |  |             if (sym_is_const(left) && sym_is_const(right) && | 
					
						
							|  |  |  |                 sym_matches_type(left, &PyLong_Type) && sym_matches_type(right, &PyLong_Type)) | 
					
						
							|  |  |  |             { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |                 assert(PyLong_CheckExact(sym_get_const(left))); | 
					
						
							|  |  |  |                 assert(PyLong_CheckExact(sym_get_const(right))); | 
					
						
							|  |  |  |                 PyObject *temp = _PyLong_Subtract((PyLongObject *)sym_get_const(left), | 
					
						
							|  |  |  |                     (PyLongObject *)sym_get_const(right)); | 
					
						
							| 
									
										
										
										
											2024-02-15 14:02:18 +08:00
										 |  |  |                 if (temp == NULL) { | 
					
						
							|  |  |  |                     goto error; | 
					
						
							|  |  |  |                 } | 
					
						
							| 
									
										
										
										
											2024-02-28 14:38:01 -08:00
										 |  |  |                 res = sym_new_const(ctx, temp); | 
					
						
							|  |  |  |                 Py_DECREF(temp); | 
					
						
							| 
									
										
										
										
											2024-02-16 22:59:43 +08:00
										 |  |  |                 // TODO gh-115506:
 | 
					
						
							|  |  |  |                 // replace opcode with constant propagated one and add tests!
 | 
					
						
							| 
									
										
										
										
											2024-02-15 14:02:18 +08:00
										 |  |  |             } | 
					
						
							|  |  |  |             else { | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |                 res = sym_new_type(ctx, &PyLong_Type); | 
					
						
							| 
									
										
										
										
											2024-02-15 14:02:18 +08:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2] = res; | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _GUARD_BOTH_FLOAT: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *right; | 
					
						
							|  |  |  |             _Py_UopsSymbol *left; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             right = stack_pointer[-1]; | 
					
						
							|  |  |  |             left = stack_pointer[-2]; | 
					
						
							| 
									
										
										
										
											2024-04-22 13:34:06 +01:00
										 |  |  |             if (sym_matches_type(left, &PyFloat_Type)) { | 
					
						
							|  |  |  |                 if (sym_matches_type(right, &PyFloat_Type)) { | 
					
						
							|  |  |  |                     REPLACE_OP(this_instr, _NOP, 0, 0); | 
					
						
							|  |  |  |                 } | 
					
						
							|  |  |  |                 else { | 
					
						
							|  |  |  |                     REPLACE_OP(this_instr, _GUARD_TOS_FLOAT, 0, 0); | 
					
						
							|  |  |  |                 } | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |             else { | 
					
						
							|  |  |  |                 if (sym_matches_type(right, &PyFloat_Type)) { | 
					
						
							|  |  |  |                     REPLACE_OP(this_instr, _GUARD_NOS_FLOAT, 0, 0); | 
					
						
							|  |  |  |                 } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             sym_set_type(left, &PyFloat_Type); | 
					
						
							|  |  |  |             sym_set_type(right, &PyFloat_Type); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-22 13:34:06 +01:00
										 |  |  |         case _GUARD_NOS_FLOAT: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _GUARD_TOS_FLOAT: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |         case _BINARY_OP_MULTIPLY_FLOAT: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *right; | 
					
						
							|  |  |  |             _Py_UopsSymbol *left; | 
					
						
							|  |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-02-16 10:02:48 -08:00
										 |  |  |             right = stack_pointer[-1]; | 
					
						
							|  |  |  |             left = stack_pointer[-2]; | 
					
						
							| 
									
										
										
										
											2024-02-28 14:38:01 -08:00
										 |  |  |             if (sym_is_const(left) && sym_is_const(right) && | 
					
						
							|  |  |  |                 sym_matches_type(left, &PyFloat_Type) && sym_matches_type(right, &PyFloat_Type)) | 
					
						
							|  |  |  |             { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |                 assert(PyFloat_CheckExact(sym_get_const(left))); | 
					
						
							|  |  |  |                 assert(PyFloat_CheckExact(sym_get_const(right))); | 
					
						
							| 
									
										
										
										
											2024-02-16 10:02:48 -08:00
										 |  |  |                 PyObject *temp = PyFloat_FromDouble( | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |                     PyFloat_AS_DOUBLE(sym_get_const(left)) * | 
					
						
							|  |  |  |                     PyFloat_AS_DOUBLE(sym_get_const(right))); | 
					
						
							| 
									
										
										
										
											2024-02-16 10:02:48 -08:00
										 |  |  |                 if (temp == NULL) { | 
					
						
							|  |  |  |                     goto error; | 
					
						
							|  |  |  |                 } | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |                 res = sym_new_const(ctx, temp); | 
					
						
							| 
									
										
										
										
											2024-02-28 14:38:01 -08:00
										 |  |  |                 Py_DECREF(temp); | 
					
						
							| 
									
										
										
										
											2024-02-16 10:02:48 -08:00
										 |  |  |                 // TODO gh-115506:
 | 
					
						
							|  |  |  |                 // replace opcode with constant propagated one and update tests!
 | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |             else { | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |                 res = sym_new_type(ctx, &PyFloat_Type); | 
					
						
							| 
									
										
										
										
											2024-02-16 10:02:48 -08:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2] = res; | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _BINARY_OP_ADD_FLOAT: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *right; | 
					
						
							|  |  |  |             _Py_UopsSymbol *left; | 
					
						
							|  |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-02-16 10:02:48 -08:00
										 |  |  |             right = stack_pointer[-1]; | 
					
						
							|  |  |  |             left = stack_pointer[-2]; | 
					
						
							| 
									
										
										
										
											2024-02-28 14:38:01 -08:00
										 |  |  |             if (sym_is_const(left) && sym_is_const(right) && | 
					
						
							|  |  |  |                 sym_matches_type(left, &PyFloat_Type) && sym_matches_type(right, &PyFloat_Type)) | 
					
						
							|  |  |  |             { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |                 assert(PyFloat_CheckExact(sym_get_const(left))); | 
					
						
							|  |  |  |                 assert(PyFloat_CheckExact(sym_get_const(right))); | 
					
						
							| 
									
										
										
										
											2024-02-16 10:02:48 -08:00
										 |  |  |                 PyObject *temp = PyFloat_FromDouble( | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |                     PyFloat_AS_DOUBLE(sym_get_const(left)) + | 
					
						
							|  |  |  |                     PyFloat_AS_DOUBLE(sym_get_const(right))); | 
					
						
							| 
									
										
										
										
											2024-02-16 10:02:48 -08:00
										 |  |  |                 if (temp == NULL) { | 
					
						
							|  |  |  |                     goto error; | 
					
						
							|  |  |  |                 } | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |                 res = sym_new_const(ctx, temp); | 
					
						
							| 
									
										
										
										
											2024-02-28 14:38:01 -08:00
										 |  |  |                 Py_DECREF(temp); | 
					
						
							| 
									
										
										
										
											2024-02-16 10:02:48 -08:00
										 |  |  |                 // TODO gh-115506:
 | 
					
						
							|  |  |  |                 // replace opcode with constant propagated one and update tests!
 | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |             else { | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |                 res = sym_new_type(ctx, &PyFloat_Type); | 
					
						
							| 
									
										
										
										
											2024-02-16 10:02:48 -08:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2] = res; | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _BINARY_OP_SUBTRACT_FLOAT: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *right; | 
					
						
							|  |  |  |             _Py_UopsSymbol *left; | 
					
						
							|  |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-02-16 10:02:48 -08:00
										 |  |  |             right = stack_pointer[-1]; | 
					
						
							|  |  |  |             left = stack_pointer[-2]; | 
					
						
							| 
									
										
										
										
											2024-02-28 14:38:01 -08:00
										 |  |  |             if (sym_is_const(left) && sym_is_const(right) && | 
					
						
							|  |  |  |                 sym_matches_type(left, &PyFloat_Type) && sym_matches_type(right, &PyFloat_Type)) | 
					
						
							|  |  |  |             { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |                 assert(PyFloat_CheckExact(sym_get_const(left))); | 
					
						
							|  |  |  |                 assert(PyFloat_CheckExact(sym_get_const(right))); | 
					
						
							| 
									
										
										
										
											2024-02-16 10:02:48 -08:00
										 |  |  |                 PyObject *temp = PyFloat_FromDouble( | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |                     PyFloat_AS_DOUBLE(sym_get_const(left)) - | 
					
						
							|  |  |  |                     PyFloat_AS_DOUBLE(sym_get_const(right))); | 
					
						
							| 
									
										
										
										
											2024-02-16 10:02:48 -08:00
										 |  |  |                 if (temp == NULL) { | 
					
						
							|  |  |  |                     goto error; | 
					
						
							|  |  |  |                 } | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |                 res = sym_new_const(ctx, temp); | 
					
						
							| 
									
										
										
										
											2024-02-28 14:38:01 -08:00
										 |  |  |                 Py_DECREF(temp); | 
					
						
							| 
									
										
										
										
											2024-02-16 10:02:48 -08:00
										 |  |  |                 // TODO gh-115506:
 | 
					
						
							|  |  |  |                 // replace opcode with constant propagated one and update tests!
 | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |             else { | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |                 res = sym_new_type(ctx, &PyFloat_Type); | 
					
						
							| 
									
										
										
										
											2024-02-16 10:02:48 -08:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2] = res; | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _GUARD_BOTH_UNICODE: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *right; | 
					
						
							|  |  |  |             _Py_UopsSymbol *left; | 
					
						
							| 
									
										
										
										
											2024-02-20 19:30:49 +08:00
										 |  |  |             right = stack_pointer[-1]; | 
					
						
							|  |  |  |             left = stack_pointer[-2]; | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             if (sym_matches_type(left, &PyUnicode_Type) && | 
					
						
							|  |  |  |                 sym_matches_type(right, &PyUnicode_Type)) { | 
					
						
							| 
									
										
										
										
											2024-02-20 19:30:49 +08:00
										 |  |  |                 REPLACE_OP(this_instr, _NOP, 0 ,0); | 
					
						
							|  |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             sym_set_type(left, &PyUnicode_Type); | 
					
						
							|  |  |  |             sym_set_type(left, &PyUnicode_Type); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _BINARY_OP_ADD_UNICODE: { | 
					
						
							| 
									
										
										
										
											2024-03-02 03:40:04 +08:00
										 |  |  |             _Py_UopsSymbol *right; | 
					
						
							|  |  |  |             _Py_UopsSymbol *left; | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-02 03:40:04 +08:00
										 |  |  |             right = stack_pointer[-1]; | 
					
						
							|  |  |  |             left = stack_pointer[-2]; | 
					
						
							|  |  |  |             if (sym_is_const(left) && sym_is_const(right) && | 
					
						
							|  |  |  |                 sym_matches_type(left, &PyUnicode_Type) && sym_matches_type(right, &PyUnicode_Type)) { | 
					
						
							|  |  |  |                 PyObject *temp = PyUnicode_Concat(sym_get_const(left), sym_get_const(right)); | 
					
						
							|  |  |  |                 if (temp == NULL) { | 
					
						
							|  |  |  |                     goto error; | 
					
						
							|  |  |  |                 } | 
					
						
							|  |  |  |                 res = sym_new_const(ctx, temp); | 
					
						
							|  |  |  |                 Py_DECREF(temp); | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |             else { | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |                 res = sym_new_type(ctx, &PyUnicode_Type); | 
					
						
							| 
									
										
										
										
											2024-03-02 03:40:04 +08:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2] = res; | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-25 14:45:07 -07:00
										 |  |  |         case _BINARY_OP_INPLACE_ADD_UNICODE: { | 
					
						
							| 
									
										
										
										
											2024-10-28 14:37:16 -07:00
										 |  |  |             _Py_UopsSymbol *right; | 
					
						
							|  |  |  |             _Py_UopsSymbol *left; | 
					
						
							|  |  |  |             right = stack_pointer[-1]; | 
					
						
							|  |  |  |             left = stack_pointer[-2]; | 
					
						
							|  |  |  |             _Py_UopsSymbol *res; | 
					
						
							|  |  |  |             if (sym_is_const(left) && sym_is_const(right) && | 
					
						
							|  |  |  |                 sym_matches_type(left, &PyUnicode_Type) && sym_matches_type(right, &PyUnicode_Type)) { | 
					
						
							|  |  |  |                 PyObject *temp = PyUnicode_Concat(sym_get_const(left), sym_get_const(right)); | 
					
						
							|  |  |  |                 if (temp == NULL) { | 
					
						
							|  |  |  |                     goto error; | 
					
						
							|  |  |  |                 } | 
					
						
							|  |  |  |                 res = sym_new_const(ctx, temp); | 
					
						
							|  |  |  |                 Py_DECREF(temp); | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |             else { | 
					
						
							|  |  |  |                 res = sym_new_type(ctx, &PyUnicode_Type); | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |             // _STORE_FAST:
 | 
					
						
							| 
									
										
										
										
											2024-11-09 11:35:33 +08:00
										 |  |  |             GETLOCAL(this_instr->operand0) = res; | 
					
						
							| 
									
										
										
										
											2024-07-25 14:45:07 -07:00
										 |  |  |             stack_pointer += -2; | 
					
						
							|  |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |         case _BINARY_SUBSCR: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2] = res; | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _BINARY_SLICE: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-3] = res; | 
					
						
							|  |  |  |             stack_pointer += -2; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _STORE_SLICE: { | 
					
						
							|  |  |  |             stack_pointer += -4; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _BINARY_SUBSCR_LIST_INT: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2] = res; | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _BINARY_SUBSCR_STR_INT: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2] = res; | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _BINARY_SUBSCR_TUPLE_INT: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2] = res; | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _BINARY_SUBSCR_DICT: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2] = res; | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-08-02 00:19:05 +01:00
										 |  |  |         case _BINARY_SUBSCR_CHECK_FUNC: { | 
					
						
							| 
									
										
										
										
											2024-12-19 11:08:17 +09:00
										 |  |  |             _Py_UopsSymbol *getitem; | 
					
						
							|  |  |  |             getitem = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             stack_pointer[0] = getitem; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							|  |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-08-02 00:19:05 +01:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _BINARY_SUBSCR_INIT_CALL: { | 
					
						
							| 
									
										
										
										
											2024-12-19 11:08:17 +09:00
										 |  |  |             _Py_UopsSymbol *getitem; | 
					
						
							| 
									
										
										
										
											2024-08-12 18:35:52 +01:00
										 |  |  |             _Py_UopsSymbol *sub; | 
					
						
							|  |  |  |             _Py_UopsSymbol *container; | 
					
						
							|  |  |  |             _Py_UOpsAbstractFrame *new_frame; | 
					
						
							| 
									
										
										
										
											2024-12-19 11:08:17 +09:00
										 |  |  |             getitem = stack_pointer[-1]; | 
					
						
							|  |  |  |             sub = stack_pointer[-2]; | 
					
						
							|  |  |  |             container = stack_pointer[-3]; | 
					
						
							| 
									
										
										
										
											2024-08-12 18:35:52 +01:00
										 |  |  |             (void)container; | 
					
						
							|  |  |  |             (void)sub; | 
					
						
							| 
									
										
										
										
											2024-12-19 11:08:17 +09:00
										 |  |  |             (void)getitem; | 
					
						
							| 
									
										
										
										
											2024-08-12 18:35:52 +01:00
										 |  |  |             new_frame = NULL; | 
					
						
							|  |  |  |             ctx->done = true; | 
					
						
							| 
									
										
										
										
											2024-12-19 11:08:17 +09:00
										 |  |  |             stack_pointer[-3] = (_Py_UopsSymbol *)new_frame; | 
					
						
							|  |  |  |             stack_pointer += -2; | 
					
						
							| 
									
										
										
										
											2024-08-02 00:19:05 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |         case _LIST_APPEND: { | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _SET_ADD: { | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _STORE_SUBSCR: { | 
					
						
							|  |  |  |             stack_pointer += -3; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _STORE_SUBSCR_LIST_INT: { | 
					
						
							|  |  |  |             stack_pointer += -3; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _STORE_SUBSCR_DICT: { | 
					
						
							|  |  |  |             stack_pointer += -3; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _DELETE_SUBSCR: { | 
					
						
							|  |  |  |             stack_pointer += -2; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CALL_INTRINSIC_1: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = res; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CALL_INTRINSIC_2: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2] = res; | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-06-17 14:40:11 +01:00
										 |  |  |         case _RETURN_VALUE: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *retval; | 
					
						
							|  |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             retval = stack_pointer[-1]; | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             ctx->frame->stack_pointer = stack_pointer; | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             frame_pop(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer = ctx->frame->stack_pointer; | 
					
						
							| 
									
										
										
										
											2024-04-18 11:09:30 +01:00
										 |  |  |             /* Stack space handling */ | 
					
						
							|  |  |  |             assert(corresponding_check_stack == NULL); | 
					
						
							|  |  |  |             assert(co != NULL); | 
					
						
							|  |  |  |             int framesize = co->co_framesize; | 
					
						
							|  |  |  |             assert(framesize > 0); | 
					
						
							|  |  |  |             assert(framesize <= curr_space); | 
					
						
							|  |  |  |             curr_space -= framesize; | 
					
						
							|  |  |  |             co = get_code(this_instr); | 
					
						
							|  |  |  |             if (co == NULL) { | 
					
						
							|  |  |  |                 // might be impossible, but bailing is still safe
 | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |                 ctx->done = true; | 
					
						
							| 
									
										
										
										
											2024-04-18 11:09:30 +01:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |             res = retval; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[0] = res; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _GET_AITER: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *iter; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             iter = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = iter; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _GET_ANEXT: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *awaitable; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             awaitable = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[0] = awaitable; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _GET_AWAITABLE: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *iter; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             iter = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = iter; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         /* _SEND is not a viable micro-op for tier 2 */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-18 14:24:58 -07:00
										 |  |  |         case _SEND_GEN_FRAME: { | 
					
						
							|  |  |  |             // We are about to hit the end of the trace:
 | 
					
						
							|  |  |  |             ctx->done = true; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-30 11:33:13 +01:00
										 |  |  |         case _YIELD_VALUE: { | 
					
						
							|  |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             res = sym_new_unknown(ctx); | 
					
						
							| 
									
										
										
										
											2024-04-30 11:33:13 +01:00
										 |  |  |             stack_pointer[-1] = res; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |         case _POP_EXCEPT: { | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-05-21 20:46:39 -04:00
										 |  |  |         case _LOAD_COMMON_CONSTANT: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *value; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             value = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[0] = value; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_BUILD_CLASS: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *bc; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             bc = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[0] = bc; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _STORE_NAME: { | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _DELETE_NAME: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _UNPACK_SEQUENCE: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *seq; | 
					
						
							|  |  |  |             _Py_UopsSymbol **values; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             seq = stack_pointer[-1]; | 
					
						
							|  |  |  |             values = &stack_pointer[-1]; | 
					
						
							|  |  |  |             /* This has to be done manually */ | 
					
						
							|  |  |  |             (void)seq; | 
					
						
							|  |  |  |             for (int i = 0; i < oparg; i++) { | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |                 values[i] = sym_new_unknown(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             } | 
					
						
							|  |  |  |             stack_pointer += -1 + oparg; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _UNPACK_SEQUENCE_TWO_TUPLE: { | 
					
						
							| 
									
										
										
										
											2024-03-11 09:30:15 +00:00
										 |  |  |             _Py_UopsSymbol *val1; | 
					
						
							|  |  |  |             _Py_UopsSymbol *val0; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             val1 = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             val0 = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-03-11 09:30:15 +00:00
										 |  |  |             stack_pointer[-1] = val1; | 
					
						
							|  |  |  |             stack_pointer[0] = val0; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _UNPACK_SEQUENCE_TUPLE: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol **values; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             values = &stack_pointer[-1]; | 
					
						
							|  |  |  |             for (int _i = oparg; --_i >= 0;) { | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |                 values[_i] = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             } | 
					
						
							|  |  |  |             stack_pointer += -1 + oparg; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _UNPACK_SEQUENCE_LIST: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol **values; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             values = &stack_pointer[-1]; | 
					
						
							|  |  |  |             for (int _i = oparg; --_i >= 0;) { | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |                 values[_i] = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             } | 
					
						
							|  |  |  |             stack_pointer += -1 + oparg; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _UNPACK_EX: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *seq; | 
					
						
							|  |  |  |             _Py_UopsSymbol **values; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             seq = stack_pointer[-1]; | 
					
						
							|  |  |  |             values = &stack_pointer[-1]; | 
					
						
							|  |  |  |             /* This has to be done manually */ | 
					
						
							|  |  |  |             (void)seq; | 
					
						
							|  |  |  |             int totalargs = (oparg & 0xFF) + (oparg >> 8) + 1; | 
					
						
							|  |  |  |             for (int i = 0; i < totalargs; i++) { | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |                 values[i] = sym_new_unknown(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 |  |  |             stack_pointer += (oparg & 0xFF) + (oparg >> 8); | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _STORE_ATTR: { | 
					
						
							|  |  |  |             stack_pointer += -2; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _DELETE_ATTR: { | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _STORE_GLOBAL: { | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _DELETE_GLOBAL: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_LOCALS: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *locals; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             locals = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[0] = locals; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-05-31 14:05:24 -07:00
										 |  |  |         /* _LOAD_FROM_DICT_OR_GLOBALS is not a viable micro-op for tier 2 */ | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-18 14:24:58 -07:00
										 |  |  |         case _LOAD_NAME: { | 
					
						
							|  |  |  |             _Py_UopsSymbol *v; | 
					
						
							|  |  |  |             v = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             stack_pointer[0] = v; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							|  |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_GLOBAL: { | 
					
						
							| 
									
										
										
										
											2024-09-14 00:23:51 +08:00
										 |  |  |             _Py_UopsSymbol **res; | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *null = NULL; | 
					
						
							| 
									
										
										
										
											2024-09-14 00:23:51 +08:00
										 |  |  |             res = &stack_pointer[0]; | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |             res[0] = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-28 16:05:53 -08:00
										 |  |  |             null = sym_new_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             if (oparg & 1) stack_pointer[1] = null; | 
					
						
							|  |  |  |             stack_pointer += 1 + (oparg & 1); | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _GUARD_GLOBALS_VERSION: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-10-09 08:18:25 -07:00
										 |  |  |         case _GUARD_GLOBALS_VERSION_PUSH_KEYS: { | 
					
						
							|  |  |  |             _Py_UopsSymbol *globals_keys; | 
					
						
							| 
									
										
										
										
											2024-11-09 11:35:33 +08:00
										 |  |  |             uint16_t version = (uint16_t)this_instr->operand0; | 
					
						
							| 
									
										
										
										
											2024-10-09 08:18:25 -07:00
										 |  |  |             globals_keys = sym_new_unknown(ctx); | 
					
						
							|  |  |  |             (void)version; | 
					
						
							|  |  |  |             stack_pointer[0] = globals_keys; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							|  |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-10-09 08:18:25 -07:00
										 |  |  |         case _GUARD_BUILTINS_VERSION_PUSH_KEYS: { | 
					
						
							|  |  |  |             _Py_UopsSymbol *builtins_keys; | 
					
						
							| 
									
										
										
										
											2024-11-09 11:35:33 +08:00
										 |  |  |             uint16_t version = (uint16_t)this_instr->operand0; | 
					
						
							| 
									
										
										
										
											2024-10-09 08:18:25 -07:00
										 |  |  |             builtins_keys = sym_new_unknown(ctx); | 
					
						
							|  |  |  |             (void)version; | 
					
						
							|  |  |  |             stack_pointer[0] = builtins_keys; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							|  |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_GLOBAL_MODULE_FROM_KEYS: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							|  |  |  |             _Py_UopsSymbol *null = NULL; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-28 16:05:53 -08:00
										 |  |  |             null = sym_new_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-10-09 08:18:25 -07:00
										 |  |  |             stack_pointer[-1] = res; | 
					
						
							|  |  |  |             if (oparg & 1) stack_pointer[0] = null; | 
					
						
							|  |  |  |             stack_pointer += (oparg & 1); | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-10-09 08:18:25 -07:00
										 |  |  |         case _LOAD_GLOBAL_BUILTINS_FROM_KEYS: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							|  |  |  |             _Py_UopsSymbol *null = NULL; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-28 16:05:53 -08:00
										 |  |  |             null = sym_new_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-10-09 08:18:25 -07:00
										 |  |  |             stack_pointer[-1] = res; | 
					
						
							|  |  |  |             if (oparg & 1) stack_pointer[0] = null; | 
					
						
							|  |  |  |             stack_pointer += (oparg & 1); | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _DELETE_FAST: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _MAKE_CELL: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _DELETE_DEREF: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_FROM_DICT_OR_DEREF: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *value; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             value = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = value; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_DEREF: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *value; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             value = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[0] = value; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _STORE_DEREF: { | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _COPY_FREE_VARS: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _BUILD_STRING: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *str; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             str = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-oparg] = str; | 
					
						
							|  |  |  |             stack_pointer += 1 - oparg; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _BUILD_TUPLE: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *tup; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             tup = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-oparg] = tup; | 
					
						
							|  |  |  |             stack_pointer += 1 - oparg; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _BUILD_LIST: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *list; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             list = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-oparg] = list; | 
					
						
							|  |  |  |             stack_pointer += 1 - oparg; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _LIST_EXTEND: { | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _SET_UPDATE: { | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-18 14:24:58 -07:00
										 |  |  |         case _BUILD_SET: { | 
					
						
							|  |  |  |             _Py_UopsSymbol *set; | 
					
						
							|  |  |  |             set = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             stack_pointer[-oparg] = set; | 
					
						
							|  |  |  |             stack_pointer += 1 - oparg; | 
					
						
							|  |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |         case _BUILD_MAP: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *map; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             map = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-oparg*2] = map; | 
					
						
							|  |  |  |             stack_pointer += 1 - oparg*2; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _SETUP_ANNOTATIONS: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _DICT_UPDATE: { | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _DICT_MERGE: { | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _MAP_ADD: { | 
					
						
							|  |  |  |             stack_pointer += -2; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         /* _INSTRUMENTED_LOAD_SUPER_ATTR is not a viable micro-op for tier 2 */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_SUPER_ATTR_ATTR: { | 
					
						
							| 
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 |  |  |             _Py_UopsSymbol *attr_st; | 
					
						
							|  |  |  |             attr_st = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             stack_pointer[-3] = attr_st; | 
					
						
							| 
									
										
										
										
											2024-02-20 10:50:59 +00:00
										 |  |  |             stack_pointer += -2; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_SUPER_ATTR_METHOD: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *attr; | 
					
						
							|  |  |  |             _Py_UopsSymbol *self_or_null; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             attr = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             self_or_null = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-3] = attr; | 
					
						
							|  |  |  |             stack_pointer[-2] = self_or_null; | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_ATTR: { | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             _Py_UopsSymbol *owner; | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *attr; | 
					
						
							|  |  |  |             _Py_UopsSymbol *self_or_null = NULL; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             owner = stack_pointer[-1]; | 
					
						
							|  |  |  |             (void)owner; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             attr = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |             self_or_null = sym_new_unknown(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = attr; | 
					
						
							|  |  |  |             if (oparg & 1) stack_pointer[0] = self_or_null; | 
					
						
							|  |  |  |             stack_pointer += (oparg & 1); | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _GUARD_TYPE_VERSION: { | 
					
						
							| 
									
										
										
										
											2024-06-08 05:41:45 -04:00
										 |  |  |             _Py_UopsSymbol *owner; | 
					
						
							|  |  |  |             owner = stack_pointer[-1]; | 
					
						
							| 
									
										
										
										
											2024-11-09 11:35:33 +08:00
										 |  |  |             uint32_t type_version = (uint32_t)this_instr->operand0; | 
					
						
							| 
									
										
										
										
											2024-06-08 05:41:45 -04:00
										 |  |  |             assert(type_version); | 
					
						
							|  |  |  |             if (sym_matches_type_version(owner, type_version)) { | 
					
						
							|  |  |  |                 REPLACE_OP(this_instr, _NOP, 0, 0); | 
					
						
							|  |  |  |             } else { | 
					
						
							|  |  |  |                 // add watcher so that whenever the type changes we invalidate this
 | 
					
						
							|  |  |  |                 PyTypeObject *type = _PyType_LookupByVersion(type_version); | 
					
						
							|  |  |  |                 // if the type is null, it was not found in the cache (there was a conflict)
 | 
					
						
							|  |  |  |                 // with the key, in which case we can't trust the version
 | 
					
						
							|  |  |  |                 if (type) { | 
					
						
							|  |  |  |                     // if the type version was set properly, then add a watcher
 | 
					
						
							|  |  |  |                     // if it wasn't this means that the type version was previously set to something else
 | 
					
						
							|  |  |  |                     // and we set the owner to bottom, so we don't need to add a watcher because we must have
 | 
					
						
							|  |  |  |                     // already added one earlier.
 | 
					
						
							|  |  |  |                     if (sym_set_type_version(owner, type_version)) { | 
					
						
							|  |  |  |                         PyType_Watch(TYPE_WATCHER_ID, (PyObject *)type); | 
					
						
							|  |  |  |                         _Py_BloomFilter_Add(dependencies, type); | 
					
						
							|  |  |  |                     } | 
					
						
							|  |  |  |                 } | 
					
						
							|  |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-12-19 10:21:17 -08:00
										 |  |  |         case _GUARD_TYPE_VERSION_AND_LOCK: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |         case _CHECK_MANAGED_OBJECT_HAS_VALUES: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_ATTR_INSTANCE_VALUE: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *owner; | 
					
						
							|  |  |  |             _Py_UopsSymbol *attr; | 
					
						
							|  |  |  |             _Py_UopsSymbol *null = NULL; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             owner = stack_pointer[-1]; | 
					
						
							| 
									
										
										
										
											2024-11-09 11:35:33 +08:00
										 |  |  |             uint16_t offset = (uint16_t)this_instr->operand0; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             attr = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             null = sym_new_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-08-21 15:52:04 +01:00
										 |  |  |             (void)offset; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             (void)owner; | 
					
						
							|  |  |  |             stack_pointer[-1] = attr; | 
					
						
							|  |  |  |             if (oparg & 1) stack_pointer[0] = null; | 
					
						
							|  |  |  |             stack_pointer += (oparg & 1); | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-12-13 10:17:16 -08:00
										 |  |  |         case _CHECK_ATTR_MODULE_PUSH_KEYS: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *owner; | 
					
						
							| 
									
										
										
										
											2024-12-13 10:17:16 -08:00
										 |  |  |             _Py_UopsSymbol *mod_keys; | 
					
						
							| 
									
										
										
										
											2024-02-22 14:48:25 +00:00
										 |  |  |             owner = stack_pointer[-1]; | 
					
						
							| 
									
										
										
										
											2024-11-09 11:35:33 +08:00
										 |  |  |             uint32_t dict_version = (uint32_t)this_instr->operand0; | 
					
						
							| 
									
										
										
										
											2024-02-22 14:48:25 +00:00
										 |  |  |             (void)dict_version; | 
					
						
							| 
									
										
										
										
											2024-12-13 10:17:16 -08:00
										 |  |  |             mod_keys = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             if (sym_is_const(owner)) { | 
					
						
							|  |  |  |                 PyObject *cnst = sym_get_const(owner); | 
					
						
							| 
									
										
										
										
											2024-02-22 14:48:25 +00:00
										 |  |  |                 if (PyModule_CheckExact(cnst)) { | 
					
						
							|  |  |  |                     PyModuleObject *mod = (PyModuleObject *)cnst; | 
					
						
							|  |  |  |                     PyObject *dict = mod->md_dict; | 
					
						
							| 
									
										
										
										
											2024-12-13 10:17:16 -08:00
										 |  |  |                     stack_pointer[0] = mod_keys; | 
					
						
							|  |  |  |                     stack_pointer += 1; | 
					
						
							|  |  |  |                     assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-22 14:48:25 +00:00
										 |  |  |                     uint64_t watched_mutations = get_mutations(dict); | 
					
						
							|  |  |  |                     if (watched_mutations < _Py_MAX_ALLOWED_GLOBALS_MODIFICATIONS) { | 
					
						
							|  |  |  |                         PyDict_Watch(GLOBALS_WATCHER_ID, dict); | 
					
						
							|  |  |  |                         _Py_BloomFilter_Add(dependencies, dict); | 
					
						
							|  |  |  |                         this_instr->opcode = _NOP; | 
					
						
							|  |  |  |                     } | 
					
						
							| 
									
										
										
										
											2024-12-13 10:17:16 -08:00
										 |  |  |                     stack_pointer += -1; | 
					
						
							|  |  |  |                     assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-22 14:48:25 +00:00
										 |  |  |                 } | 
					
						
							|  |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-12-13 10:17:16 -08:00
										 |  |  |             stack_pointer[0] = mod_keys; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							|  |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-12-13 10:17:16 -08:00
										 |  |  |         case _LOAD_ATTR_MODULE_FROM_KEYS: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *owner; | 
					
						
							|  |  |  |             _Py_UopsSymbol *attr; | 
					
						
							|  |  |  |             _Py_UopsSymbol *null = NULL; | 
					
						
							| 
									
										
										
										
											2024-12-13 10:17:16 -08:00
										 |  |  |             owner = stack_pointer[-2]; | 
					
						
							| 
									
										
										
										
											2024-11-09 11:35:33 +08:00
										 |  |  |             uint16_t index = (uint16_t)this_instr->operand0; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             (void)index; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             null = sym_new_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-22 14:48:25 +00:00
										 |  |  |             attr = NULL; | 
					
						
							|  |  |  |             if (this_instr[-1].opcode == _NOP) { | 
					
						
							| 
									
										
										
										
											2024-12-13 10:17:16 -08:00
										 |  |  |                 // Preceding _CHECK_ATTR_MODULE_PUSH_KEYS was removed: mod is const and dict is watched.
 | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |                 assert(sym_is_const(owner)); | 
					
						
							|  |  |  |                 PyModuleObject *mod = (PyModuleObject *)sym_get_const(owner); | 
					
						
							| 
									
										
										
										
											2024-02-22 14:48:25 +00:00
										 |  |  |                 assert(PyModule_CheckExact(mod)); | 
					
						
							|  |  |  |                 PyObject *dict = mod->md_dict; | 
					
						
							| 
									
										
										
										
											2024-12-13 10:17:16 -08:00
										 |  |  |                 stack_pointer[-2] = attr; | 
					
						
							|  |  |  |                 if (oparg & 1) stack_pointer[-1] = null; | 
					
						
							|  |  |  |                 stack_pointer += -1 + (oparg & 1); | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |                 assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-22 14:48:25 +00:00
										 |  |  |                 PyObject *res = convert_global_to_const(this_instr, dict); | 
					
						
							|  |  |  |                 if (res != NULL) { | 
					
						
							|  |  |  |                     this_instr[-1].opcode = _POP_TOP; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |                     attr = sym_new_const(ctx, res); | 
					
						
							| 
									
										
										
										
											2024-02-22 14:48:25 +00:00
										 |  |  |                 } | 
					
						
							| 
									
										
										
										
											2024-12-13 10:17:16 -08:00
										 |  |  |                 else { | 
					
						
							|  |  |  |                     this_instr->opcode = _LOAD_ATTR_MODULE; | 
					
						
							|  |  |  |                 } | 
					
						
							|  |  |  |                 stack_pointer += 1 - (oparg & 1); | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |                 assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-22 14:48:25 +00:00
										 |  |  |             } | 
					
						
							|  |  |  |             if (attr == NULL) { | 
					
						
							|  |  |  |                 /* No conversion made. We don't know what `attr` is. */ | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |                 attr = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-22 14:48:25 +00:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-12-13 10:17:16 -08:00
										 |  |  |             stack_pointer[-2] = attr; | 
					
						
							|  |  |  |             if (oparg & 1) stack_pointer[-1] = null; | 
					
						
							|  |  |  |             stack_pointer += -1 + (oparg & 1); | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CHECK_ATTR_WITH_HINT: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_ATTR_WITH_HINT: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *owner; | 
					
						
							|  |  |  |             _Py_UopsSymbol *attr; | 
					
						
							|  |  |  |             _Py_UopsSymbol *null = NULL; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             owner = stack_pointer[-1]; | 
					
						
							| 
									
										
										
										
											2024-11-09 11:35:33 +08:00
										 |  |  |             uint16_t hint = (uint16_t)this_instr->operand0; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             attr = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             null = sym_new_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             (void)hint; | 
					
						
							|  |  |  |             (void)owner; | 
					
						
							|  |  |  |             stack_pointer[-1] = attr; | 
					
						
							|  |  |  |             if (oparg & 1) stack_pointer[0] = null; | 
					
						
							|  |  |  |             stack_pointer += (oparg & 1); | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_ATTR_SLOT: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *owner; | 
					
						
							|  |  |  |             _Py_UopsSymbol *attr; | 
					
						
							|  |  |  |             _Py_UopsSymbol *null = NULL; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             owner = stack_pointer[-1]; | 
					
						
							| 
									
										
										
										
											2024-11-09 11:35:33 +08:00
										 |  |  |             uint16_t index = (uint16_t)this_instr->operand0; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             attr = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             null = sym_new_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             (void)index; | 
					
						
							|  |  |  |             (void)owner; | 
					
						
							|  |  |  |             stack_pointer[-1] = attr; | 
					
						
							|  |  |  |             if (oparg & 1) stack_pointer[0] = null; | 
					
						
							|  |  |  |             stack_pointer += (oparg & 1); | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CHECK_ATTR_CLASS: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_ATTR_CLASS: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *owner; | 
					
						
							|  |  |  |             _Py_UopsSymbol *attr; | 
					
						
							|  |  |  |             _Py_UopsSymbol *null = NULL; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             owner = stack_pointer[-1]; | 
					
						
							| 
									
										
										
										
											2024-11-09 11:35:33 +08:00
										 |  |  |             PyObject *descr = (PyObject *)this_instr->operand0; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             attr = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             null = sym_new_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             (void)descr; | 
					
						
							|  |  |  |             (void)owner; | 
					
						
							|  |  |  |             stack_pointer[-1] = attr; | 
					
						
							|  |  |  |             if (oparg & 1) stack_pointer[0] = null; | 
					
						
							|  |  |  |             stack_pointer += (oparg & 1); | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-25 10:45:28 -07:00
										 |  |  |         case _LOAD_ATTR_PROPERTY_FRAME: { | 
					
						
							| 
									
										
										
										
											2024-08-12 18:35:52 +01:00
										 |  |  |             _Py_UopsSymbol *owner; | 
					
						
							|  |  |  |             _Py_UOpsAbstractFrame *new_frame; | 
					
						
							|  |  |  |             owner = stack_pointer[-1]; | 
					
						
							| 
									
										
										
										
											2024-11-09 11:35:33 +08:00
										 |  |  |             PyObject *fget = (PyObject *)this_instr->operand0; | 
					
						
							| 
									
										
										
										
											2024-08-12 18:35:52 +01:00
										 |  |  |             (void)fget; | 
					
						
							|  |  |  |             (void)owner; | 
					
						
							|  |  |  |             new_frame = NULL; | 
					
						
							|  |  |  |             ctx->done = true; | 
					
						
							| 
									
										
										
										
											2024-07-25 10:45:28 -07:00
										 |  |  |             stack_pointer[-1] = (_Py_UopsSymbol *)new_frame; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |         /* _LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN is not a viable micro-op for tier 2 */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-02 11:59:21 +01:00
										 |  |  |         case _GUARD_DORV_NO_DICT: { | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _STORE_ATTR_INSTANCE_VALUE: { | 
					
						
							|  |  |  |             stack_pointer += -2; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-05-28 12:47:54 -07:00
										 |  |  |         case _STORE_ATTR_WITH_HINT: { | 
					
						
							|  |  |  |             stack_pointer += -2; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-05-28 12:47:54 -07:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |         case _STORE_ATTR_SLOT: { | 
					
						
							|  |  |  |             stack_pointer += -2; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _COMPARE_OP: { | 
					
						
							| 
									
										
										
										
											2024-03-06 10:46:42 +00:00
										 |  |  |             _Py_UopsSymbol *right; | 
					
						
							|  |  |  |             _Py_UopsSymbol *left; | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-06 10:46:42 +00:00
										 |  |  |             right = stack_pointer[-1]; | 
					
						
							|  |  |  |             left = stack_pointer[-2]; | 
					
						
							| 
									
										
										
										
											2024-03-08 00:19:59 +08:00
										 |  |  |             (void)left; | 
					
						
							|  |  |  |             (void)right; | 
					
						
							| 
									
										
										
										
											2024-03-06 10:46:42 +00:00
										 |  |  |             if (oparg & 16) { | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |                 res = sym_new_type(ctx, &PyBool_Type); | 
					
						
							| 
									
										
										
										
											2024-03-06 10:46:42 +00:00
										 |  |  |             } | 
					
						
							|  |  |  |             else { | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |                 stack_pointer += -2; | 
					
						
							|  |  |  |                 assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |                 res = _Py_uop_sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |                 stack_pointer += 2; | 
					
						
							|  |  |  |                 assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-03-06 10:46:42 +00:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2] = res; | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _COMPARE_OP_FLOAT: { | 
					
						
							| 
									
										
										
										
											2024-03-06 10:46:42 +00:00
										 |  |  |             _Py_UopsSymbol *right; | 
					
						
							|  |  |  |             _Py_UopsSymbol *left; | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-06 10:46:42 +00:00
										 |  |  |             right = stack_pointer[-1]; | 
					
						
							|  |  |  |             left = stack_pointer[-2]; | 
					
						
							| 
									
										
										
										
											2024-03-08 00:19:59 +08:00
										 |  |  |             (void)left; | 
					
						
							|  |  |  |             (void)right; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             res = sym_new_type(ctx, &PyBool_Type); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2] = res; | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _COMPARE_OP_INT: { | 
					
						
							| 
									
										
										
										
											2024-03-06 10:46:42 +00:00
										 |  |  |             _Py_UopsSymbol *right; | 
					
						
							|  |  |  |             _Py_UopsSymbol *left; | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-06 10:46:42 +00:00
										 |  |  |             right = stack_pointer[-1]; | 
					
						
							|  |  |  |             left = stack_pointer[-2]; | 
					
						
							| 
									
										
										
										
											2024-03-08 00:19:59 +08:00
										 |  |  |             (void)left; | 
					
						
							|  |  |  |             (void)right; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             res = sym_new_type(ctx, &PyBool_Type); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2] = res; | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _COMPARE_OP_STR: { | 
					
						
							| 
									
										
										
										
											2024-03-06 10:46:42 +00:00
										 |  |  |             _Py_UopsSymbol *right; | 
					
						
							|  |  |  |             _Py_UopsSymbol *left; | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-06 10:46:42 +00:00
										 |  |  |             right = stack_pointer[-1]; | 
					
						
							|  |  |  |             left = stack_pointer[-2]; | 
					
						
							| 
									
										
										
										
											2024-03-08 00:19:59 +08:00
										 |  |  |             (void)left; | 
					
						
							|  |  |  |             (void)right; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             res = sym_new_type(ctx, &PyBool_Type); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2] = res; | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _IS_OP: { | 
					
						
							| 
									
										
										
										
											2024-03-06 10:46:42 +00:00
										 |  |  |             _Py_UopsSymbol *right; | 
					
						
							|  |  |  |             _Py_UopsSymbol *left; | 
					
						
							|  |  |  |             _Py_UopsSymbol *res; | 
					
						
							|  |  |  |             right = stack_pointer[-1]; | 
					
						
							|  |  |  |             left = stack_pointer[-2]; | 
					
						
							| 
									
										
										
										
											2024-03-08 00:19:59 +08:00
										 |  |  |             (void)left; | 
					
						
							|  |  |  |             (void)right; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             res = sym_new_type(ctx, &PyBool_Type); | 
					
						
							| 
									
										
										
										
											2024-03-06 10:46:42 +00:00
										 |  |  |             stack_pointer[-2] = res; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CONTAINS_OP: { | 
					
						
							| 
									
										
										
										
											2024-03-06 10:46:42 +00:00
										 |  |  |             _Py_UopsSymbol *right; | 
					
						
							|  |  |  |             _Py_UopsSymbol *left; | 
					
						
							|  |  |  |             _Py_UopsSymbol *res; | 
					
						
							|  |  |  |             right = stack_pointer[-1]; | 
					
						
							|  |  |  |             left = stack_pointer[-2]; | 
					
						
							| 
									
										
										
										
											2024-03-08 00:19:59 +08:00
										 |  |  |             (void)left; | 
					
						
							|  |  |  |             (void)right; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             res = sym_new_type(ctx, &PyBool_Type); | 
					
						
							| 
									
										
										
										
											2024-03-06 10:46:42 +00:00
										 |  |  |             stack_pointer[-2] = res; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-07 03:30:11 +08:00
										 |  |  |         case _CONTAINS_OP_SET: { | 
					
						
							|  |  |  |             _Py_UopsSymbol *b; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             b = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-03-07 03:30:11 +08:00
										 |  |  |             stack_pointer[-2] = b; | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-03-07 03:30:11 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CONTAINS_OP_DICT: { | 
					
						
							|  |  |  |             _Py_UopsSymbol *b; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             b = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-03-07 03:30:11 +08:00
										 |  |  |             stack_pointer[-2] = b; | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-03-07 03:30:11 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |         case _CHECK_EG_MATCH: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *rest; | 
					
						
							|  |  |  |             _Py_UopsSymbol *match; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             rest = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             match = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2] = rest; | 
					
						
							|  |  |  |             stack_pointer[-1] = match; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CHECK_EXC_MATCH: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *b; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             b = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = b; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-18 14:24:58 -07:00
										 |  |  |         case _IMPORT_NAME: { | 
					
						
							|  |  |  |             _Py_UopsSymbol *res; | 
					
						
							|  |  |  |             res = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             stack_pointer[-2] = res; | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							|  |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _IMPORT_FROM: { | 
					
						
							|  |  |  |             _Py_UopsSymbol *res; | 
					
						
							|  |  |  |             res = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             stack_pointer[0] = res; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							|  |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |         /* _POP_JUMP_IF_FALSE is not a viable micro-op for tier 2 */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         /* _POP_JUMP_IF_TRUE is not a viable micro-op for tier 2 */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _IS_NONE: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *b; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             b = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = b; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _GET_LEN: { | 
					
						
							| 
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 |  |  |             _Py_UopsSymbol *len; | 
					
						
							|  |  |  |             len = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             stack_pointer[0] = len; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _MATCH_CLASS: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *attrs; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             attrs = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-3] = attrs; | 
					
						
							|  |  |  |             stack_pointer += -2; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _MATCH_MAPPING: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[0] = res; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _MATCH_SEQUENCE: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[0] = res; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _MATCH_KEYS: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *values_or_none; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             values_or_none = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[0] = values_or_none; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _GET_ITER: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *iter; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             iter = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = iter; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _GET_YIELD_FROM_ITER: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *iter; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             iter = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = iter; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         /* _FOR_ITER is not a viable micro-op for tier 2 */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _FOR_ITER_TIER_TWO: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *next; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             next = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[0] = next; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         /* _INSTRUMENTED_FOR_ITER is not a viable micro-op for tier 2 */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _ITER_CHECK_LIST: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         /* _ITER_JUMP_LIST is not a viable micro-op for tier 2 */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _GUARD_NOT_EXHAUSTED_LIST: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _ITER_NEXT_LIST: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *next; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             next = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[0] = next; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _ITER_CHECK_TUPLE: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         /* _ITER_JUMP_TUPLE is not a viable micro-op for tier 2 */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _GUARD_NOT_EXHAUSTED_TUPLE: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _ITER_NEXT_TUPLE: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *next; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             next = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[0] = next; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _ITER_CHECK_RANGE: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         /* _ITER_JUMP_RANGE is not a viable micro-op for tier 2 */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _GUARD_NOT_EXHAUSTED_RANGE: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _ITER_NEXT_RANGE: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *iter; | 
					
						
							|  |  |  |             _Py_UopsSymbol *next; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             iter = stack_pointer[-1]; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             next = sym_new_type(ctx, &PyLong_Type); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             (void)iter; | 
					
						
							|  |  |  |             stack_pointer[0] = next; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-26 18:08:50 +01:00
										 |  |  |         case _FOR_ITER_GEN_FRAME: { | 
					
						
							| 
									
										
										
										
											2024-04-30 11:33:13 +01:00
										 |  |  |             /* We are about to hit the end of the trace */ | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             ctx->done = true; | 
					
						
							| 
									
										
										
										
											2024-04-26 18:08:50 +01:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-06-18 12:17:46 +01:00
										 |  |  |         case _LOAD_SPECIAL: { | 
					
						
							|  |  |  |             _Py_UopsSymbol *owner; | 
					
						
							|  |  |  |             _Py_UopsSymbol *attr; | 
					
						
							|  |  |  |             _Py_UopsSymbol *self_or_null; | 
					
						
							|  |  |  |             owner = stack_pointer[-1]; | 
					
						
							|  |  |  |             (void)owner; | 
					
						
							|  |  |  |             attr = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             self_or_null = sym_new_unknown(ctx); | 
					
						
							|  |  |  |             stack_pointer[-1] = attr; | 
					
						
							|  |  |  |             stack_pointer[0] = self_or_null; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-06-18 12:17:46 +01:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |         case _WITH_EXCEPT_START: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[0] = res; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _PUSH_EXC_INFO: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *prev_exc; | 
					
						
							|  |  |  |             _Py_UopsSymbol *new_exc; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             prev_exc = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             new_exc = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = prev_exc; | 
					
						
							|  |  |  |             stack_pointer[0] = new_exc; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _GUARD_KEYS_VERSION: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_ATTR_METHOD_WITH_VALUES: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *owner; | 
					
						
							|  |  |  |             _Py_UopsSymbol *attr; | 
					
						
							|  |  |  |             _Py_UopsSymbol *self = NULL; | 
					
						
							| 
									
										
										
										
											2024-02-23 15:42:03 +08:00
										 |  |  |             owner = stack_pointer[-1]; | 
					
						
							| 
									
										
										
										
											2024-11-09 11:35:33 +08:00
										 |  |  |             PyObject *descr = (PyObject *)this_instr->operand0; | 
					
						
							| 
									
										
										
										
											2024-02-23 23:41:10 +08:00
										 |  |  |             (void)descr; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             attr = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-23 23:41:10 +08:00
										 |  |  |             self = owner; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = attr; | 
					
						
							| 
									
										
										
										
											2024-02-20 10:50:59 +00:00
										 |  |  |             stack_pointer[0] = self; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_ATTR_METHOD_NO_DICT: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *owner; | 
					
						
							|  |  |  |             _Py_UopsSymbol *attr; | 
					
						
							|  |  |  |             _Py_UopsSymbol *self = NULL; | 
					
						
							| 
									
										
										
										
											2024-02-23 15:42:03 +08:00
										 |  |  |             owner = stack_pointer[-1]; | 
					
						
							| 
									
										
										
										
											2024-11-09 11:35:33 +08:00
										 |  |  |             PyObject *descr = (PyObject *)this_instr->operand0; | 
					
						
							| 
									
										
										
										
											2024-02-23 23:41:10 +08:00
										 |  |  |             (void)descr; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             attr = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-23 23:41:10 +08:00
										 |  |  |             self = owner; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = attr; | 
					
						
							| 
									
										
										
										
											2024-02-20 10:50:59 +00:00
										 |  |  |             stack_pointer[0] = self; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *attr; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             attr = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = attr; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_ATTR_NONDESCRIPTOR_NO_DICT: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *attr; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             attr = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = attr; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CHECK_ATTR_METHOD_LAZY_DICT: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_ATTR_METHOD_LAZY_DICT: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *owner; | 
					
						
							|  |  |  |             _Py_UopsSymbol *attr; | 
					
						
							|  |  |  |             _Py_UopsSymbol *self = NULL; | 
					
						
							| 
									
										
										
										
											2024-02-23 15:42:03 +08:00
										 |  |  |             owner = stack_pointer[-1]; | 
					
						
							| 
									
										
										
										
											2024-11-09 11:35:33 +08:00
										 |  |  |             PyObject *descr = (PyObject *)this_instr->operand0; | 
					
						
							| 
									
										
										
										
											2024-02-23 23:41:10 +08:00
										 |  |  |             (void)descr; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             attr = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-23 23:41:10 +08:00
										 |  |  |             self = owner; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = attr; | 
					
						
							| 
									
										
										
										
											2024-02-20 10:50:59 +00:00
										 |  |  |             stack_pointer[0] = self; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 |  |  |         case _MAYBE_EXPAND_METHOD: { | 
					
						
							| 
									
										
										
										
											2024-07-26 18:38:52 +01:00
										 |  |  |             _Py_UopsSymbol **args; | 
					
						
							|  |  |  |             _Py_UopsSymbol *self_or_null; | 
					
						
							|  |  |  |             _Py_UopsSymbol *callable; | 
					
						
							| 
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 |  |  |             _Py_UopsSymbol *func; | 
					
						
							|  |  |  |             _Py_UopsSymbol *maybe_self; | 
					
						
							| 
									
										
										
										
											2024-07-26 18:38:52 +01:00
										 |  |  |             args = &stack_pointer[-oparg]; | 
					
						
							|  |  |  |             self_or_null = stack_pointer[-1 - oparg]; | 
					
						
							|  |  |  |             callable = stack_pointer[-2 - oparg]; | 
					
						
							| 
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 |  |  |             args = &stack_pointer[-oparg]; | 
					
						
							| 
									
										
										
										
											2024-07-26 18:38:52 +01:00
										 |  |  |             (void)callable; | 
					
						
							|  |  |  |             (void)self_or_null; | 
					
						
							|  |  |  |             (void)args; | 
					
						
							| 
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 |  |  |             func = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             maybe_self = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             stack_pointer[-2 - oparg] = func; | 
					
						
							|  |  |  |             stack_pointer[-1 - oparg] = maybe_self; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 |  |  |         /* _DO_CALL is not a viable micro-op for tier 2 */ | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 |  |  |         /* _MONITOR_CALL is not a viable micro-op for tier 2 */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 |  |  |         case _PY_FRAME_GENERAL: { | 
					
						
							|  |  |  |             _Py_UopsSymbol *self_or_null; | 
					
						
							|  |  |  |             _Py_UopsSymbol *callable; | 
					
						
							|  |  |  |             _Py_UOpsAbstractFrame *new_frame; | 
					
						
							|  |  |  |             self_or_null = stack_pointer[-1 - oparg]; | 
					
						
							|  |  |  |             callable = stack_pointer[-2 - oparg]; | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |             stack_pointer += -2 - oparg; | 
					
						
							|  |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-10-03 01:10:51 +08:00
										 |  |  |             (void)(self_or_null); | 
					
						
							|  |  |  |             (void)(callable); | 
					
						
							|  |  |  |             PyCodeObject *co = NULL; | 
					
						
							|  |  |  |             assert((this_instr + 2)->opcode == _PUSH_FRAME); | 
					
						
							|  |  |  |             co = get_code_with_logging((this_instr + 2)); | 
					
						
							|  |  |  |             if (co == NULL) { | 
					
						
							|  |  |  |                 ctx->done = true; | 
					
						
							|  |  |  |                 break; | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |             new_frame = frame_new(ctx, co, 0, NULL, 0); | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |             stack_pointer[0] = (_Py_UopsSymbol *)new_frame; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CHECK_FUNCTION_VERSION: { | 
					
						
							| 
									
										
										
										
											2024-11-09 11:35:33 +08:00
										 |  |  |             _Py_UopsSymbol *self_or_null; | 
					
						
							|  |  |  |             _Py_UopsSymbol *callable; | 
					
						
							|  |  |  |             self_or_null = stack_pointer[-1 - oparg]; | 
					
						
							|  |  |  |             callable = stack_pointer[-2 - oparg]; | 
					
						
							|  |  |  |             uint32_t func_version = (uint32_t)this_instr->operand0; | 
					
						
							|  |  |  |             (void)self_or_null; | 
					
						
							|  |  |  |             if (sym_is_const(callable) && sym_matches_type(callable, &PyFunction_Type)) { | 
					
						
							|  |  |  |                 assert(PyFunction_Check(sym_get_const(callable))); | 
					
						
							|  |  |  |                 REPLACE_OP(this_instr, _CHECK_FUNCTION_VERSION_INLINE, 0, func_version); | 
					
						
							|  |  |  |                 this_instr->operand1 = (uintptr_t)sym_get_const(callable); | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |             sym_set_type(callable, &PyFunction_Type); | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CHECK_FUNCTION_VERSION_INLINE: { | 
					
						
							| 
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CHECK_METHOD_VERSION: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _EXPAND_METHOD: { | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |             _Py_UopsSymbol **method; | 
					
						
							| 
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 |  |  |             _Py_UopsSymbol **self; | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |             method = &stack_pointer[-2 - oparg]; | 
					
						
							| 
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 |  |  |             self = &stack_pointer[-1 - oparg]; | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |             method[0] = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             self[0] = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CHECK_IS_NOT_PY_CALLABLE: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CALL_NON_PY_GENERAL: { | 
					
						
							|  |  |  |             _Py_UopsSymbol *res; | 
					
						
							|  |  |  |             res = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             stack_pointer[-2 - oparg] = res; | 
					
						
							|  |  |  |             stack_pointer += -1 - oparg; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |         case _CHECK_CALL_BOUND_METHOD_EXACT_ARGS: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *null; | 
					
						
							|  |  |  |             _Py_UopsSymbol *callable; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             null = stack_pointer[-1 - oparg]; | 
					
						
							|  |  |  |             callable = stack_pointer[-2 - oparg]; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             sym_set_null(null); | 
					
						
							|  |  |  |             sym_set_type(callable, &PyMethod_Type); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _INIT_CALL_BOUND_METHOD_EXACT_ARGS: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *callable; | 
					
						
							|  |  |  |             _Py_UopsSymbol *func; | 
					
						
							|  |  |  |             _Py_UopsSymbol *self; | 
					
						
							| 
									
										
										
										
											2024-02-23 15:42:03 +08:00
										 |  |  |             callable = stack_pointer[-2 - oparg]; | 
					
						
							| 
									
										
										
										
											2024-02-23 23:41:10 +08:00
										 |  |  |             (void)callable; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             func = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             self = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2 - oparg] = func; | 
					
						
							|  |  |  |             stack_pointer[-1 - oparg] = self; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CHECK_PEP_523: { | 
					
						
							| 
									
										
										
										
											2024-04-18 11:09:30 +01:00
										 |  |  |             /* Setting the eval frame function invalidates
 | 
					
						
							|  |  |  |              * all executors, so no need to check dynamically */ | 
					
						
							|  |  |  |             if (_PyInterpreterState_GET()->eval_frame == NULL) { | 
					
						
							|  |  |  |                 REPLACE_OP(this_instr, _NOP, 0 ,0); | 
					
						
							|  |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CHECK_FUNCTION_EXACT_ARGS: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *self_or_null; | 
					
						
							|  |  |  |             _Py_UopsSymbol *callable; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             self_or_null = stack_pointer[-1 - oparg]; | 
					
						
							|  |  |  |             callable = stack_pointer[-2 - oparg]; | 
					
						
							| 
									
										
										
										
											2024-11-09 11:35:33 +08:00
										 |  |  |             assert(sym_matches_type(callable, &PyFunction_Type)); | 
					
						
							|  |  |  |             if (sym_is_const(callable)) { | 
					
						
							|  |  |  |                 if (sym_is_null(self_or_null) || sym_is_not_null(self_or_null)) { | 
					
						
							|  |  |  |                     PyFunctionObject *func = (PyFunctionObject *)sym_get_const(callable); | 
					
						
							|  |  |  |                     PyCodeObject *co = (PyCodeObject *)func->func_code; | 
					
						
							|  |  |  |                     if (co->co_argcount == oparg + !sym_is_null(self_or_null)) { | 
					
						
							|  |  |  |                         REPLACE_OP(this_instr, _NOP, 0 ,0); | 
					
						
							|  |  |  |                     } | 
					
						
							|  |  |  |                 } | 
					
						
							|  |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             (void)self_or_null; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CHECK_STACK_SPACE: { | 
					
						
							| 
									
										
										
										
											2024-04-18 11:09:30 +01:00
										 |  |  |             assert(corresponding_check_stack == NULL); | 
					
						
							|  |  |  |             corresponding_check_stack = this_instr; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _INIT_CALL_PY_EXACT_ARGS: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol **args; | 
					
						
							|  |  |  |             _Py_UopsSymbol *self_or_null; | 
					
						
							|  |  |  |             _Py_UopsSymbol *callable; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             _Py_UOpsAbstractFrame *new_frame; | 
					
						
							|  |  |  |             args = &stack_pointer[-oparg]; | 
					
						
							|  |  |  |             self_or_null = stack_pointer[-1 - oparg]; | 
					
						
							|  |  |  |             callable = stack_pointer[-2 - oparg]; | 
					
						
							|  |  |  |             int argcount = oparg; | 
					
						
							|  |  |  |             (void)callable; | 
					
						
							| 
									
										
											  
											
												gh-117045: Add code object to function version cache (#117028)
Changes to the function version cache:
- In addition to the function object, also store the code object,
  and allow the latter to be retrieved even if the function has been evicted.
- Stop assigning new function versions after a critical attribute (e.g. `__code__`)
  has been modified; the version is permanently reset to zero in this case.
- Changes to `__annotations__` are no longer considered critical. (This fixes gh-109998.)
Changes to the Tier 2 optimization machinery:
- If we cannot map a function version to a function, but it is still mapped to a code object,
  we continue projecting the trace.
  The operand of the `_PUSH_FRAME` and `_POP_FRAME` opcodes can be either NULL,
  a function object, or a code object with the lowest bit set.
This allows us to trace through code that calls an ephemeral function,
i.e., a function that may not be alive when we are constructing the executor,
e.g. a generator expression or certain nested functions.
We will lose globals removal inside such functions,
but we can still do other peephole operations
(and even possibly [call inlining](https://github.com/python/cpython/pull/116290),
if we decide to do it), which only need the code object.
As before, if we cannot retrieve the code object from the cache, we stop projecting.
											
										 
											2024-03-21 12:37:41 -07:00
										 |  |  |             PyCodeObject *co = NULL; | 
					
						
							|  |  |  |             assert((this_instr + 2)->opcode == _PUSH_FRAME); | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |             stack_pointer += -2 - oparg; | 
					
						
							|  |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-10-03 01:10:51 +08:00
										 |  |  |             co = get_code_with_logging((this_instr + 2)); | 
					
						
							|  |  |  |             if (co == NULL) { | 
					
						
							|  |  |  |                 ctx->done = true; | 
					
						
							|  |  |  |                 break; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             } | 
					
						
							|  |  |  |             assert(self_or_null != NULL); | 
					
						
							|  |  |  |             assert(args != NULL); | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             if (sym_is_not_null(self_or_null)) { | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |                 // Bound method fiddling, same as _INIT_CALL_PY_EXACT_ARGS in VM
 | 
					
						
							|  |  |  |                 args--; | 
					
						
							|  |  |  |                 argcount++; | 
					
						
							|  |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             if (sym_is_null(self_or_null) || sym_is_not_null(self_or_null)) { | 
					
						
							| 
									
										
										
										
											2024-06-08 05:41:45 -04:00
										 |  |  |                 new_frame = frame_new(ctx, co, 0, args, argcount); | 
					
						
							|  |  |  |             } else { | 
					
						
							|  |  |  |                 new_frame = frame_new(ctx, co, 0, NULL, 0); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |             stack_pointer[0] = (_Py_UopsSymbol *)new_frame; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _PUSH_FRAME: { | 
					
						
							|  |  |  |             _Py_UOpsAbstractFrame *new_frame; | 
					
						
							|  |  |  |             new_frame = (_Py_UOpsAbstractFrame *)stack_pointer[-1]; | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             ctx->frame->stack_pointer = stack_pointer; | 
					
						
							|  |  |  |             ctx->frame = new_frame; | 
					
						
							|  |  |  |             ctx->curr_frame_depth++; | 
					
						
							|  |  |  |             stack_pointer = new_frame->stack_pointer; | 
					
						
							| 
									
										
										
										
											2024-04-18 11:09:30 +01:00
										 |  |  |             co = get_code(this_instr); | 
					
						
							|  |  |  |             if (co == NULL) { | 
					
						
							|  |  |  |                 // should be about to _EXIT_TRACE anyway
 | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |                 ctx->done = true; | 
					
						
							|  |  |  |                 break; | 
					
						
							| 
									
										
										
										
											2024-04-18 11:09:30 +01:00
										 |  |  |             } | 
					
						
							|  |  |  |             /* Stack space handling */ | 
					
						
							|  |  |  |             int framesize = co->co_framesize; | 
					
						
							|  |  |  |             assert(framesize > 0); | 
					
						
							|  |  |  |             curr_space += framesize; | 
					
						
							|  |  |  |             if (curr_space < 0 || curr_space > INT32_MAX) { | 
					
						
							|  |  |  |                 // won't fit in signed 32-bit int
 | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |                 ctx->done = true; | 
					
						
							|  |  |  |                 break; | 
					
						
							| 
									
										
										
										
											2024-04-18 11:09:30 +01:00
										 |  |  |             } | 
					
						
							|  |  |  |             max_space = curr_space > max_space ? curr_space : max_space; | 
					
						
							|  |  |  |             if (first_valid_check_stack == NULL) { | 
					
						
							|  |  |  |                 first_valid_check_stack = corresponding_check_stack; | 
					
						
							|  |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |             else { | 
					
						
							|  |  |  |                 if (corresponding_check_stack) { | 
					
						
							|  |  |  |                     // delete all but the first valid _CHECK_STACK_SPACE
 | 
					
						
							|  |  |  |                     corresponding_check_stack->opcode = _NOP; | 
					
						
							|  |  |  |                 } | 
					
						
							| 
									
										
										
										
											2024-04-18 11:09:30 +01:00
										 |  |  |             } | 
					
						
							|  |  |  |             corresponding_check_stack = NULL; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CALL_TYPE_1: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-03-11 09:30:15 +00:00
										 |  |  |             stack_pointer[-3] = res; | 
					
						
							|  |  |  |             stack_pointer += -2; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CALL_STR_1: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-03-11 09:30:15 +00:00
										 |  |  |             stack_pointer[-3] = res; | 
					
						
							|  |  |  |             stack_pointer += -2; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CALL_TUPLE_1: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-03-11 09:30:15 +00:00
										 |  |  |             stack_pointer[-3] = res; | 
					
						
							|  |  |  |             stack_pointer += -2; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 |  |  |         case _CHECK_AND_ALLOCATE_OBJECT: { | 
					
						
							|  |  |  |             _Py_UopsSymbol **args; | 
					
						
							|  |  |  |             _Py_UopsSymbol *null; | 
					
						
							|  |  |  |             _Py_UopsSymbol *callable; | 
					
						
							|  |  |  |             _Py_UopsSymbol *self; | 
					
						
							|  |  |  |             _Py_UopsSymbol *init; | 
					
						
							|  |  |  |             args = &stack_pointer[-oparg]; | 
					
						
							|  |  |  |             null = stack_pointer[-1 - oparg]; | 
					
						
							|  |  |  |             callable = stack_pointer[-2 - oparg]; | 
					
						
							|  |  |  |             args = &stack_pointer[-oparg]; | 
					
						
							| 
									
										
										
										
											2024-11-09 11:35:33 +08:00
										 |  |  |             uint32_t type_version = (uint32_t)this_instr->operand0; | 
					
						
							| 
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 |  |  |             (void)type_version; | 
					
						
							|  |  |  |             (void)callable; | 
					
						
							|  |  |  |             (void)null; | 
					
						
							|  |  |  |             (void)args; | 
					
						
							|  |  |  |             self = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             init = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             stack_pointer[-2 - oparg] = self; | 
					
						
							|  |  |  |             stack_pointer[-1 - oparg] = init; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CREATE_INIT_FRAME: { | 
					
						
							|  |  |  |             _Py_UopsSymbol **args; | 
					
						
							|  |  |  |             _Py_UopsSymbol *init; | 
					
						
							|  |  |  |             _Py_UopsSymbol *self; | 
					
						
							|  |  |  |             _Py_UOpsAbstractFrame *init_frame; | 
					
						
							|  |  |  |             args = &stack_pointer[-oparg]; | 
					
						
							|  |  |  |             init = stack_pointer[-1 - oparg]; | 
					
						
							|  |  |  |             self = stack_pointer[-2 - oparg]; | 
					
						
							|  |  |  |             (void)self; | 
					
						
							|  |  |  |             (void)init; | 
					
						
							|  |  |  |             (void)args; | 
					
						
							|  |  |  |             init_frame = NULL; | 
					
						
							|  |  |  |             ctx->done = true; | 
					
						
							|  |  |  |             stack_pointer[-2 - oparg] = (_Py_UopsSymbol *)init_frame; | 
					
						
							|  |  |  |             stack_pointer += -1 - oparg; | 
					
						
							|  |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |         case _EXIT_INIT_CHECK: { | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CALL_BUILTIN_CLASS: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2 - oparg] = res; | 
					
						
							|  |  |  |             stack_pointer += -1 - oparg; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CALL_BUILTIN_O: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2 - oparg] = res; | 
					
						
							|  |  |  |             stack_pointer += -1 - oparg; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CALL_BUILTIN_FAST: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2 - oparg] = res; | 
					
						
							|  |  |  |             stack_pointer += -1 - oparg; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CALL_BUILTIN_FAST_WITH_KEYWORDS: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2 - oparg] = res; | 
					
						
							|  |  |  |             stack_pointer += -1 - oparg; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CALL_LEN: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2 - oparg] = res; | 
					
						
							|  |  |  |             stack_pointer += -1 - oparg; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CALL_ISINSTANCE: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2 - oparg] = res; | 
					
						
							|  |  |  |             stack_pointer += -1 - oparg; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							| 
									
										
										
										
											2024-07-18 14:24:58 -07:00
										 |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CALL_LIST_APPEND: { | 
					
						
							|  |  |  |             stack_pointer += -3; | 
					
						
							|  |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							|  |  |  |             break; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CALL_METHOD_DESCRIPTOR_O: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2 - oparg] = res; | 
					
						
							|  |  |  |             stack_pointer += -1 - oparg; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2 - oparg] = res; | 
					
						
							|  |  |  |             stack_pointer += -1 - oparg; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CALL_METHOD_DESCRIPTOR_NOARGS: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2 - oparg] = res; | 
					
						
							|  |  |  |             stack_pointer += -1 - oparg; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CALL_METHOD_DESCRIPTOR_FAST: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2 - oparg] = res; | 
					
						
							|  |  |  |             stack_pointer += -1 - oparg; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         /* _INSTRUMENTED_CALL_KW is not a viable micro-op for tier 2 */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |         case _MAYBE_EXPAND_METHOD_KW: { | 
					
						
							|  |  |  |             _Py_UopsSymbol **func; | 
					
						
							|  |  |  |             _Py_UopsSymbol **maybe_self; | 
					
						
							|  |  |  |             _Py_UopsSymbol **args; | 
					
						
							|  |  |  |             _Py_UopsSymbol *kwnames_out; | 
					
						
							|  |  |  |             func = &stack_pointer[-3 - oparg]; | 
					
						
							|  |  |  |             maybe_self = &stack_pointer[-2 - oparg]; | 
					
						
							|  |  |  |             args = &stack_pointer[-1 - oparg]; | 
					
						
							|  |  |  |             func[0] = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             maybe_self[0] = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             for (int _i = oparg; --_i >= 0;) { | 
					
						
							|  |  |  |                 args[_i] = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |             kwnames_out = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             stack_pointer[-1] = kwnames_out; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 |  |  |         /* _DO_CALL_KW is not a viable micro-op for tier 2 */ | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 |  |  |         case _PY_FRAME_KW: { | 
					
						
							|  |  |  |             _Py_UopsSymbol *kwnames; | 
					
						
							|  |  |  |             _Py_UopsSymbol **args; | 
					
						
							|  |  |  |             _Py_UopsSymbol *self_or_null; | 
					
						
							|  |  |  |             _Py_UopsSymbol *callable; | 
					
						
							|  |  |  |             _Py_UOpsAbstractFrame *new_frame; | 
					
						
							|  |  |  |             kwnames = stack_pointer[-1]; | 
					
						
							|  |  |  |             args = &stack_pointer[-1 - oparg]; | 
					
						
							|  |  |  |             self_or_null = stack_pointer[-2 - oparg]; | 
					
						
							|  |  |  |             callable = stack_pointer[-3 - oparg]; | 
					
						
							|  |  |  |             (void)callable; | 
					
						
							|  |  |  |             (void)self_or_null; | 
					
						
							|  |  |  |             (void)args; | 
					
						
							|  |  |  |             (void)kwnames; | 
					
						
							|  |  |  |             new_frame = NULL; | 
					
						
							|  |  |  |             ctx->done = true; | 
					
						
							|  |  |  |             stack_pointer[-3 - oparg] = (_Py_UopsSymbol *)new_frame; | 
					
						
							|  |  |  |             stack_pointer += -2 - oparg; | 
					
						
							|  |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CHECK_FUNCTION_VERSION_KW: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CHECK_METHOD_VERSION_KW: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _EXPAND_METHOD_KW: { | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |             _Py_UopsSymbol **method; | 
					
						
							| 
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 |  |  |             _Py_UopsSymbol **self; | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |             method = &stack_pointer[-3 - oparg]; | 
					
						
							| 
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 |  |  |             self = &stack_pointer[-2 - oparg]; | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |             method[0] = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             self[0] = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CHECK_IS_NOT_PY_CALLABLE_KW: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CALL_KW_NON_PY: { | 
					
						
							|  |  |  |             _Py_UopsSymbol *res; | 
					
						
							|  |  |  |             res = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             stack_pointer[-3 - oparg] = res; | 
					
						
							|  |  |  |             stack_pointer += -2 - oparg; | 
					
						
							|  |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |         /* _INSTRUMENTED_CALL_FUNCTION_EX is not a viable micro-op for tier 2 */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |         case _MAKE_CALLARGS_A_TUPLE: { | 
					
						
							|  |  |  |             _Py_UopsSymbol *tuple; | 
					
						
							|  |  |  |             _Py_UopsSymbol *kwargs_out = NULL; | 
					
						
							|  |  |  |             tuple = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             kwargs_out = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             stack_pointer[-1 - (oparg & 1)] = tuple; | 
					
						
							|  |  |  |             if (oparg & 1) stack_pointer[-(oparg & 1)] = kwargs_out; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         /* _DO_CALL_FUNCTION_EX is not a viable micro-op for tier 2 */ | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |         case _MAKE_FUNCTION: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *func; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             func = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = func; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _SET_FUNCTION_ATTRIBUTE: { | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |             _Py_UopsSymbol *func_out; | 
					
						
							|  |  |  |             func_out = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             stack_pointer[-2] = func_out; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-25 11:32:47 +01:00
										 |  |  |         case _RETURN_GENERATOR: { | 
					
						
							|  |  |  |             _Py_UopsSymbol *res; | 
					
						
							|  |  |  |             ctx->frame->stack_pointer = stack_pointer; | 
					
						
							|  |  |  |             frame_pop(ctx); | 
					
						
							|  |  |  |             stack_pointer = ctx->frame->stack_pointer; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             res = sym_new_unknown(ctx); | 
					
						
							| 
									
										
										
										
											2024-04-25 11:32:47 +01:00
										 |  |  |             /* Stack space handling */ | 
					
						
							|  |  |  |             assert(corresponding_check_stack == NULL); | 
					
						
							|  |  |  |             assert(co != NULL); | 
					
						
							|  |  |  |             int framesize = co->co_framesize; | 
					
						
							|  |  |  |             assert(framesize > 0); | 
					
						
							|  |  |  |             assert(framesize <= curr_space); | 
					
						
							|  |  |  |             curr_space -= framesize; | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |             stack_pointer[0] = res; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							|  |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-04-25 11:32:47 +01:00
										 |  |  |             co = get_code(this_instr); | 
					
						
							|  |  |  |             if (co == NULL) { | 
					
						
							|  |  |  |                 // might be impossible, but bailing is still safe
 | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |                 ctx->done = true; | 
					
						
							| 
									
										
										
										
											2024-04-25 11:32:47 +01:00
										 |  |  |             } | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |         case _BUILD_SLICE: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *slice; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             slice = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2 - ((oparg == 3) ? 1 : 0)] = slice; | 
					
						
							|  |  |  |             stack_pointer += -1 - ((oparg == 3) ? 1 : 0); | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CONVERT_VALUE: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *result; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             result = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = result; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _FORMAT_SIMPLE: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-1] = res; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _FORMAT_WITH_SPEC: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             res = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2] = res; | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _COPY: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *bottom; | 
					
						
							|  |  |  |             _Py_UopsSymbol *top; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             bottom = stack_pointer[-1 - (oparg-1)]; | 
					
						
							|  |  |  |             assert(oparg > 0); | 
					
						
							|  |  |  |             top = bottom; | 
					
						
							|  |  |  |             stack_pointer[0] = top; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _BINARY_OP: { | 
					
						
							| 
									
										
										
										
											2024-04-22 13:34:06 +01:00
										 |  |  |             _Py_UopsSymbol *right; | 
					
						
							|  |  |  |             _Py_UopsSymbol *left; | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *res; | 
					
						
							| 
									
										
										
										
											2024-04-22 13:34:06 +01:00
										 |  |  |             right = stack_pointer[-1]; | 
					
						
							|  |  |  |             left = stack_pointer[-2]; | 
					
						
							|  |  |  |             PyTypeObject *ltype = sym_get_type(left); | 
					
						
							|  |  |  |             PyTypeObject *rtype = sym_get_type(right); | 
					
						
							|  |  |  |             if (ltype != NULL && (ltype == &PyLong_Type || ltype == &PyFloat_Type) && | 
					
						
							|  |  |  |                 rtype != NULL && (rtype == &PyLong_Type || rtype == &PyFloat_Type)) | 
					
						
							|  |  |  |             { | 
					
						
							|  |  |  |                 if (oparg != NB_TRUE_DIVIDE && oparg != NB_INPLACE_TRUE_DIVIDE && | 
					
						
							|  |  |  |                     ltype == &PyLong_Type && rtype == &PyLong_Type) { | 
					
						
							|  |  |  |                     /* If both inputs are ints and the op is not division the result is an int */ | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |                     res = sym_new_type(ctx, &PyLong_Type); | 
					
						
							| 
									
										
										
										
											2024-04-22 13:34:06 +01:00
										 |  |  |                 } | 
					
						
							|  |  |  |                 else { | 
					
						
							|  |  |  |                     /* For any other op combining ints/floats the result is a float */ | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |                     res = sym_new_type(ctx, &PyFloat_Type); | 
					
						
							| 
									
										
										
										
											2024-04-22 13:34:06 +01:00
										 |  |  |                 } | 
					
						
							|  |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |             else { | 
					
						
							|  |  |  |                 res = sym_new_unknown(ctx); | 
					
						
							|  |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[-2] = res; | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _SWAP: { | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |             _Py_UopsSymbol *top_in; | 
					
						
							|  |  |  |             _Py_UopsSymbol *bottom_in; | 
					
						
							|  |  |  |             _Py_UopsSymbol *top_out; | 
					
						
							|  |  |  |             _Py_UopsSymbol *bottom_out; | 
					
						
							|  |  |  |             top_in = stack_pointer[-1]; | 
					
						
							|  |  |  |             bottom_in = stack_pointer[-2 - (oparg-2)]; | 
					
						
							|  |  |  |             bottom_out = bottom_in; | 
					
						
							|  |  |  |             top_out = top_in; | 
					
						
							|  |  |  |             stack_pointer[-2 - (oparg-2)] = top_out; | 
					
						
							|  |  |  |             stack_pointer[-1] = bottom_out; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-26 12:24:12 +01:00
										 |  |  |         /* _INSTRUMENTED_LINE is not a viable micro-op for tier 2 */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |         /* _INSTRUMENTED_INSTRUCTION is not a viable micro-op for tier 2 */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         /* _INSTRUMENTED_JUMP_FORWARD is not a viable micro-op for tier 2 */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 |  |  |         /* _MONITOR_JUMP_BACKWARD is not a viable micro-op for tier 2 */ | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-12-19 16:59:51 +00:00
										 |  |  |         /* _INSTRUMENTED_NOT_TAKEN is not a viable micro-op for tier 2 */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |         /* _INSTRUMENTED_POP_JUMP_IF_TRUE is not a viable micro-op for tier 2 */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         /* _INSTRUMENTED_POP_JUMP_IF_FALSE is not a viable micro-op for tier 2 */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         /* _INSTRUMENTED_POP_JUMP_IF_NONE is not a viable micro-op for tier 2 */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         /* _INSTRUMENTED_POP_JUMP_IF_NOT_NONE is not a viable micro-op for tier 2 */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _GUARD_IS_TRUE_POP: { | 
					
						
							| 
									
										
										
										
											2024-03-05 15:06:00 +00:00
										 |  |  |             _Py_UopsSymbol *flag; | 
					
						
							|  |  |  |             flag = stack_pointer[-1]; | 
					
						
							|  |  |  |             if (sym_is_const(flag)) { | 
					
						
							|  |  |  |                 PyObject *value = sym_get_const(flag); | 
					
						
							|  |  |  |                 assert(value != NULL); | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |                 stack_pointer += -1; | 
					
						
							|  |  |  |                 assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-03-05 15:06:00 +00:00
										 |  |  |                 eliminate_pop_guard(this_instr, value != Py_True); | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |                 stack_pointer += 1; | 
					
						
							|  |  |  |                 assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-03-05 15:06:00 +00:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _GUARD_IS_FALSE_POP: { | 
					
						
							| 
									
										
										
										
											2024-03-05 15:06:00 +00:00
										 |  |  |             _Py_UopsSymbol *flag; | 
					
						
							|  |  |  |             flag = stack_pointer[-1]; | 
					
						
							|  |  |  |             if (sym_is_const(flag)) { | 
					
						
							|  |  |  |                 PyObject *value = sym_get_const(flag); | 
					
						
							|  |  |  |                 assert(value != NULL); | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |                 stack_pointer += -1; | 
					
						
							|  |  |  |                 assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-03-05 15:06:00 +00:00
										 |  |  |                 eliminate_pop_guard(this_instr, value != Py_False); | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |                 stack_pointer += 1; | 
					
						
							|  |  |  |                 assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-03-05 15:06:00 +00:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _GUARD_IS_NONE_POP: { | 
					
						
							| 
									
										
										
										
											2024-03-05 15:06:00 +00:00
										 |  |  |             _Py_UopsSymbol *flag; | 
					
						
							|  |  |  |             flag = stack_pointer[-1]; | 
					
						
							|  |  |  |             if (sym_is_const(flag)) { | 
					
						
							|  |  |  |                 PyObject *value = sym_get_const(flag); | 
					
						
							|  |  |  |                 assert(value != NULL); | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |                 stack_pointer += -1; | 
					
						
							|  |  |  |                 assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-03-05 15:06:00 +00:00
										 |  |  |                 eliminate_pop_guard(this_instr, !Py_IsNone(value)); | 
					
						
							|  |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |             else { | 
					
						
							|  |  |  |                 if (sym_has_type(flag)) { | 
					
						
							|  |  |  |                     assert(!sym_matches_type(flag, &_PyNone_Type)); | 
					
						
							|  |  |  |                     stack_pointer += -1; | 
					
						
							|  |  |  |                     assert(WITHIN_STACK_BOUNDS()); | 
					
						
							|  |  |  |                     eliminate_pop_guard(this_instr, true); | 
					
						
							|  |  |  |                     stack_pointer += 1; | 
					
						
							|  |  |  |                     assert(WITHIN_STACK_BOUNDS()); | 
					
						
							|  |  |  |                 } | 
					
						
							|  |  |  |                 stack_pointer += -1; | 
					
						
							|  |  |  |                 assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-03-05 15:06:00 +00:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _GUARD_IS_NOT_NONE_POP: { | 
					
						
							| 
									
										
										
										
											2024-03-05 15:06:00 +00:00
										 |  |  |             _Py_UopsSymbol *flag; | 
					
						
							|  |  |  |             flag = stack_pointer[-1]; | 
					
						
							|  |  |  |             if (sym_is_const(flag)) { | 
					
						
							|  |  |  |                 PyObject *value = sym_get_const(flag); | 
					
						
							|  |  |  |                 assert(value != NULL); | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |                 stack_pointer += -1; | 
					
						
							|  |  |  |                 assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-03-05 15:06:00 +00:00
										 |  |  |                 eliminate_pop_guard(this_instr, Py_IsNone(value)); | 
					
						
							|  |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 |  |  |             else { | 
					
						
							|  |  |  |                 if (sym_has_type(flag)) { | 
					
						
							|  |  |  |                     assert(!sym_matches_type(flag, &_PyNone_Type)); | 
					
						
							|  |  |  |                     stack_pointer += -1; | 
					
						
							|  |  |  |                     assert(WITHIN_STACK_BOUNDS()); | 
					
						
							|  |  |  |                     eliminate_pop_guard(this_instr, false); | 
					
						
							|  |  |  |                     stack_pointer += 1; | 
					
						
							|  |  |  |                     assert(WITHIN_STACK_BOUNDS()); | 
					
						
							|  |  |  |                 } | 
					
						
							|  |  |  |                 stack_pointer += -1; | 
					
						
							|  |  |  |                 assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-03-05 15:06:00 +00:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _JUMP_TO_TOP: { | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             ctx->done = true; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _SET_IP: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-03 10:14:18 -07:00
										 |  |  |         case _CHECK_STACK_SPACE_OPERAND: { | 
					
						
							| 
									
										
										
										
											2024-11-09 11:35:33 +08:00
										 |  |  |             uint32_t framesize = (uint32_t)this_instr->operand0; | 
					
						
							| 
									
										
										
										
											2024-04-18 11:09:30 +01:00
										 |  |  |             (void)framesize; | 
					
						
							|  |  |  |             /* We should never see _CHECK_STACK_SPACE_OPERANDs.
 | 
					
						
							|  |  |  |              * They are only created at the end of this pass. */ | 
					
						
							|  |  |  |             Py_UNREACHABLE(); | 
					
						
							| 
									
										
										
										
											2024-04-03 10:14:18 -07:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |         case _SAVE_RETURN_OFFSET: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _EXIT_TRACE: { | 
					
						
							| 
									
										
										
										
											2024-11-09 11:35:33 +08:00
										 |  |  |             PyObject *exit_p = (PyObject *)this_instr->operand0; | 
					
						
							| 
									
										
										
										
											2024-07-26 09:40:15 -07:00
										 |  |  |             (void)exit_p; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             ctx->done = true; | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _CHECK_VALIDITY: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_CONST_INLINE: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *value; | 
					
						
							| 
									
										
										
										
											2024-11-09 11:35:33 +08:00
										 |  |  |             PyObject *ptr = (PyObject *)this_instr->operand0; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             value = sym_new_const(ctx, ptr); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[0] = value; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_CONST_INLINE_BORROW: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *value; | 
					
						
							| 
									
										
										
										
											2024-11-09 11:35:33 +08:00
										 |  |  |             PyObject *ptr = (PyObject *)this_instr->operand0; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             value = sym_new_const(ctx, ptr); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[0] = value; | 
					
						
							|  |  |  |             stack_pointer += 1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-01 06:13:38 +08:00
										 |  |  |         case _POP_TOP_LOAD_CONST_INLINE_BORROW: { | 
					
						
							|  |  |  |             _Py_UopsSymbol *value; | 
					
						
							| 
									
										
										
										
											2024-03-13 20:57:48 +08:00
										 |  |  |             value = sym_new_not_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-03-01 06:13:38 +08:00
										 |  |  |             stack_pointer[-1] = value; | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |         case _LOAD_CONST_INLINE_WITH_NULL: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *value; | 
					
						
							|  |  |  |             _Py_UopsSymbol *null; | 
					
						
							| 
									
										
										
										
											2024-11-09 11:35:33 +08:00
										 |  |  |             PyObject *ptr = (PyObject *)this_instr->operand0; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             value = sym_new_const(ctx, ptr); | 
					
						
							|  |  |  |             null = sym_new_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[0] = value; | 
					
						
							|  |  |  |             stack_pointer[1] = null; | 
					
						
							|  |  |  |             stack_pointer += 2; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_CONST_INLINE_BORROW_WITH_NULL: { | 
					
						
							| 
									
										
										
										
											2024-02-27 13:25:02 +00:00
										 |  |  |             _Py_UopsSymbol *value; | 
					
						
							|  |  |  |             _Py_UopsSymbol *null; | 
					
						
							| 
									
										
										
										
											2024-11-09 11:35:33 +08:00
										 |  |  |             PyObject *ptr = (PyObject *)this_instr->operand0; | 
					
						
							| 
									
										
										
										
											2024-05-10 17:43:23 +01:00
										 |  |  |             value = sym_new_const(ctx, ptr); | 
					
						
							|  |  |  |             null = sym_new_null(ctx); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             stack_pointer[0] = value; | 
					
						
							|  |  |  |             stack_pointer[1] = null; | 
					
						
							|  |  |  |             stack_pointer += 2; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-06 13:12:23 +00:00
										 |  |  |         case _CHECK_FUNCTION: { | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-10-09 08:18:25 -07:00
										 |  |  |         case _LOAD_GLOBAL_MODULE: { | 
					
						
							|  |  |  |             _Py_UopsSymbol *res; | 
					
						
							|  |  |  |             _Py_UopsSymbol *null = NULL; | 
					
						
							|  |  |  |             res = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             null = sym_new_null(ctx); | 
					
						
							|  |  |  |             stack_pointer[0] = res; | 
					
						
							|  |  |  |             if (oparg & 1) stack_pointer[1] = null; | 
					
						
							|  |  |  |             stack_pointer += 1 + (oparg & 1); | 
					
						
							|  |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _LOAD_GLOBAL_BUILTINS: { | 
					
						
							|  |  |  |             _Py_UopsSymbol *res; | 
					
						
							|  |  |  |             _Py_UopsSymbol *null = NULL; | 
					
						
							|  |  |  |             res = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             null = sym_new_null(ctx); | 
					
						
							|  |  |  |             stack_pointer[0] = res; | 
					
						
							|  |  |  |             if (oparg & 1) stack_pointer[1] = null; | 
					
						
							|  |  |  |             stack_pointer += 1 + (oparg & 1); | 
					
						
							|  |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-12-13 10:17:16 -08:00
										 |  |  |         case _LOAD_ATTR_MODULE: { | 
					
						
							|  |  |  |             _Py_UopsSymbol *attr; | 
					
						
							|  |  |  |             _Py_UopsSymbol *null = NULL; | 
					
						
							|  |  |  |             attr = sym_new_not_null(ctx); | 
					
						
							|  |  |  |             null = sym_new_null(ctx); | 
					
						
							|  |  |  |             stack_pointer[-1] = attr; | 
					
						
							|  |  |  |             if (oparg & 1) stack_pointer[0] = null; | 
					
						
							|  |  |  |             stack_pointer += (oparg & 1); | 
					
						
							|  |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |         case _INTERNAL_INCREMENT_OPT_COUNTER: { | 
					
						
							|  |  |  |             stack_pointer += -1; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-02-13 21:24:48 +08:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-26 18:08:50 +01:00
										 |  |  |         case _DYNAMIC_EXIT: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-20 09:39:55 +00:00
										 |  |  |         case _START_EXECUTOR: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-26 17:35:42 -07:00
										 |  |  |         case _MAKE_WARM: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-20 09:39:55 +00:00
										 |  |  |         case _FATAL_ERROR: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-13 16:28:19 +00:00
										 |  |  |         case _CHECK_VALIDITY_AND_SET_IP: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-26 09:35:11 +00:00
										 |  |  |         case _DEOPT: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         case _ERROR_POP_N: { | 
					
						
							|  |  |  |             stack_pointer += -oparg; | 
					
						
							| 
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 |  |  |             assert(WITHIN_STACK_BOUNDS()); | 
					
						
							| 
									
										
										
										
											2024-03-26 09:35:11 +00:00
										 |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-29 07:54:05 +01:00
										 |  |  |         case _TIER2_RESUME_CHECK: { | 
					
						
							|  |  |  |             break; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 |