2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								// This file is generated by Tools/cases_generator/tier1_generator.py
							 | 
						
					
						
							
								
									
										
										
										
											2023-03-03 20:59:21 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								// from:
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-12 12:12:17 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								//   Python/bytecodes.c
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								// Do not edit!
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 13:13:02 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#ifdef TIER_TWO
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    #error "This file is for Tier 1 only"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#define TIER_ONE 1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#ifndef Py_TAIL_CALL_INTERP
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#if !USE_COMPUTED_GOTOS
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    dispatch_opcode:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        switch (opcode)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#endif /* Py_TAIL_CALL_INTERP */
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* BEGIN INSTRUCTIONS */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(BINARY_OP) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = BINARY_OP;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-16 15:22:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 6;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(BINARY_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-22 09:22:25 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PREDICTED_BINARY_OP:;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-16 15:22:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr - 6;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef lhs;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef rhs;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _SPECIALIZE_BINARY_OP
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                rhs = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                lhs = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint16_t counter = read_u16(&this_instr[1].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                (void)counter;
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-04 11:13:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #if ENABLE_SPECIALIZATION_FT
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (ADAPTIVE_COUNTER_TRIGGERS(counter)) {
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    next_instr = this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _Py_Specialize_BinaryOp(lhs, rhs, next_instr, oparg, LOCALS_ARRAY);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH_SAME_OPARG();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-22 14:17:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                OPCODE_DEFERRED_INC(BINARY_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                ADVANCE_ADAPTIVE_COUNTER(this_instr[1].counter);
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-04 11:13:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #endif  /* ENABLE_SPECIALIZATION_FT */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(NB_ADD <= oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(oparg <= NB_OPARG_LAST);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-16 15:22:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 4 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _BINARY_OP
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *lhs_o = PyStackRef_AsPyObjectBorrow(lhs);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *rhs_o = PyStackRef_AsPyObjectBorrow(rhs);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(_PyEval_BinaryOps[oparg]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = _PyEval_BinaryOps[oparg](lhs_o, rhs_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(lhs);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(rhs);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(pop_2_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(BINARY_OP_ADD_FLOAT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = BINARY_OP_ADD_FLOAT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-16 15:22:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 6;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(BINARY_OP_ADD_FLOAT);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-16 15:22:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_BINARY_OP == 5, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef left;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef right;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_BOTH_FLOAT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                right = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                left = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyFloat_CheckExact(left_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (!PyFloat_CheckExact(right_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-16 15:22:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 5 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _BINARY_OP_ADD_FLOAT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-07 17:25:48 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(PyFloat_CheckExact(left_o));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(PyFloat_CheckExact(right_o));
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(BINARY_OP, hit);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                double dres =
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                ((PyFloatObject *)left_o)->ob_fval +
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                ((PyFloatObject *)right_o)->ob_fval;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-14 14:18:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = _PyFloat_FromDouble_ConsumeInputs(left, right, dres);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(pop_2_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(BINARY_OP_ADD_INT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = BINARY_OP_ADD_INT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-16 15:22:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 6;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(BINARY_OP_ADD_INT);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-16 15:22:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_BINARY_OP == 5, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef left;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef right;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_BOTH_INT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                right = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                left = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyLong_CheckExact(left_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (!PyLong_CheckExact(right_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-16 15:22:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 5 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _BINARY_OP_ADD_INT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-07 17:25:48 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(PyLong_CheckExact(left_o));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(PyLong_CheckExact(right_o));
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(BINARY_OP, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = _PyLong_Add((PyLongObject *)left_o, (PyLongObject *)right_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-13 11:06:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE_SPECIALIZED(right, _PyLong_ExactDealloc);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE_SPECIALIZED(left, _PyLong_ExactDealloc);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(pop_2_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-05-09 11:02:14 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(BINARY_OP_ADD_UNICODE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = BINARY_OP_ADD_UNICODE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-16 15:22:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 6;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(BINARY_OP_ADD_UNICODE);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-16 15:22:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_BINARY_OP == 5, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef left;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef right;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_BOTH_UNICODE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                right = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                left = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyUnicode_CheckExact(left_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (!PyUnicode_CheckExact(right_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-16 15:22:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 5 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _BINARY_OP_ADD_UNICODE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-07 17:25:48 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(PyUnicode_CheckExact(left_o));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(PyUnicode_CheckExact(right_o));
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(BINARY_OP, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = PyUnicode_Concat(left_o, right_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-14 16:17:51 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE_SPECIALIZED(right, _PyUnicode_ExactDealloc);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE_SPECIALIZED(left, _PyUnicode_ExactDealloc);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(pop_2_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-05 11:07:04 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-16 15:22:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(BINARY_OP_EXTEND) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = BINARY_OP_EXTEND;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-16 15:22:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 6;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(BINARY_OP_EXTEND);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_BINARY_OP == 5, "incorrect cache size");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef left;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef right;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_BINARY_OP_EXTEND
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                right = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                left = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *descr = read_obj(&this_instr[2].cache);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyBinaryOpSpecializationDescr *d = (_PyBinaryOpSpecializationDescr*)descr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(INLINE_CACHE_ENTRIES_BINARY_OP == 5);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(d && d->guard);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int res = d->guard(left_o, right_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!res) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-16 15:22:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip -4 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _BINARY_OP_EXTEND
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *descr = read_obj(&this_instr[2].cache);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(INLINE_CACHE_ENTRIES_BINARY_OP == 5);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyBinaryOpSpecializationDescr *d = (_PyBinaryOpSpecializationDescr*)descr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(BINARY_OP, hit);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = d->action(left_o, right_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(right);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(BINARY_OP_INPLACE_ADD_UNICODE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = BINARY_OP_INPLACE_ADD_UNICODE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-16 15:22:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 6;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(BINARY_OP_INPLACE_ADD_UNICODE);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-16 15:22:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_BINARY_OP == 5, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef left;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef right;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_BOTH_UNICODE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                right = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                left = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyUnicode_CheckExact(left_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (!PyUnicode_CheckExact(right_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-16 15:22:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 5 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _BINARY_OP_INPLACE_ADD_UNICODE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-07 17:25:48 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(PyUnicode_CheckExact(left_o));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(PyUnicode_CheckExact(right_o));
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-25 14:45:07 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int next_oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #if TIER_ONE
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(next_instr->op.code == STORE_FAST);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-25 14:45:07 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                next_oparg = next_instr->op.arg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #else
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-09 11:35:33 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                next_oparg = CURRENT_OPERAND0();
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-25 14:45:07 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef *target_local = &GETLOCAL(next_oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (PyStackRef_AsPyObjectBorrow(*target_local) != left_o) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(BINARY_OP, hit);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                /* Handle `left = left + right` or `left += right` for str.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                 *
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                 * When possible, extend `left` in place rather than
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                 * allocating a new PyUnicodeObject. This attempts to avoid
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                 * quadratic behavior when one neglects to use str.join().
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                 *
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                 * If `left` has only two references remaining (one from
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                 * the stack, one in the locals), DECREFing `left` leaves
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                 * only the locals reference, so PyUnicode_Append knows
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                 * that the string is safe to mutate.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                 */
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(Py_REFCNT(left_o) >= 2);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE_SPECIALIZED(left, _PyUnicode_ExactDealloc);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-20 16:52:20 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *temp = PyStackRef_AsPyObjectSteal(*target_local);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyUnicode_Append(&temp, right_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                *target_local = PyStackRef_FromPyObjectSteal(temp);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-14 16:17:51 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE_SPECIALIZED(right, _PyUnicode_ExactDealloc);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (PyStackRef_IsNull(*target_local)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(pop_2_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-25 14:45:07 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #if TIER_ONE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // The STORE_FAST is already done. This is done here in tier one,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // and during trace projection in tier two:
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(next_instr->op.code == STORE_FAST);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                SKIP_OVER(1);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-25 14:45:07 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -2;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(BINARY_OP_MULTIPLY_FLOAT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = BINARY_OP_MULTIPLY_FLOAT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-16 15:22:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 6;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(BINARY_OP_MULTIPLY_FLOAT);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-16 15:22:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_BINARY_OP == 5, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef left;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef right;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_BOTH_FLOAT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                right = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                left = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyFloat_CheckExact(left_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (!PyFloat_CheckExact(right_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-16 15:22:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 5 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _BINARY_OP_MULTIPLY_FLOAT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-07 17:25:48 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(PyFloat_CheckExact(left_o));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(PyFloat_CheckExact(right_o));
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(BINARY_OP, hit);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                double dres =
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                ((PyFloatObject *)left_o)->ob_fval *
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                ((PyFloatObject *)right_o)->ob_fval;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-14 14:18:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = _PyFloat_FromDouble_ConsumeInputs(left, right, dres);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(pop_2_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(BINARY_OP_MULTIPLY_INT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = BINARY_OP_MULTIPLY_INT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-16 15:22:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 6;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(BINARY_OP_MULTIPLY_INT);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-16 15:22:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_BINARY_OP == 5, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef left;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef right;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_BOTH_INT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                right = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                left = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyLong_CheckExact(left_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (!PyLong_CheckExact(right_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-16 15:22:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 5 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _BINARY_OP_MULTIPLY_INT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-07 17:25:48 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(PyLong_CheckExact(left_o));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(PyLong_CheckExact(right_o));
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(BINARY_OP, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = _PyLong_Multiply((PyLongObject *)left_o, (PyLongObject *)right_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-13 11:06:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE_SPECIALIZED(right, _PyLong_ExactDealloc);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE_SPECIALIZED(left, _PyLong_ExactDealloc);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(pop_2_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-08 15:54:07 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(BINARY_OP_SUBSCR_DICT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = BINARY_OP_SUBSCR_DICT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-16 15:22:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 6;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(BINARY_OP_SUBSCR_DICT);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-16 15:22:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_BINARY_OP == 5, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef dict_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef sub_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 5 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            sub_st = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            dict_st = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *dict = PyStackRef_AsPyObjectBorrow(dict_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!PyDict_CheckExact(dict)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STAT_INC(BINARY_OP, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *res_o;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int rc = PyDict_GetItemRef(dict, sub, &res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (rc == 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyErr_SetKeyError(sub);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(dict_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(sub_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (rc <= 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_2_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // not found or error
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-29 13:49:54 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(BINARY_OP_SUBSCR_GETITEM) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = BINARY_OP_SUBSCR_GETITEM;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-02 00:19:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 6;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(BINARY_OP_SUBSCR_GETITEM);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_BINARY_OP == 5, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-02 00:19:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef container;
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 11:08:17 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef getitem;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-02 00:19:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef sub;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyInterpreterFrame *new_frame;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 5 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-02 00:19:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PEP_523
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (tstate->interp->eval_frame) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-02 00:19:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _BINARY_OP_SUBSCR_CHECK_FUNC
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-02 00:19:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                container = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-02 00:19:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(container));
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyType_HasFeature(tp, Py_TPFLAGS_HEAPTYPE)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-02 00:19:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyHeapTypeObject *ht = (PyHeapTypeObject *)tp;
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 11:08:17 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *getitem_o = FT_ATOMIC_LOAD_PTR_ACQUIRE(ht->_spec_cache.getitem);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (getitem_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 11:08:17 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(PyFunction_Check(getitem_o));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                uint32_t cached_version = FT_ATOMIC_LOAD_UINT32_RELAXED(ht->_spec_cache.getitem_version);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (((PyFunctionObject *)getitem_o)->func_version != cached_version) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 11:08:17 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyCodeObject *code = (PyCodeObject *)PyFunction_GET_CODE(getitem_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-02 00:19:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(code->co_argcount == 2);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!_PyThreadState_HasStackSpace(tstate, code->co_framesize)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 11:08:17 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                getitem = PyStackRef_FromPyObjectNew(getitem_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(BINARY_OP, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-02 00:19:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _BINARY_OP_SUBSCR_INIT_CALL
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-02 00:19:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                sub = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 11:08:17 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                new_frame = _PyFrame_PushUnchecked(tstate, getitem, 2, frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-02 00:19:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                new_frame->localsplus[0] = container;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                new_frame->localsplus[1] = sub;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                frame->return_offset = 6 ;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-02 00:19:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _PUSH_FRAME
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Write it out explicitly because it's subtly different.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Eventually this should be the only occurrence of this code.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(tstate->interp->eval_frame == NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyInterpreterFrame *temp = new_frame;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-02 00:19:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(new_frame->previous == frame || new_frame->previous->previous == frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-02 00:19:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                CALL_STAT_INC(inlined_py_calls);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                frame = tstate->current_frame = temp;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-02 00:19:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                tstate->py_recursion_remaining--;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LOAD_SP();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LOAD_IP(0);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LLTRACE_RESUME_FRAME();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(BINARY_OP_SUBSCR_LIST_INT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = BINARY_OP_SUBSCR_LIST_INT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 6;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(BINARY_OP_SUBSCR_LIST_INT);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_BINARY_OP == 5, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef list_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef sub_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 5 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            sub_st = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            list_st = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *list = PyStackRef_AsPyObjectBorrow(list_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!PyLong_CheckExact(sub)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (!PyList_CheckExact(list)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // Deopt unless 0 <= sub < PyList_Size(list)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!_PyLong_IsNonNegativeCompact((PyLongObject *)sub)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            Py_ssize_t index = ((PyLongObject*)sub)->long_value.ob_digit[0];
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-02 10:38:17 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #ifdef Py_GIL_DISABLED
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *res_o = _PyList_GetItemRef((PyListObject*)list, index);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STAT_INC(BINARY_OP, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-02 10:38:17 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #else
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (index >= PyList_GET_SIZE(list)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STAT_INC(BINARY_OP, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *res_o = PyList_GET_ITEM(list, index);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(res_o != NULL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            Py_INCREF(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-02 10:38:17 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-13 11:06:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE_SPECIALIZED(sub_st, _PyLong_ExactDealloc);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(list_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-29 13:49:54 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(BINARY_OP_SUBSCR_STR_INT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = BINARY_OP_SUBSCR_STR_INT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 6;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(BINARY_OP_SUBSCR_STR_INT);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_BINARY_OP == 5, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef str_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef sub_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 5 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            sub_st = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            str_st = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *str = PyStackRef_AsPyObjectBorrow(str_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!PyLong_CheckExact(sub)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (!PyUnicode_CheckExact(str)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (!_PyLong_IsNonNegativeCompact((PyLongObject *)sub)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            Py_ssize_t index = ((PyLongObject*)sub)->long_value.ob_digit[0];
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (PyUnicode_GET_LENGTH(str) <= index) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // Specialize for reading an ASCII character from any string:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            Py_UCS4 c = PyUnicode_READ_CHAR(str, index);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (Py_ARRAY_LENGTH(_Py_SINGLETON(strings).ascii) <= c) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STAT_INC(BINARY_OP, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *res_o = (PyObject*)&_Py_SINGLETON(strings).ascii[c];
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-13 11:06:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE_SPECIALIZED(sub_st, _PyLong_ExactDealloc);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(str_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-29 13:49:54 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(BINARY_OP_SUBSCR_TUPLE_INT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = BINARY_OP_SUBSCR_TUPLE_INT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 6;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(BINARY_OP_SUBSCR_TUPLE_INT);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_BINARY_OP == 5, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef tuple_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef sub_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 5 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            sub_st = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            tuple_st = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *tuple = PyStackRef_AsPyObjectBorrow(tuple_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!PyLong_CheckExact(sub)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (!PyTuple_CheckExact(tuple)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // Deopt unless 0 <= sub < PyTuple_Size(list)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!_PyLong_IsNonNegativeCompact((PyLongObject *)sub)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            Py_ssize_t index = ((PyLongObject*)sub)->long_value.ob_digit[0];
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (index >= PyTuple_GET_SIZE(tuple)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STAT_INC(BINARY_OP, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *res_o = PyTuple_GET_ITEM(tuple, index);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(res_o != NULL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            Py_INCREF(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-13 11:06:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE_SPECIALIZED(sub_st, _PyLong_ExactDealloc);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(tuple_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-29 13:49:54 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 22:39:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(BINARY_OP_SUBTRACT_FLOAT) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            int opcode = BINARY_OP_SUBTRACT_FLOAT;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 6;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(BINARY_OP_SUBTRACT_FLOAT);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_BINARY_OP == 5, "incorrect cache size");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef left;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef right;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_BOTH_FLOAT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                right = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                left = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (!PyFloat_CheckExact(left_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (!PyFloat_CheckExact(right_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 5 cache entries */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _BINARY_OP_SUBTRACT_FLOAT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(PyFloat_CheckExact(left_o));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(PyFloat_CheckExact(right_o));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(BINARY_OP, hit);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                double dres =
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                ((PyFloatObject *)left_o)->ob_fval -
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                ((PyFloatObject *)right_o)->ob_fval;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = _PyFloat_FromDouble_ConsumeInputs(left, right, dres);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(pop_2_error);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(BINARY_OP_SUBTRACT_INT) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            int opcode = BINARY_OP_SUBTRACT_INT;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 6;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(BINARY_OP_SUBTRACT_INT);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_BINARY_OP == 5, "incorrect cache size");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef left;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef right;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_BOTH_INT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                right = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                left = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (!PyLong_CheckExact(left_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (!PyLong_CheckExact(right_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (BINARY_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(BINARY_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 5 cache entries */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _BINARY_OP_SUBTRACT_INT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(PyLong_CheckExact(left_o));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(PyLong_CheckExact(right_o));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(BINARY_OP, hit);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = _PyLong_Subtract((PyLongObject *)left_o, (PyLongObject *)right_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE_SPECIALIZED(right, _PyLong_ExactDealloc);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE_SPECIALIZED(left, _PyLong_ExactDealloc);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(pop_2_error);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(BINARY_SLICE) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            int opcode = BINARY_SLICE;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(BINARY_SLICE);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef container;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef start;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef stop;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _SPECIALIZE_BINARY_SLICE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Placeholder until we implement BINARY_SLICE specialization
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #if ENABLE_SPECIALIZATION
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                OPCODE_DEFERRED_INC(BINARY_SLICE);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #endif  /* ENABLE_SPECIALIZATION */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _BINARY_SLICE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stop = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                start = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                container = stack_pointer[-3];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *slice = _PyBuildSlice_ConsumeRefs(PyStackRef_AsPyObjectSteal(start),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_AsPyObjectSteal(stop));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Can't use ERROR_IF() here, because we haven't
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // DECREF'ed container yet, and we still own slice.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (slice == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    res_o = NULL;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    res_o = PyObject_GetItem(PyStackRef_AsPyObjectBorrow(container), slice);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    Py_DECREF(slice);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -3;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(container);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(BUILD_LIST) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = BUILD_LIST;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(BUILD_LIST);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *values;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef list;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            values = &stack_pointer[-oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-22 10:51:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *list_o = _PyList_FromStackRefStealOnSuccess(values, oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (list_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            list = PyStackRef_FromPyObjectSteal(list_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-oparg] = list;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1 - oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-08 08:22:56 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(BUILD_MAP) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = BUILD_MAP;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(BUILD_MAP);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *values;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef map;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            values = &stack_pointer[-oparg*2];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STACKREFS_TO_PYOBJECTS(values, oparg*2, values_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (CONVERSION_FAILED(values_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                for (int _i = oparg*2; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(values[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -oparg*2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *map_o = _PyDict_FromItems(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                values_o, 2,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                values_o+1, 2,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STACKREFS_TO_PYOBJECTS_CLEANUP(values_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            for (int _i = oparg*2; --_i >= 0;) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(values[_i]);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (map_o == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -oparg*2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            map = PyStackRef_FromPyObjectSteal(map_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-oparg*2] = map;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1 - oparg*2;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(BUILD_SET) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = BUILD_SET;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(BUILD_SET);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *values;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef set;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            values = &stack_pointer[-oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *set_o = PySet_New(NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (set_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 14:24:58 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(values[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int err = 0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            for (int i = 0; i < oparg; i++) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (err == 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-12 14:49:33 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    err = PySet_Add(set_o, PyStackRef_AsPyObjectBorrow(values[i]));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(values[_i]);
							 | 
						
					
						
							
								
									
										
										
										
											2023-05-31 08:09:23 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (err != 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                Py_DECREF(set_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2023-05-31 08:09:23 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            set = PyStackRef_FromPyObjectSteal(set_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-oparg] = set;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1 - oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(BUILD_SLICE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = BUILD_SLICE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(BUILD_SLICE);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef slice;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            args = &stack_pointer[-oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *start_o = PyStackRef_AsPyObjectBorrow(args[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *stop_o = PyStackRef_AsPyObjectBorrow(args[1]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *step_o = oparg == 3 ? PyStackRef_AsPyObjectBorrow(args[2]) : NULL;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *slice_o = PySlice_New(start_o, stop_o, step_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(args[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (slice_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            slice = PyStackRef_FromPyObjectSteal(slice_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-oparg] = slice;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1 - oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(BUILD_STRING) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = BUILD_STRING;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(BUILD_STRING);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *pieces;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef str;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            pieces = &stack_pointer[-oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STACKREFS_TO_PYOBJECTS(pieces, oparg, pieces_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (CONVERSION_FAILED(pieces_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(pieces[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *str_o = _PyUnicode_JoinArray(&_Py_STR(empty), pieces_o, oparg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            STACKREFS_TO_PYOBJECTS_CLEANUP(pieces_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(pieces[_i]);
							 | 
						
					
						
							
								
									
										
										
										
											2023-05-31 08:09:23 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (str_o == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            str = PyStackRef_FromPyObjectSteal(str_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-oparg] = str;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1 - oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(BUILD_TUPLE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = BUILD_TUPLE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(BUILD_TUPLE);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *values;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef tup;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            values = &stack_pointer[-oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-22 10:51:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *tup_o = _PyTuple_FromStackRefStealOnSuccess(values, oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (tup_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            tup = PyStackRef_FromPyObjectSteal(tup_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-oparg] = tup;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1 - oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CACHE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CACHE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CACHE);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(0 && "Executing a cache.");
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-20 09:39:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            Py_FatalError("Executing a cache.");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-22 09:22:25 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PREDICTED_CALL:;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-09 14:54:39 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr - 4;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            opcode = CALL;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *callable;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *self_or_null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *func;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *maybe_self;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _SPECIALIZE_CALL
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                self_or_null = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callable = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint16_t counter = read_u16(&this_instr[1].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                (void)counter;
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-03 11:20:20 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #if ENABLE_SPECIALIZATION_FT
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (ADAPTIVE_COUNTER_TRIGGERS(counter)) {
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    next_instr = this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _Py_Specialize_Call(callable[0], next_instr, oparg + !PyStackRef_IsNull(self_or_null[0]));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH_SAME_OPARG();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-22 14:17:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                OPCODE_DEFERRED_INC(CALL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                ADVANCE_ADAPTIVE_COUNTER(this_instr[1].counter);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-03 11:20:20 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #endif  /* ENABLE_SPECIALIZATION_FT */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-20 14:27:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _MAYBE_EXPAND_METHOD
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                func = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                maybe_self = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 09:52:49 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                (void)args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (PyStackRef_TYPE(callable[0]) == &PyMethod_Type && PyStackRef_IsNull(self_or_null[0])) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyObject *self = ((PyMethodObject *)callable_o)->im_self;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    maybe_self[0] = PyStackRef_FromPyObjectNew(self);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyObject *method = ((PyMethodObject *)callable_o)->im_func;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyStackRef temp = callable[0];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    func[0] = PyStackRef_FromPyObjectNew(method);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(temp);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _DO_CALL
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                self_or_null = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callable = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                // oparg counts all of the args, but *not* self:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int total_args = oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef *arguments = args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyStackRef_IsNull(self_or_null[0])) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    arguments--;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    total_args++;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Check if the call can be inlined or not
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (Py_TYPE(callable_o) == &PyFunction_Type &&
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    tstate->interp->eval_frame == NULL &&
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    ((PyFunctionObject *)callable_o)->vectorcall == _PyFunction_Vectorcall)
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    int code_flags = ((PyCodeObject*)PyFunction_GET_CODE(callable_o))->co_flags;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *locals = code_flags & CO_OPTIMIZED ? NULL : Py_NewRef(PyFunction_GET_GLOBALS(callable_o));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyInterpreterFrame *new_frame = _PyEvalFramePushAndInit(
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        tstate, callable[0], locals,
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        arguments, total_args, NULL, frame
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    );
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    // Manipulate stack directly since we leave using DISPATCH_INLINED().
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    // The frame has stolen all the arguments from the stack,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    // so there is no need to clean them up.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (new_frame == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-29 18:25:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    frame->return_offset = 4 ;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH_INLINED(new_frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                /* Callable is not a normal Python function */
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STACKREFS_TO_PYOBJECTS(arguments, total_args, args_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (CONVERSION_FAILED(args_o)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_XCLOSE(self_or_null[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        PyStackRef_CLOSE(args[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = PyObject_Vectorcall(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    callable_o, args_o,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    total_args | PY_VECTORCALL_ARGUMENTS_OFFSET,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STACKREFS_TO_PYOBJECTS_CLEANUP(args_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (opcode == INSTRUMENTED_CALL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *arg = total_args == 0 ?
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    &_PyInstrumentation_MISSING : PyStackRef_AsPyObjectBorrow(arguments[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _Py_call_instrumentation_exc2(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            tstate, PY_MONITORING_EVENT_C_RAISE,
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            frame, this_instr, callable_o, arg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    else {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        int err = _Py_call_instrumentation_2args(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            tstate, PY_MONITORING_EVENT_C_RETURN,
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            frame, this_instr, callable_o, arg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        if (err < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 14:00:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            Py_CLEAR(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 14:00:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert((res_o != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_XCLOSE(self_or_null[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(args[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-09 10:50:09 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PERIODIC
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY();
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                QSBR_QUIESCENT_STATE(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer[-2 - oparg] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -1 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    int err = _Py_HandlePending(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (err != 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += 1 + oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2 - oparg] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1 - oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_ALLOC_AND_ENTER_INIT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_ALLOC_AND_ENTER_INIT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_ALLOC_AND_ENTER_INIT);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_CALL == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *callable;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *init;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *self;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyInterpreterFrame *init_frame;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyInterpreterFrame *new_frame;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PEP_523
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (tstate->interp->eval_frame) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_AND_ALLOCATE_OBJECT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                null = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callable = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                init = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                self = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 09:52:49 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint32_t type_version = read_u32(&this_instr[2].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 09:52:49 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                (void)args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyStackRef_IsNull(null[0])) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (!PyType_Check(callable_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyTypeObject *tp = (PyTypeObject *)callable_o;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (FT_ATOMIC_LOAD_UINT32_RELAXED(tp->tp_version_tag) != type_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-31 12:24:17 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(tp->tp_new == PyBaseObject_Type.tp_new);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(tp->tp_flags & Py_TPFLAGS_HEAPTYPE);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(tp->tp_alloc == PyType_GenericAlloc);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyHeapTypeObject *cls = (PyHeapTypeObject *)callable_o;
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-03 11:20:20 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyFunctionObject *init_func = (PyFunctionObject *)FT_ATOMIC_LOAD_PTR_ACQUIRE(cls->_spec_cache.init);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyCodeObject *code = (PyCodeObject *)init_func->func_code;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!_PyThreadState_HasStackSpace(tstate, code->co_framesize + _Py_InitCleanup.co_framesize)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(CALL, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-31 12:24:17 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *self_o = PyType_GenericAlloc(tp, 0);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (self_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                self[0] = PyStackRef_FromPyObjectSteal(self_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef temp = callable[0];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                init[0] = PyStackRef_FromPyObjectNew(init_func);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(temp);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CREATE_INIT_FRAME
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                self = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                init = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyInterpreterFrame *shim = _PyFrame_PushTrampolineUnchecked(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    tstate, (PyCodeObject *)&_Py_InitCleanup, 1, frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 09:52:49 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-04 11:13:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(_PyFrame_GetBytecode(shim)[0].op.code == EXIT_INIT_CHECK);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-03 11:20:20 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(_PyFrame_GetBytecode(shim)[1].op.code == RETURN_VALUE);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                /* Push self onto stack of shim */
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                shim->localsplus[0] = PyStackRef_DUP(self[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-03 11:20:20 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyInterpreterFrame *temp = _PyEvalFramePushAndInit(
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    tstate, init[0], NULL, args-1, oparg+1, NULL, shim);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-03 11:20:20 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -2 - oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-03 11:20:20 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (temp == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-21 12:44:56 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyEval_FrameClearAndPop(tstate, shim);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-21 12:44:56 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-03 11:20:20 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                init_frame = temp;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-21 12:44:56 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                frame->return_offset = 1 + INLINE_CACHE_ENTRIES_CALL;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                /* Account for pushing the extra frame.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                 * We don't check recursion depth here,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                 * as it will be checked after start_frame */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                tstate->py_recursion_remaining--;
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _PUSH_FRAME
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                new_frame = init_frame;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                // Write it out explicitly because it's subtly different.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Eventually this should be the only occurrence of this code.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(tstate->interp->eval_frame == NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyInterpreterFrame *temp = new_frame;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(new_frame->previous == frame || new_frame->previous->previous == frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                CALL_STAT_INC(inlined_py_calls);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                frame = tstate->current_frame = temp;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                tstate->py_recursion_remaining--;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LOAD_SP();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LOAD_IP(0);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LLTRACE_RESUME_FRAME();
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_BOUND_METHOD_EXACT_ARGS) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_BOUND_METHOD_EXACT_ARGS;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_BOUND_METHOD_EXACT_ARGS);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_CALL == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *callable;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *null;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *self_or_null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *args;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyInterpreterFrame *new_frame;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PEP_523
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (tstate->interp->eval_frame) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_CALL_BOUND_METHOD_EXACT_ARGS
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                null = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callable = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyStackRef_IsNull(null[0])) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (Py_TYPE(PyStackRef_AsPyObjectBorrow(callable[0])) != &PyMethod_Type) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _INIT_CALL_BOUND_METHOD_EXACT_ARGS
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                self_or_null = null;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(PyStackRef_IsNull(self_or_null[0]));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(CALL, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                self_or_null[0] = PyStackRef_FromPyObjectNew(((PyMethodObject *)callable_o)->im_self);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef temp = callable[0];
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                callable[0] = PyStackRef_FromPyObjectNew(((PyMethodObject *)callable_o)->im_func);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(temp);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // flush
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-28 12:45:11 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_FUNCTION_VERSION
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                uint32_t func_version = read_u32(&this_instr[2].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyFunction_Check(callable_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyFunctionObject *func = (PyFunctionObject *)callable_o;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (func->func_version != func_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-28 12:45:11 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_FUNCTION_EXACT_ARGS
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(PyFunction_Check(callable_o));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyFunctionObject *func = (PyFunctionObject *)callable_o;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyCodeObject *code = (PyCodeObject *)func->func_code;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (code->co_argcount != oparg + (!PyStackRef_IsNull(self_or_null[0]))) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_STACK_SPACE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyFunctionObject *func = (PyFunctionObject *)callable_o;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyCodeObject *code = (PyCodeObject *)func->func_code;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!_PyThreadState_HasStackSpace(tstate, code->co_framesize)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (tstate->py_recursion_remaining <= 1) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _INIT_CALL_PY_EXACT_ARGS
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int has_self = !PyStackRef_IsNull(self_or_null[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(CALL, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                new_frame = _PyFrame_PushUnchecked(tstate, callable[0], oparg + has_self, frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef *first_non_self_local = new_frame->localsplus + has_self;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                new_frame->localsplus[0] = self_or_null[0];
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-15 17:16:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                for (int i = 0; i < oparg; i++) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    first_non_self_local[i] = args[i];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _SAVE_RETURN_OFFSET
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #if TIER_ONE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                frame->return_offset = (uint16_t)(next_instr - this_instr);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #if TIER_TWO
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                frame->return_offset = oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _PUSH_FRAME
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Write it out explicitly because it's subtly different.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Eventually this should be the only occurrence of this code.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(tstate->interp->eval_frame == NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyInterpreterFrame *temp = new_frame;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -2 - oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(new_frame->previous == frame || new_frame->previous->previous == frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                CALL_STAT_INC(inlined_py_calls);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                frame = tstate->current_frame = temp;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                tstate->py_recursion_remaining--;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LOAD_SP();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LOAD_IP(0);
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-25 11:32:47 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                LLTRACE_RESUME_FRAME();
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_BOUND_METHOD_GENERAL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_BOUND_METHOD_GENERAL;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_BOUND_METHOD_GENERAL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_CALL == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *callable;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *null;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *self_or_null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyInterpreterFrame *new_frame;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PEP_523
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (tstate->interp->eval_frame) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_METHOD_VERSION
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                null = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callable = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint32_t func_version = read_u32(&this_instr[2].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (Py_TYPE(callable_o) != &PyMethod_Type) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *func = ((PyMethodObject *)callable_o)->im_func;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyFunction_Check(func)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (((PyFunctionObject *)func)->func_version != func_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (!PyStackRef_IsNull(null[0])) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _EXPAND_METHOD
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                self_or_null = null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(PyStackRef_IsNull(self_or_null[0]));
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(Py_TYPE(callable_o) == &PyMethod_Type);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                self_or_null[0] = PyStackRef_FromPyObjectNew(((PyMethodObject *)callable_o)->im_self);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef temp = callable[0];
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                callable[0] = PyStackRef_FromPyObjectNew(((PyMethodObject *)callable_o)->im_func);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(PyStackRef_FunctionCheck(callable[0]));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(temp);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // flush
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _PY_FRAME_GENERAL
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                // oparg counts all of the args, but *not* self:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int total_args = oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyStackRef_IsNull(self_or_null[0])) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    args--;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    total_args++;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(Py_TYPE(callable_o) == &PyFunction_Type);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int code_flags = ((PyCodeObject*)PyFunction_GET_CODE(callable_o))->co_flags;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *locals = code_flags & CO_OPTIMIZED ? NULL : Py_NewRef(PyFunction_GET_GLOBALS(callable_o));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyInterpreterFrame *temp = _PyEvalFramePushAndInit(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    tstate, callable[0], locals,
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    args, total_args, NULL, frame
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                );
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // The frame has stolen all the arguments from the stack.
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -2 - oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (temp == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                new_frame = temp;
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _SAVE_RETURN_OFFSET
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #if TIER_ONE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                frame->return_offset = (uint16_t)(next_instr - this_instr);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #if TIER_TWO
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                frame->return_offset = oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _PUSH_FRAME
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Write it out explicitly because it's subtly different.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Eventually this should be the only occurrence of this code.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(tstate->interp->eval_frame == NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyInterpreterFrame *temp = new_frame;
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(new_frame->previous == frame || new_frame->previous->previous == frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                CALL_STAT_INC(inlined_py_calls);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                frame = tstate->current_frame = temp;
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                tstate->py_recursion_remaining--;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LOAD_SP();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LOAD_IP(0);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LLTRACE_RESUME_FRAME();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_BUILTIN_CLASS) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_BUILTIN_CLASS;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_BUILTIN_CLASS);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_CALL == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *callable;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *self_or_null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CALL_BUILTIN_CLASS
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                self_or_null = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callable = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyType_Check(callable_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyTypeObject *tp = (PyTypeObject *)callable_o;
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int total_args = oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef *arguments = args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyStackRef_IsNull(self_or_null[0])) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    arguments--;
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    total_args++;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (tp->tp_vectorcall == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(CALL, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STACKREFS_TO_PYOBJECTS(arguments, total_args, args_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (CONVERSION_FAILED(args_o)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_XCLOSE(self_or_null[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        PyStackRef_CLOSE(args[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = tp->tp_vectorcall((PyObject *)tp, args_o, total_args, NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STACKREFS_TO_PYOBJECTS_CLEANUP(args_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_XCLOSE(self_or_null[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(args[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PERIODIC
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY();
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                QSBR_QUIESCENT_STATE(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer[-2 - oparg] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -1 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    int err = _Py_HandlePending(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (err != 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += 1 + oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2 - oparg] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1 - oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_BUILTIN_FAST) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_BUILTIN_FAST;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_BUILTIN_FAST);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_CALL == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *callable;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *self_or_null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CALL_BUILTIN_FAST
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                self_or_null = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callable = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                /* Builtin METH_FASTCALL functions, without keywords */
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int total_args = oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef *arguments = args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyStackRef_IsNull(self_or_null[0])) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    arguments--;
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    total_args++;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyCFunction_CheckExact(callable_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (PyCFunction_GET_FLAGS(callable_o) != METH_FASTCALL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(CALL, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyCFunction cfunc = PyCFunction_GET_FUNCTION(callable_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                /* res = func(self, args, nargs) */
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STACKREFS_TO_PYOBJECTS(arguments, total_args, args_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (CONVERSION_FAILED(args_o)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_XCLOSE(self_or_null[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        PyStackRef_CLOSE(args[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = ((PyCFunctionFast)(void(*)(void))cfunc)(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyCFunction_GET_SELF(callable_o),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    args_o,
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    total_args);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STACKREFS_TO_PYOBJECTS_CLEANUP(args_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert((res_o != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_XCLOSE(self_or_null[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(args[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PERIODIC
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY();
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                QSBR_QUIESCENT_STATE(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer[-2 - oparg] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -1 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    int err = _Py_HandlePending(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (err != 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += 1 + oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2 - oparg] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1 - oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-08-08 13:42:43 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_BUILTIN_FAST_WITH_KEYWORDS) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_BUILTIN_FAST_WITH_KEYWORDS;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_BUILTIN_FAST_WITH_KEYWORDS);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_CALL == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *callable;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *self_or_null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CALL_BUILTIN_FAST_WITH_KEYWORDS
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                self_or_null = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callable = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                /* Builtin METH_FASTCALL | METH_KEYWORDS functions */
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int total_args = oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef *arguments = args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyStackRef_IsNull(self_or_null[0])) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    arguments--;
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    total_args++;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyCFunction_CheckExact(callable_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (PyCFunction_GET_FLAGS(callable_o) != (METH_FASTCALL | METH_KEYWORDS)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(CALL, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                /* res = func(self, arguments, nargs, kwnames) */
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyCFunctionFastWithKeywords cfunc =
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                (PyCFunctionFastWithKeywords)(void(*)(void))
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyCFunction_GET_FUNCTION(callable_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STACKREFS_TO_PYOBJECTS(arguments, total_args, args_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (CONVERSION_FAILED(args_o)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_XCLOSE(self_or_null[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        PyStackRef_CLOSE(args[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = cfunc(PyCFunction_GET_SELF(callable_o), args_o, total_args, NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STACKREFS_TO_PYOBJECTS_CLEANUP(args_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert((res_o != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_XCLOSE(self_or_null[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(args[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PERIODIC
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY();
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                QSBR_QUIESCENT_STATE(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer[-2 - oparg] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -1 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    int err = _Py_HandlePending(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (err != 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += 1 + oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2 - oparg] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1 - oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_BUILTIN_O) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_BUILTIN_O;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_BUILTIN_O);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_CALL == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *callable;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *self_or_null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CALL_BUILTIN_O
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                self_or_null = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callable = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                /* Builtin METH_O functions */
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int total_args = oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyStackRef_IsNull(self_or_null[0])) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    args--;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    total_args++;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (total_args != 1) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (!PyCFunction_CheckExact(callable_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (PyCFunction_GET_FLAGS(callable_o) != METH_O) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-15 10:48:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                // CPython promises to check all non-vectorcall function calls.
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (tstate->c_recursion_remaining <= 0) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(CALL, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyCFunction cfunc = PyCFunction_GET_FUNCTION(callable_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef arg = args[0];
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-15 10:48:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _Py_EnterRecursiveCallTstateUnchecked(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = _PyCFunction_TrampolineCall(cfunc, PyCFunction_GET_SELF(callable_o), PyStackRef_AsPyObjectBorrow(arg));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _Py_LeaveRecursiveCallTstate(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert((res_o != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(arg);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -2 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PERIODIC
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY();
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                QSBR_QUIESCENT_STATE(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer[0] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    int err = _Py_HandlePending(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (err != 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_FUNCTION_EX) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_FUNCTION_EX;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_FUNCTION_EX);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            opcode = CALL_FUNCTION_EX;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef func;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef callargs;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef kwargs_in;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef tuple;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef kwargs_out;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef func_st;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef callargs_st;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef kwargs_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef result;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _MAKE_CALLARGS_A_TUPLE
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                kwargs_in = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callargs = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                func = stack_pointer[-4];
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *callargs_o = PyStackRef_AsPyObjectBorrow(callargs);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (PyTuple_CheckExact(callargs_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    tuple = callargs;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    kwargs_out = kwargs_in;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    int err = _Py_Check_ArgsIterable(tstate, PyStackRef_AsPyObjectBorrow(func), callargs_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (err < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-13 01:28:01 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *tuple_o = PySequence_Tuple(callargs_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (tuple_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    kwargs_out = kwargs_in;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(callargs);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    tuple = PyStackRef_FromPyObjectSteal(tuple_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _DO_CALL_FUNCTION_EX
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                kwargs_st = kwargs_out;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callargs_st = tuple;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                null = stack_pointer[-3];
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                func_st = func;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                (void)null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *func = PyStackRef_AsPyObjectBorrow(func_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // DICT_MERGE is called before this opcode if there are kwargs.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // It converts all dict subtypes in kwargs into regular dicts.
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                EVAL_CALL_STAT_INC_IF_FUNCTION(EVAL_CALL_FUNCTION_EX, func);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *result_o;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(!_PyErr_Occurred(tstate));
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (opcode == INSTRUMENTED_CALL_FUNCTION_EX) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-20 16:52:20 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyObject *callargs = PyStackRef_AsPyObjectBorrow(callargs_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *kwargs = PyStackRef_AsPyObjectBorrow(kwargs_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(kwargs == NULL || PyDict_CheckExact(kwargs));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(PyTuple_CheckExact(callargs));
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyObject *arg = PyTuple_GET_SIZE(callargs) > 0 ?
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyTuple_GET_ITEM(callargs, 0) : &_PyInstrumentation_MISSING;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer[-2] = callargs_st;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer[-1] = kwargs_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    int err = _Py_call_instrumentation_2args(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        tstate, PY_MONITORING_EVENT_CALL,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        frame, this_instr, func, arg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (err) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    result_o = PyObject_Call(func, callargs, kwargs);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (!PyFunction_Check(func) && !PyMethod_Check(func)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        if (result_o == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            _Py_call_instrumentation_exc2(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                                tstate, PY_MONITORING_EVENT_C_RAISE,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                                frame, this_instr, func, arg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        else {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            int err = _Py_call_instrumentation_2args(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                                tstate, PY_MONITORING_EVENT_C_RETURN,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                                frame, this_instr, func, arg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            if (err < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 14:00:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                                Py_CLEAR(result_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 14:00:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (Py_TYPE(func) == &PyFunction_Type &&
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        tstate->interp->eval_frame == NULL &&
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        ((PyFunctionObject *)func)->vectorcall == _PyFunction_Vectorcall) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-20 16:52:20 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        PyObject *callargs = PyStackRef_AsPyObjectSteal(callargs_st);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        assert(PyTuple_CheckExact(callargs));
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-20 16:52:20 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        PyObject *kwargs = PyStackRef_IsNull(kwargs_st) ? NULL : PyStackRef_AsPyObjectSteal(kwargs_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        assert(kwargs == NULL || PyDict_CheckExact(kwargs));
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        Py_ssize_t nargs = PyTuple_GET_SIZE(callargs);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        int code_flags = ((PyCodeObject *)PyFunction_GET_CODE(func))->co_flags;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        PyObject *locals = code_flags & CO_OPTIMIZED ? NULL : Py_NewRef(PyFunction_GET_GLOBALS(func));
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer += -2;
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-20 16:52:20 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-24 13:08:18 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _PyInterpreterFrame *new_frame = _PyEvalFramePushAndInit_Ex(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            tstate, func_st, locals,
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            nargs, callargs, kwargs, frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        // Need to sync the stack since we exit with DISPATCH_INLINED.
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer += -2;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        if (new_frame == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-13 01:28:01 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-29 18:25:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        assert( 1 == 1);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        frame->return_offset = 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        DISPATCH_INLINED(new_frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-20 16:52:20 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyObject *callargs = PyStackRef_AsPyObjectBorrow(callargs_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(PyTuple_CheckExact(callargs));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *kwargs = PyStackRef_AsPyObjectBorrow(kwargs_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(kwargs == NULL || PyDict_CheckExact(kwargs));
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer[-2] = callargs_st;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer[-1] = kwargs_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    result_o = PyObject_Call(func, callargs, kwargs);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_XCLOSE(kwargs_st);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(callargs_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(func_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (result_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                result = PyStackRef_FromPyObjectSteal(result_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PERIODIC
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY();
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                QSBR_QUIESCENT_STATE(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer[0] = result;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    int err = _Py_HandlePending(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (err != 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = result;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_INTRINSIC_1) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_INTRINSIC_1;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_INTRINSIC_1);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(oparg <= MAX_INTRINSIC_1);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *res_o = _PyIntrinsics_UnaryFunctions[oparg].func(tstate, PyStackRef_AsPyObjectBorrow(value));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(value);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_1_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = res;
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_INTRINSIC_2) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_INTRINSIC_2;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_INTRINSIC_2);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value2_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value1_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            value1_st = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            value2_st = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(oparg <= MAX_INTRINSIC_2);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *value1 = PyStackRef_AsPyObjectBorrow(value1_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *value2 = PyStackRef_AsPyObjectBorrow(value2_st);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *res_o = _PyIntrinsics_BinaryFunctions[oparg].func(tstate, value2, value1);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(value2_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(value1_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_2_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_ISINSTANCE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_ISINSTANCE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_ISINSTANCE);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_CALL == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *callable;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *self_or_null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            args = &stack_pointer[-oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            self_or_null = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            callable = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* isinstance(o, o2) */
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int total_args = oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *arguments = args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!PyStackRef_IsNull(self_or_null[0])) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                arguments--;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                total_args++;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (total_args != 2) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyInterpreterState *interp = tstate->interp;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (callable_o != interp->callable_cache.isinstance) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STAT_INC(CALL, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef cls_stackref = arguments[1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef inst_stackref = arguments[0];
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int retval = PyObject_IsInstance(PyStackRef_AsPyObjectBorrow(inst_stackref), PyStackRef_AsPyObjectBorrow(cls_stackref));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (retval < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-09 10:50:09 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            res = retval ? PyStackRef_True : PyStackRef_False;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert((!PyStackRef_IsNull(res)) ^ (_PyErr_Occurred(tstate) != NULL));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_XCLOSE(self_or_null[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(args[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2 - oparg] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1 - oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_KW) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_KW;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_KW);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-22 09:22:25 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PREDICTED_CALL_KW:;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-09 14:54:39 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr - 4;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            opcode = CALL_KW;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *callable;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *self_or_null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *args;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef kwnames;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef kwnames_in;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *func;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *maybe_self;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef kwnames_out;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _SPECIALIZE_CALL_KW
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                self_or_null = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callable = &stack_pointer[-3 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint16_t counter = read_u16(&this_instr[1].cache);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                (void)counter;
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-11 15:18:22 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #if ENABLE_SPECIALIZATION_FT
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (ADAPTIVE_COUNTER_TRIGGERS(counter)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    next_instr = this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _Py_Specialize_CallKw(callable[0], next_instr, oparg + !PyStackRef_IsNull(self_or_null[0]));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH_SAME_OPARG();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-22 14:17:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                OPCODE_DEFERRED_INC(CALL_KW);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                ADVANCE_ADAPTIVE_COUNTER(this_instr[1].counter);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-11 15:18:22 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #endif  /* ENABLE_SPECIALIZATION_FT */
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _MAYBE_EXPAND_METHOD_KW
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                kwnames_in = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                func = &stack_pointer[-3 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                maybe_self = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 09:52:49 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                (void)args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (PyStackRef_TYPE(callable[0]) == &PyMethod_Type && PyStackRef_IsNull(self_or_null[0])) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *self = ((PyMethodObject *)callable_o)->im_self;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    maybe_self[0] = PyStackRef_FromPyObjectNew(self);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *method = ((PyMethodObject *)callable_o)->im_func;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyStackRef temp = callable[0];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    func[0] = PyStackRef_FromPyObjectNew(method);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(temp);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                kwnames_out = kwnames_in;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _DO_CALL_KW
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                kwnames = kwnames_out;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                self_or_null = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callable = &stack_pointer[-3 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *kwnames_o = PyStackRef_AsPyObjectBorrow(kwnames);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // oparg counts all of the args, but *not* self:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int total_args = oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef *arguments = args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyStackRef_IsNull(self_or_null[0])) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    arguments--;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    total_args++;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int positional_args = total_args - (int)PyTuple_GET_SIZE(kwnames_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Check if the call can be inlined or not
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (Py_TYPE(callable_o) == &PyFunction_Type &&
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    tstate->interp->eval_frame == NULL &&
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    ((PyFunctionObject *)callable_o)->vectorcall == _PyFunction_Vectorcall)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    int code_flags = ((PyCodeObject*)PyFunction_GET_CODE(callable_o))->co_flags;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *locals = code_flags & CO_OPTIMIZED ? NULL : Py_NewRef(PyFunction_GET_GLOBALS(callable_o));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer[-1] = kwnames;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyInterpreterFrame *new_frame = _PyEvalFramePushAndInit(
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        tstate, callable[0], locals,
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        arguments, positional_args, kwnames_o, frame
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    );
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(kwnames);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    // Sync stack explicitly since we leave using DISPATCH_INLINED().
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2 - oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    // The frame has stolen all the arguments from the stack,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    // so there is no need to clean them up.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (new_frame == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-29 18:25:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    assert( 4 == 1 + INLINE_CACHE_ENTRIES_CALL_KW);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    frame->return_offset = 4 ;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH_INLINED(new_frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                /* Callable is not a normal Python function */
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STACKREFS_TO_PYOBJECTS(arguments, total_args, args_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (CONVERSION_FAILED(args_o)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_XCLOSE(self_or_null[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        PyStackRef_CLOSE(args[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(kwnames);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -3 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer[-1] = kwnames;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = PyObject_Vectorcall(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    callable_o, args_o,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    positional_args | PY_VECTORCALL_ARGUMENTS_OFFSET,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    kwnames_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STACKREFS_TO_PYOBJECTS_CLEANUP(args_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (opcode == INSTRUMENTED_CALL_KW) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *arg = total_args == 0 ?
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    &_PyInstrumentation_MISSING : PyStackRef_AsPyObjectBorrow(arguments[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _Py_call_instrumentation_exc2(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            tstate, PY_MONITORING_EVENT_C_RAISE,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            frame, this_instr, callable_o, arg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    else {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        int err = _Py_call_instrumentation_2args(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            tstate, PY_MONITORING_EVENT_C_RETURN,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            frame, this_instr, callable_o, arg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        if (err < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 14:00:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            Py_CLEAR(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 14:00:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_XCLOSE(self_or_null[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(args[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(kwnames);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -3 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-3 - oparg] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -2 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_KW_BOUND_METHOD) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_KW_BOUND_METHOD;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_KW_BOUND_METHOD);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_CALL_KW == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *callable;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef kwnames;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *self_or_null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *args;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyInterpreterFrame *new_frame;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PEP_523
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (tstate->interp->eval_frame) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL_KW);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL_KW));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL_KW);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_METHOD_VERSION_KW
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                null = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callable = &stack_pointer[-3 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint32_t func_version = read_u32(&this_instr[2].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (Py_TYPE(callable_o) != &PyMethod_Type) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL_KW);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL_KW));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL_KW);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *func = ((PyMethodObject *)callable_o)->im_func;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyFunction_Check(func)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL_KW);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL_KW));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL_KW);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (((PyFunctionObject *)func)->func_version != func_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL_KW);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL_KW));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL_KW);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (!PyStackRef_IsNull(null[0])) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL_KW);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL_KW));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL_KW);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _EXPAND_METHOD_KW
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                self_or_null = null;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(PyStackRef_IsNull(self_or_null[0]));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef callable_s = callable[0];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable_s);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(Py_TYPE(callable_o) == &PyMethod_Type);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                self_or_null[0] = PyStackRef_FromPyObjectNew(((PyMethodObject *)callable_o)->im_self);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callable[0] = PyStackRef_FromPyObjectNew(((PyMethodObject *)callable_o)->im_func);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(PyStackRef_FunctionCheck(callable[0]));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(callable_s);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // flush
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _PY_FRAME_KW
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                kwnames = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                // oparg counts all of the args, but *not* self:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int total_args = oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef *arguments = args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyStackRef_IsNull(self_or_null[0])) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    arguments--;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    total_args++;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *kwnames_o = PyStackRef_AsPyObjectBorrow(kwnames);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int positional_args = total_args - (int)PyTuple_GET_SIZE(kwnames_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(Py_TYPE(callable_o) == &PyFunction_Type);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int code_flags = ((PyCodeObject*)PyFunction_GET_CODE(callable_o))->co_flags;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *locals = code_flags & CO_OPTIMIZED ? NULL : Py_NewRef(PyFunction_GET_GLOBALS(callable_o));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-11 15:18:22 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyInterpreterFrame *temp = _PyEvalFramePushAndInit(
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    tstate, callable[0], locals,
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    arguments, positional_args, kwnames_o, frame
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                );
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(kwnames);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                // The frame has stolen all the arguments from the stack,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // so there is no need to clean them up.
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -2 - oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-11 15:18:22 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (temp == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-11 15:18:22 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                new_frame = temp;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _SAVE_RETURN_OFFSET
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #if TIER_ONE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                frame->return_offset = (uint16_t)(next_instr - this_instr);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #if TIER_TWO
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                frame->return_offset = oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _PUSH_FRAME
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Write it out explicitly because it's subtly different.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Eventually this should be the only occurrence of this code.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(tstate->interp->eval_frame == NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyInterpreterFrame *temp = new_frame;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(new_frame->previous == frame || new_frame->previous->previous == frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                CALL_STAT_INC(inlined_py_calls);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                frame = tstate->current_frame = temp;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                tstate->py_recursion_remaining--;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LOAD_SP();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LOAD_IP(0);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LLTRACE_RESUME_FRAME();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_KW_NON_PY) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_KW_NON_PY;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_KW_NON_PY);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            opcode = CALL_KW_NON_PY;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_CALL_KW == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *callable;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef kwnames;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *self_or_null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *args;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_IS_NOT_PY_CALLABLE_KW
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                callable = &stack_pointer[-3 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (PyFunction_Check(callable_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL_KW);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL_KW));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL_KW);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (Py_TYPE(callable_o) == &PyMethod_Type) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL_KW);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL_KW));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL_KW);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CALL_KW_NON_PY
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                kwnames = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                self_or_null = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #if TIER_ONE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(opcode != INSTRUMENTED_CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int total_args = oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef *arguments = args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyStackRef_IsNull(self_or_null[0])) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    arguments--;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    total_args++;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                /* Callable is not a normal Python function */
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STACKREFS_TO_PYOBJECTS(arguments, total_args, args_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (CONVERSION_FAILED(args_o)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_XCLOSE(self_or_null[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        PyStackRef_CLOSE(args[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(kwnames);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -3 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *kwnames_o = PyStackRef_AsPyObjectBorrow(kwnames);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int positional_args = total_args - (int)PyTuple_GET_SIZE(kwnames_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = PyObject_Vectorcall(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    callable_o, args_o,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    positional_args | PY_VECTORCALL_ARGUMENTS_OFFSET,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    kwnames_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(kwnames);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STACKREFS_TO_PYOBJECTS_CLEANUP(args_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert((res_o != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_XCLOSE(self_or_null[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(args[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2 - oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PERIODIC
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY();
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                QSBR_QUIESCENT_STATE(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer[-2 - oparg] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -1 - oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    int err = _Py_HandlePending(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (err != 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += 1 + oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2 - oparg] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1 - oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_KW_PY) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_KW_PY;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_KW_PY);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_CALL_KW == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *callable;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *self_or_null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef kwnames;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *args;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyInterpreterFrame *new_frame;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PEP_523
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (tstate->interp->eval_frame) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL_KW);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL_KW));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL_KW);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_FUNCTION_VERSION_KW
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                callable = &stack_pointer[-3 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint32_t func_version = read_u32(&this_instr[2].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyFunction_Check(callable_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL_KW);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL_KW));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL_KW);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyFunctionObject *func = (PyFunctionObject *)callable_o;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (func->func_version != func_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL_KW);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL_KW));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL_KW);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _PY_FRAME_KW
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                kwnames = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                self_or_null = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                // oparg counts all of the args, but *not* self:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int total_args = oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef *arguments = args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyStackRef_IsNull(self_or_null[0])) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    arguments--;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    total_args++;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *kwnames_o = PyStackRef_AsPyObjectBorrow(kwnames);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int positional_args = total_args - (int)PyTuple_GET_SIZE(kwnames_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(Py_TYPE(callable_o) == &PyFunction_Type);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int code_flags = ((PyCodeObject*)PyFunction_GET_CODE(callable_o))->co_flags;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *locals = code_flags & CO_OPTIMIZED ? NULL : Py_NewRef(PyFunction_GET_GLOBALS(callable_o));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-11 15:18:22 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyInterpreterFrame *temp = _PyEvalFramePushAndInit(
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    tstate, callable[0], locals,
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    arguments, positional_args, kwnames_o, frame
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                );
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(kwnames);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                // The frame has stolen all the arguments from the stack,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // so there is no need to clean them up.
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -2 - oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-11 15:18:22 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (temp == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-11 15:18:22 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                new_frame = temp;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _SAVE_RETURN_OFFSET
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #if TIER_ONE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                frame->return_offset = (uint16_t)(next_instr - this_instr);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #if TIER_TWO
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                frame->return_offset = oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _PUSH_FRAME
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Write it out explicitly because it's subtly different.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Eventually this should be the only occurrence of this code.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(tstate->interp->eval_frame == NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyInterpreterFrame *temp = new_frame;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(new_frame->previous == frame || new_frame->previous->previous == frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                CALL_STAT_INC(inlined_py_calls);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                frame = tstate->current_frame = temp;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                tstate->py_recursion_remaining--;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LOAD_SP();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LOAD_IP(0);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LLTRACE_RESUME_FRAME();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_LEN) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_LEN;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_LEN);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_CALL == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *callable;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *self_or_null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            args = &stack_pointer[-oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            self_or_null = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            callable = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* len(o) */
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int total_args = oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!PyStackRef_IsNull(self_or_null[0])) {
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                args--;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                total_args++;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (total_args != 1) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyInterpreterState *interp = tstate->interp;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (callable_o != interp->callable_cache.len) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STAT_INC(CALL, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef arg_stackref = args[0];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *arg = PyStackRef_AsPyObjectBorrow(arg_stackref);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            Py_ssize_t len_i = PyObject_Length(arg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (len_i < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *res_o = PyLong_FromSsize_t(len_i);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert((res_o != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 09:52:49 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-15 10:48:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(arg_stackref);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -2 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_LIST_APPEND) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_LIST_APPEND;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_LIST_APPEND);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_CALL == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef callable;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef self;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef arg;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-11 09:30:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            arg = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            self = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            callable = stack_pointer[-3];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(oparg == 1);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *self_o = PyStackRef_AsPyObjectBorrow(self);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyInterpreterState *interp = tstate->interp;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (callable_o != interp->callable_cache.list_append) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(self_o != NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!PyList_Check(self_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (!LOCK_OBJECT(self_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STAT_INC(CALL, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 14:24:58 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int err = _PyList_AppendTakeRef((PyListObject *)self_o, PyStackRef_AsPyObjectSteal(arg));
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-03 11:20:20 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            UNLOCK_OBJECT(self_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(self);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(callable);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (err) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 14:24:58 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if TIER_ONE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // Skip the following POP_TOP. This is done here in tier one, and
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // during trace projection in tier two:
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(next_instr->op.code == POP_TOP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            SKIP_OVER(1);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 14:24:58 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-02-14 11:54:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_METHOD_DESCRIPTOR_FAST) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_METHOD_DESCRIPTOR_FAST;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_METHOD_DESCRIPTOR_FAST);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_CALL == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *callable;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *self_or_null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CALL_METHOD_DESCRIPTOR_FAST
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                self_or_null = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callable = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int total_args = oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef *arguments = args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyStackRef_IsNull(self_or_null[0])) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    arguments--;
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    total_args++;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyMethodDescrObject *method = (PyMethodDescrObject *)callable_o;
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                /* Builtin METH_FASTCALL methods, without keywords */
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!Py_IS_TYPE(method, &PyMethodDescr_Type)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyMethodDef *meth = method->d_method;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (meth->ml_flags != METH_FASTCALL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *self = PyStackRef_AsPyObjectBorrow(arguments[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!Py_IS_TYPE(self, method->d_common.d_type)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(CALL, hit);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int nargs = total_args - 1;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STACKREFS_TO_PYOBJECTS(arguments, total_args, args_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (CONVERSION_FAILED(args_o)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_XCLOSE(self_or_null[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        PyStackRef_CLOSE(args[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyCFunctionFast cfunc =
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                (PyCFunctionFast)(void(*)(void))meth->ml_meth;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = cfunc(self, (args_o + 1), nargs);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STACKREFS_TO_PYOBJECTS_CLEANUP(args_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert((res_o != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_XCLOSE(self_or_null[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(args[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PERIODIC
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY();
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                QSBR_QUIESCENT_STATE(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer[-2 - oparg] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -1 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    int err = _Py_HandlePending(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (err != 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += 1 + oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2 - oparg] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1 - oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_CALL == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *callable;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *self_or_null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                self_or_null = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callable = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int total_args = oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef *arguments = args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyStackRef_IsNull(self_or_null[0])) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    arguments--;
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    total_args++;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyMethodDescrObject *method = (PyMethodDescrObject *)callable_o;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!Py_IS_TYPE(method, &PyMethodDescr_Type)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyMethodDef *meth = method->d_method;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (meth->ml_flags != (METH_FASTCALL|METH_KEYWORDS)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyTypeObject *d_type = method->d_common.d_type;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *self = PyStackRef_AsPyObjectBorrow(arguments[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!Py_IS_TYPE(self, d_type)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(CALL, hit);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int nargs = total_args - 1;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STACKREFS_TO_PYOBJECTS(arguments, total_args, args_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (CONVERSION_FAILED(args_o)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_XCLOSE(self_or_null[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        PyStackRef_CLOSE(args[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyCFunctionFastWithKeywords cfunc =
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                (PyCFunctionFastWithKeywords)(void(*)(void))meth->ml_meth;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = cfunc(self, (args_o + 1), nargs, NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STACKREFS_TO_PYOBJECTS_CLEANUP(args_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert((res_o != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_XCLOSE(self_or_null[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(args[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PERIODIC
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY();
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                QSBR_QUIESCENT_STATE(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer[-2 - oparg] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -1 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    int err = _Py_HandlePending(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (err != 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += 1 + oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-08-17 11:29:58 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2 - oparg] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1 - oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-08-31 11:34:52 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2023-04-12 12:04:55 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_METHOD_DESCRIPTOR_NOARGS) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_METHOD_DESCRIPTOR_NOARGS;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_METHOD_DESCRIPTOR_NOARGS);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_CALL == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *callable;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *self_or_null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CALL_METHOD_DESCRIPTOR_NOARGS
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                self_or_null = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callable = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(oparg == 0 || oparg == 1);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int total_args = oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyStackRef_IsNull(self_or_null[0])) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    args--;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    total_args++;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (total_args != 1) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyMethodDescrObject *method = (PyMethodDescrObject *)callable_o;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!Py_IS_TYPE(method, &PyMethodDescr_Type)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyMethodDef *meth = method->d_method;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef self_stackref = args[0];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *self = PyStackRef_AsPyObjectBorrow(self_stackref);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!Py_IS_TYPE(self, method->d_common.d_type)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (meth->ml_flags != METH_NOARGS) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-15 10:48:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                // CPython promises to check all non-vectorcall function calls.
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (tstate->c_recursion_remaining <= 0) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(CALL, hit);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyCFunction cfunc = meth->ml_meth;
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-15 10:48:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _Py_EnterRecursiveCallTstateUnchecked(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = _PyCFunction_TrampolineCall(cfunc, self, NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _Py_LeaveRecursiveCallTstate(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert((res_o != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(self_stackref);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -2 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PERIODIC
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY();
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                QSBR_QUIESCENT_STATE(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer[0] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    int err = _Py_HandlePending(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (err != 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2023-02-08 06:32:21 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_METHOD_DESCRIPTOR_O) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_METHOD_DESCRIPTOR_O;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_METHOD_DESCRIPTOR_O);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_CALL == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *callable;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *self_or_null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CALL_METHOD_DESCRIPTOR_O
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                self_or_null = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callable = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int total_args = oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef *arguments = args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyStackRef_IsNull(self_or_null[0])) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    arguments--;
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    total_args++;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyMethodDescrObject *method = (PyMethodDescrObject *)callable_o;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (total_args != 2) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (!Py_IS_TYPE(method, &PyMethodDescr_Type)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyMethodDef *meth = method->d_method;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (meth->ml_flags != METH_O) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-15 10:48:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                // CPython promises to check all non-vectorcall function calls.
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (tstate->c_recursion_remaining <= 0) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef arg_stackref = arguments[1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef self_stackref = arguments[0];
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!Py_IS_TYPE(PyStackRef_AsPyObjectBorrow(self_stackref),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                                method->d_common.d_type)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(CALL, hit);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyCFunction cfunc = meth->ml_meth;
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-15 10:48:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _Py_EnterRecursiveCallTstateUnchecked(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = _PyCFunction_TrampolineCall(cfunc,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_AsPyObjectBorrow(self_stackref),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_AsPyObjectBorrow(arg_stackref));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _Py_LeaveRecursiveCallTstate(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert((res_o != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_XCLOSE(self_or_null[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(args[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-08-17 11:29:58 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PERIODIC
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY();
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                QSBR_QUIESCENT_STATE(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer[-2 - oparg] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -1 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    int err = _Py_HandlePending(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (err != 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += 1 + oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2 - oparg] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1 - oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_NON_PY_GENERAL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_NON_PY_GENERAL;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_NON_PY_GENERAL);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            opcode = CALL_NON_PY_GENERAL;
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_CALL == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *callable;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *self_or_null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_IS_NOT_PY_CALLABLE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                callable = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (PyFunction_Check(callable_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (Py_TYPE(callable_o) == &PyMethod_Type) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CALL_NON_PY_GENERAL
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                self_or_null = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #if TIER_ONE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(opcode != INSTRUMENTED_CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int total_args = oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef *arguments = args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyStackRef_IsNull(self_or_null[0])) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    arguments--;
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    total_args++;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                /* Callable is not a normal Python function */
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STACKREFS_TO_PYOBJECTS(arguments, total_args, args_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (CONVERSION_FAILED(args_o)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_XCLOSE(self_or_null[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        PyStackRef_CLOSE(args[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = PyObject_Vectorcall(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    callable_o, args_o,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    total_args | PY_VECTORCALL_ARGUMENTS_OFFSET,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STACKREFS_TO_PYOBJECTS_CLEANUP(args_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert((res_o != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_XCLOSE(self_or_null[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(args[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PERIODIC
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY();
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                QSBR_QUIESCENT_STATE(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer[-2 - oparg] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -1 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    int err = _Py_HandlePending(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (err != 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += 1 + oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            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
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_PY_EXACT_ARGS) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_PY_EXACT_ARGS;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_PY_EXACT_ARGS);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_CALL == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *callable;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *self_or_null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *args;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyInterpreterFrame *new_frame;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PEP_523
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (tstate->interp->eval_frame) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-28 12:45:11 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_FUNCTION_VERSION
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                callable = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint32_t func_version = read_u32(&this_instr[2].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyFunction_Check(callable_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyFunctionObject *func = (PyFunctionObject *)callable_o;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (func->func_version != func_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-28 12:45:11 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_FUNCTION_EXACT_ARGS
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                self_or_null = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(PyFunction_Check(callable_o));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyFunctionObject *func = (PyFunctionObject *)callable_o;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyCodeObject *code = (PyCodeObject *)func->func_code;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (code->co_argcount != oparg + (!PyStackRef_IsNull(self_or_null[0]))) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_STACK_SPACE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyFunctionObject *func = (PyFunctionObject *)callable_o;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyCodeObject *code = (PyCodeObject *)func->func_code;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!_PyThreadState_HasStackSpace(tstate, code->co_framesize)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (tstate->py_recursion_remaining <= 1) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _INIT_CALL_PY_EXACT_ARGS
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int has_self = !PyStackRef_IsNull(self_or_null[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(CALL, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                new_frame = _PyFrame_PushUnchecked(tstate, callable[0], oparg + has_self, frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef *first_non_self_local = new_frame->localsplus + has_self;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                new_frame->localsplus[0] = self_or_null[0];
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-15 17:16:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                for (int i = 0; i < oparg; i++) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    first_non_self_local[i] = args[i];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _SAVE_RETURN_OFFSET
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #if TIER_ONE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                frame->return_offset = (uint16_t)(next_instr - this_instr);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #if TIER_TWO
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                frame->return_offset = oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2023-08-17 11:29:58 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _PUSH_FRAME
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Write it out explicitly because it's subtly different.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Eventually this should be the only occurrence of this code.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(tstate->interp->eval_frame == NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyInterpreterFrame *temp = new_frame;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -2 - oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(new_frame->previous == frame || new_frame->previous->previous == frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                CALL_STAT_INC(inlined_py_calls);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                frame = tstate->current_frame = temp;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                tstate->py_recursion_remaining--;
							 | 
						
					
						
							
								
									
										
										
										
											2023-08-31 11:34:52 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                LOAD_SP();
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                LOAD_IP(0);
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-25 11:32:47 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                LLTRACE_RESUME_FRAME();
							 | 
						
					
						
							
								
									
										
										
										
											2023-08-17 11:29:58 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-08-31 11:34:52 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2023-04-12 12:04:55 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_PY_GENERAL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_PY_GENERAL;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_PY_GENERAL);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_CALL == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *callable;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *self_or_null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyInterpreterFrame *new_frame;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PEP_523
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (tstate->interp->eval_frame) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_FUNCTION_VERSION
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                callable = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint32_t func_version = read_u32(&this_instr[2].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyFunction_Check(callable_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyFunctionObject *func = (PyFunctionObject *)callable_o;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (func->func_version != func_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _PY_FRAME_GENERAL
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                self_or_null = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                // oparg counts all of the args, but *not* self:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int total_args = oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyStackRef_IsNull(self_or_null[0])) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    args--;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    total_args++;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(Py_TYPE(callable_o) == &PyFunction_Type);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int code_flags = ((PyCodeObject*)PyFunction_GET_CODE(callable_o))->co_flags;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *locals = code_flags & CO_OPTIMIZED ? NULL : Py_NewRef(PyFunction_GET_GLOBALS(callable_o));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyInterpreterFrame *temp = _PyEvalFramePushAndInit(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    tstate, callable[0], locals,
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    args, total_args, NULL, frame
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                );
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // The frame has stolen all the arguments from the stack.
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -2 - oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (temp == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                new_frame = temp;
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _SAVE_RETURN_OFFSET
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #if TIER_ONE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                frame->return_offset = (uint16_t)(next_instr - this_instr);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #if TIER_TWO
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                frame->return_offset = oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _PUSH_FRAME
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Write it out explicitly because it's subtly different.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Eventually this should be the only occurrence of this code.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(tstate->interp->eval_frame == NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyInterpreterFrame *temp = new_frame;
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(new_frame->previous == frame || new_frame->previous->previous == frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                CALL_STAT_INC(inlined_py_calls);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                frame = tstate->current_frame = temp;
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-04 12:11:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                tstate->py_recursion_remaining--;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LOAD_SP();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LOAD_IP(0);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LLTRACE_RESUME_FRAME();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_STR_1) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_STR_1;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_STR_1);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_CALL == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef callable;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef null;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef arg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CALL_STR_1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                arg = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                null = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callable = stack_pointer[-3];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *arg_o = PyStackRef_AsPyObjectBorrow(arg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(oparg == 1);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyStackRef_IsNull(null)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (callable_o != (PyObject *)&PyUnicode_Type) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(CALL, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-21 11:08:13 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = PyObject_Str(arg_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -3;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(arg);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-21 11:08:13 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PERIODIC
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY();
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                QSBR_QUIESCENT_STATE(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer[0] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    int err = _Py_HandlePending(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (err != 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_TUPLE_1) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_TUPLE_1;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_TUPLE_1);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_CALL == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef callable;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef null;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef arg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CALL_TUPLE_1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                arg = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                null = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callable = stack_pointer[-3];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *arg_o = PyStackRef_AsPyObjectBorrow(arg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(oparg == 1);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyStackRef_IsNull(null)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (callable_o != (PyObject *)&PyTuple_Type) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(CALL, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-21 11:08:13 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = PySequence_Tuple(arg_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -3;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(arg);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-21 11:08:13 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PERIODIC
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY();
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                QSBR_QUIESCENT_STATE(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer[0] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    int err = _Py_HandlePending(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (err != 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-14 16:31:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CALL_TYPE_1) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CALL_TYPE_1;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CALL_TYPE_1);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_CALL == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef callable;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef null;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef arg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-11 09:30:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            arg = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            null = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            callable = stack_pointer[-3];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *arg_o = PyStackRef_AsPyObjectBorrow(arg);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(oparg == 1);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!PyStackRef_IsNull(null)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (callable_o != (PyObject *)&PyType_Type) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (CALL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(CALL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STAT_INC(CALL, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            res = PyStackRef_FromPyObjectSteal(Py_NewRef(Py_TYPE(arg_o)));
							 | 
						
					
						
							
								
									
										
										
										
											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());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(arg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CHECK_EG_MATCH) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CHECK_EG_MATCH;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CHECK_EG_MATCH);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef exc_value_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef match_type_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef rest;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef match;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            match_type_st = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            exc_value_st = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *exc_value = PyStackRef_AsPyObjectBorrow(exc_value_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *match_type = PyStackRef_AsPyObjectBorrow(match_type_st);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int err = _PyEval_CheckExceptStarTypeValid(tstate, match_type);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (err < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(exc_value_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(match_type_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_2_error);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *match_o = NULL;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *rest_o = NULL;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-25 13:00:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int res = _PyEval_ExceptionGroupMatch(frame, exc_value, match_type,
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                &match_o, &rest_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(exc_value_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(match_type_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (res < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_2_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert((match_o == NULL) == (rest_o == NULL));
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (match_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_2_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!Py_IsNone(match_o)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyErr_SetHandledException(match_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            rest = PyStackRef_FromPyObjectSteal(rest_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            match = PyStackRef_FromPyObjectSteal(match_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2] = rest;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = match;
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CHECK_EXC_MATCH) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CHECK_EXC_MATCH;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CHECK_EXC_MATCH);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef left;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef right;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef b;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            right = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            left = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(PyExceptionInstance_Check(left_o));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 14:14:52 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int err = _PyEval_CheckExceptTypeValid(tstate, right_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 14:14:52 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (err < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(right);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_1_error);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int res = PyErr_GivenExceptionMatches(left_o, right_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(right);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            b = res ? PyStackRef_True : PyStackRef_False;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = b;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CLEANUP_THROW) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CLEANUP_THROW;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CLEANUP_THROW);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef sub_iter_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef last_sent_val_st;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef exc_value_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef none;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            exc_value_st = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            last_sent_val_st = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            sub_iter_st = stack_pointer[-3];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *exc_value = PyStackRef_AsPyObjectBorrow(exc_value_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #ifndef Py_TAIL_CALL_INTERP
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(throwflag);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(exc_value && PyExceptionInstance_Check(exc_value));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int matches = PyErr_GivenExceptionMatches(exc_value, PyExc_StopIteration);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (matches) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                none = PyStackRef_None;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                value = PyStackRef_FromPyObjectNew(((PyStopIterationObject *)exc_value)->value);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(sub_iter_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(last_sent_val_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(exc_value_st);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            else {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyErr_SetRaisedException(tstate, Py_NewRef(exc_value));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                monitor_reraise(tstate, frame, this_instr);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 12:18:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(exception_unwind);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-3] = none;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2] = value;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(COMPARE_OP) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = COMPARE_OP;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(COMPARE_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-22 09:22:25 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PREDICTED_COMPARE_OP:;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-09 14:54:39 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr - 2;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef left;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef right;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _SPECIALIZE_COMPARE_OP
							 | 
						
					
						
							
								
									
										
										
										
											2023-04-12 12:04:55 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                right = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                left = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint16_t counter = read_u16(&this_instr[1].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                (void)counter;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-07 06:41:01 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #if ENABLE_SPECIALIZATION_FT
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (ADAPTIVE_COUNTER_TRIGGERS(counter)) {
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    next_instr = this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _Py_Specialize_CompareOp(left, right, next_instr, oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH_SAME_OPARG();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-22 14:17:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                OPCODE_DEFERRED_INC(COMPARE_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                ADVANCE_ADAPTIVE_COUNTER(this_instr[1].counter);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-29 01:07:56 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #endif  /* ENABLE_SPECIALIZATION_FT */
							 | 
						
					
						
							
								
									
										
										
										
											2023-02-13 11:24:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _COMPARE_OP
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert((oparg >> 5) <= Py_GE);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = PyObject_RichCompare(left_o, right_o, oparg >> 5);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(right);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(pop_2_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (oparg & 16) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    int res_bool = PyObject_IsTrue(res_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    Py_DECREF(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (res_bool < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    res = res_bool ? PyStackRef_True : PyStackRef_False;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(COMPARE_OP_FLOAT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = COMPARE_OP_FLOAT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(COMPARE_OP_FLOAT);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_COMPARE_OP == 1, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef left;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef right;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-20 19:30:49 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_BOTH_FLOAT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                right = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                left = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyFloat_CheckExact(left_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(COMPARE_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (COMPARE_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(COMPARE_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (!PyFloat_CheckExact(right_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(COMPARE_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (COMPARE_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(COMPARE_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-20 19:30:49 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _COMPARE_OP_FLOAT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-20 19:30:49 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(COMPARE_OP, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                double dleft = PyFloat_AS_DOUBLE(left_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                double dright = PyFloat_AS_DOUBLE(right_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-20 19:30:49 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                // 1 if NaN, 2 if <, 4 if >, 8 if ==; this matches low four bits of the oparg
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int sign_ish = COMPARISON_BIT(dleft, dright);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-14 16:17:51 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE_SPECIALIZED(left, _PyFloat_ExactDealloc);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE_SPECIALIZED(right, _PyFloat_ExactDealloc);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = (sign_ish & oparg) ? PyStackRef_True : PyStackRef_False;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-20 19:30:49 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                // It's always a bool, so we don't care about oparg & 16.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2023-04-12 12:04:55 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(COMPARE_OP_INT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = COMPARE_OP_INT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-26 14:43:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(COMPARE_OP_INT);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_COMPARE_OP == 1, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef left;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef right;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-20 19:30:49 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_BOTH_INT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                right = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                left = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyLong_CheckExact(left_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(COMPARE_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (COMPARE_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(COMPARE_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (!PyLong_CheckExact(right_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(COMPARE_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (COMPARE_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(COMPARE_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-20 19:30:49 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _COMPARE_OP_INT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!_PyLong_IsCompact((PyLongObject *)left_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(COMPARE_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (COMPARE_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(COMPARE_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (!_PyLong_IsCompact((PyLongObject *)right_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(COMPARE_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (COMPARE_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(COMPARE_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-20 19:30:49 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(COMPARE_OP, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(_PyLong_DigitCount((PyLongObject *)left_o) <= 1 &&
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                   _PyLong_DigitCount((PyLongObject *)right_o) <= 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                Py_ssize_t ileft = _PyLong_CompactValue((PyLongObject *)left_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                Py_ssize_t iright = _PyLong_CompactValue((PyLongObject *)right_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-20 19:30:49 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                // 2 if <, 4 if >, 8 if ==; this matches the low 4 bits of the oparg
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int sign_ish = COMPARISON_BIT(ileft, iright);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-13 11:06:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE_SPECIALIZED(left, _PyLong_ExactDealloc);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE_SPECIALIZED(right, _PyLong_ExactDealloc);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res =  (sign_ish & oparg) ? PyStackRef_True : PyStackRef_False;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-20 19:30:49 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                // It's always a bool, so we don't care about oparg & 16.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2023-02-13 11:24:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(COMPARE_OP_STR) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = COMPARE_OP_STR;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-26 14:43:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(COMPARE_OP_STR);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_COMPARE_OP == 1, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef left;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef right;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-20 19:30:49 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_BOTH_UNICODE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                right = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                left = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyUnicode_CheckExact(left_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(COMPARE_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (COMPARE_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(COMPARE_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (!PyUnicode_CheckExact(right_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(COMPARE_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (COMPARE_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(COMPARE_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-20 19:30:49 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _COMPARE_OP_STR
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-20 19:30:49 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(COMPARE_OP, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int eq = _PyUnicode_Equal(left_o, right_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-20 19:30:49 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert((oparg >> 5) == Py_EQ || (oparg >> 5) == Py_NE);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-14 16:17:51 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE_SPECIALIZED(left, _PyUnicode_ExactDealloc);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE_SPECIALIZED(right, _PyUnicode_ExactDealloc);
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-20 19:30:49 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(eq == 0 || eq == 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert((oparg & 0xf) == COMPARISON_NOT_EQUALS || (oparg & 0xf) == COMPARISON_EQUALS);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(COMPARISON_NOT_EQUALS + 1 == COMPARISON_EQUALS);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = ((COMPARISON_NOT_EQUALS + eq) & oparg) ? PyStackRef_True : PyStackRef_False;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-20 19:30:49 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                // It's always a bool, so we don't care about oparg & 16.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CONTAINS_OP) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CONTAINS_OP;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-07 03:30:11 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CONTAINS_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-22 09:22:25 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PREDICTED_CONTAINS_OP:;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-09 14:54:39 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr - 2;
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-07 03:30:11 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef left;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef right;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef b;
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-07 03:30:11 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _SPECIALIZE_CONTAINS_OP
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                right = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-07 03:30:11 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint16_t counter = read_u16(&this_instr[1].cache);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                (void)counter;
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-06 12:35:10 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #if ENABLE_SPECIALIZATION_FT
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (ADAPTIVE_COUNTER_TRIGGERS(counter)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-07 03:30:11 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    next_instr = this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-07 03:30:11 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _Py_Specialize_ContainsOp(right, next_instr);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-07 03:30:11 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH_SAME_OPARG();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-22 14:17:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                OPCODE_DEFERRED_INC(CONTAINS_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                ADVANCE_ADAPTIVE_COUNTER(this_instr[1].counter);
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-22 19:00:35 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #endif  /* ENABLE_SPECIALIZATION_FT */
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-07 03:30:11 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CONTAINS_OP
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                left = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int res = PySequence_Contains(right_o, left_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(right);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (res < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(pop_2_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                b = (res ^ oparg) ? PyStackRef_True : PyStackRef_False;
							 | 
						
					
						
							
								
									
										
										
										
											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
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(CONTAINS_OP_DICT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CONTAINS_OP_DICT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-07 03:30:11 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CONTAINS_OP_DICT);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_CONTAINS_OP == 1, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef left;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef right;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef b;
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-07 03:30:11 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            right = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            left = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!PyDict_CheckExact(right_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(CONTAINS_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (CONTAINS_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(CONTAINS_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-08 00:21:21 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STAT_INC(CONTAINS_OP, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int res = PyDict_Contains(right_o, left_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(right);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (res < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_2_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            b = (res ^ oparg) ? PyStackRef_True : PyStackRef_False;
							 | 
						
					
						
							
								
									
										
										
										
											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
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(CONTAINS_OP_SET) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CONTAINS_OP_SET;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-07 03:30:11 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CONTAINS_OP_SET);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_CONTAINS_OP == 1, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef left;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef right;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef b;
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-07 03:30:11 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            right = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            left = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *left_o = PyStackRef_AsPyObjectBorrow(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *right_o = PyStackRef_AsPyObjectBorrow(right);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!(PySet_CheckExact(right_o) || PyFrozenSet_CheckExact(right_o))) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(CONTAINS_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (CONTAINS_OP));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(CONTAINS_OP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-08 00:21:21 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STAT_INC(CONTAINS_OP, hit);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // Note: both set and frozenset use the same seq_contains method!
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int res = _PySet_Contains((PySetObject *)right_o, left_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(right);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (res < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_2_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            b = (res ^ oparg) ? PyStackRef_True : PyStackRef_False;
							 | 
						
					
						
							
								
									
										
										
										
											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
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(CONVERT_VALUE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = CONVERT_VALUE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(CONVERT_VALUE);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef result;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 08:11:28 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            conversion_func conv_fn;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(oparg >= FVC_STR && oparg <= FVC_ASCII);
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 08:11:28 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            conv_fn = _PyEval_ConversionFuncs[oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *result_o = conv_fn(PyStackRef_AsPyObjectBorrow(value));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(value);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (result_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            result = PyStackRef_FromPyObjectSteal(result_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = result;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(COPY) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = COPY;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(COPY);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef bottom;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef top;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            bottom = stack_pointer[-1 - (oparg-1)];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(oparg > 0);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            top = PyStackRef_DUP(bottom);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = top;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(COPY_FREE_VARS) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = COPY_FREE_VARS;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(COPY_FREE_VARS);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Copy closure variables to free variables */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyCodeObject *co = _PyFrame_GetCode(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-24 13:08:18 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(PyStackRef_FunctionCheck(frame->f_funcobj));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyFunctionObject *func = (PyFunctionObject *)PyStackRef_AsPyObjectBorrow(frame->f_funcobj);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *closure = func->func_closure;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(oparg == co->co_nfreevars);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            int offset = co->co_nlocalsplus - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            for (int i = 0; i < oparg; ++i) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *o = PyTuple_GET_ITEM(closure, i);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                frame->localsplus[offset + i] = PyStackRef_FromPyObjectNew(o);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-10 10:50:57 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(DELETE_ATTR) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = DELETE_ATTR;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(DELETE_ATTR);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef owner;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            owner = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *name = GETITEM(FRAME_CO_NAMES, oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int err = PyObject_DelAttr(PyStackRef_AsPyObjectBorrow(owner), name);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(owner);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (err) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_1_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(DELETE_DEREF) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = DELETE_DEREF;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(DELETE_DEREF);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *cell = PyStackRef_AsPyObjectBorrow(GETLOCAL(oparg));
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // Can't use ERROR_IF here.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // Fortunately we don't need its superpower.
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-29 13:35:43 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *oldobj = PyCell_SwapTakeRef((PyCellObject *)cell, NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (oldobj == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyEval_FormatExcUnbound(tstate, _PyFrame_GetCode(frame), oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            Py_DECREF(oldobj);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(DELETE_FAST) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = DELETE_FAST;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(DELETE_FAST);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef v = GETLOCAL(oparg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (PyStackRef_IsNull(v)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-26 09:35:11 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyEval_FormatExcCheckArg(tstate, PyExc_UnboundLocalError,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UNBOUNDLOCAL_ERROR_MSG,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyTuple_GetItem(_PyFrame_GetCode(frame)->co_localsplusnames, oparg)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                );
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-26 09:35:11 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 14:00:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef tmp = GETLOCAL(oparg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            GETLOCAL(oparg) = PyStackRef_NULL;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_XCLOSE(tmp);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(DELETE_GLOBAL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = DELETE_GLOBAL;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(DELETE_GLOBAL);
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-13 21:42:03 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *name = GETITEM(FRAME_CO_NAMES, oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-07 11:21:08 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int err = PyDict_Pop(GLOBALS(), name, NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // Can't use ERROR_IF here.
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-07 11:21:08 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (err < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-07 11:21:08 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (err == 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-07 11:21:08 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyEval_FormatExcCheckArg(tstate, PyExc_NameError,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    NAME_ERROR_MSG, name);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(DELETE_NAME) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = DELETE_NAME;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(DELETE_NAME);
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-13 21:42:03 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *name = GETITEM(FRAME_CO_NAMES, oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *ns = LOCALS();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            int err;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (ns == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyErr_Format(tstate, PyExc_SystemError,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                              "no locals when deleting %R", name);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            err = PyObject_DelItem(ns, name);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-10 10:50:57 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // Can't use ERROR_IF here.
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (err != 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-20 13:37:19 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyEval_FormatExcCheckArg(tstate, PyExc_NameError,
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    NAME_ERROR_MSG,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    name);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(DELETE_SUBSCR) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = DELETE_SUBSCR;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(DELETE_SUBSCR);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef container;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef sub;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            sub = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            container = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* del container[sub] */
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int err = PyObject_DelItem(PyStackRef_AsPyObjectBorrow(container),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                                       PyStackRef_AsPyObjectBorrow(sub));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(container);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(sub);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (err) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_2_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -2;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(DICT_MERGE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = DICT_MERGE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(DICT_MERGE);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef callable;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef dict;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef update;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            update = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            dict = stack_pointer[-2 - (oparg - 1)];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            callable = stack_pointer[-5 - (oparg - 1)];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *dict_o = PyStackRef_AsPyObjectBorrow(dict);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *update_o = PyStackRef_AsPyObjectBorrow(update);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int err = _PyDict_MergeEx(dict_o, update_o, 2);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (err < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyEval_FormatKwargsError(tstate, callable_o, update_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(update);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_1_error);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(update);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(DICT_UPDATE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = DICT_UPDATE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(DICT_UPDATE);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef dict;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef update;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            update = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            dict = stack_pointer[-2 - (oparg - 1)];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *dict_o = PyStackRef_AsPyObjectBorrow(dict);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *update_o = PyStackRef_AsPyObjectBorrow(update);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int err = PyDict_Update(dict_o, update_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (err < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int matches = _PyErr_ExceptionMatches(tstate, PyExc_AttributeError);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (matches) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyErr_Format(tstate, PyExc_TypeError,
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                                  "'%.200s' object is not a mapping",
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                                  Py_TYPE(update_o)->tp_name);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(update);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_1_error);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(update);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(END_ASYNC_FOR) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = END_ASYNC_FOR;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(END_ASYNC_FOR);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef awaitable_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef exc_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            exc_st = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            awaitable_st = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *exc = PyStackRef_AsPyObjectBorrow(exc_st);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(exc && PyExceptionInstance_Check(exc));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            int matches = PyErr_GivenExceptionMatches(exc, PyExc_StopAsyncIteration);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (matches) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(awaitable_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(exc_st);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                Py_INCREF(exc);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyErr_SetRaisedException(tstate, exc);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                monitor_reraise(tstate, frame, this_instr);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 12:18:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(exception_unwind);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -2;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(END_FOR) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = END_FOR;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(END_FOR);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-06 17:54:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Don't update instr_ptr, so that POP_ITER sees
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								             * the FOR_ITER as the previous instruction.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								             * This has the benign side effect that if value is
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								             * finalized it will see the location as the FOR_ITER's.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								             */
							 | 
						
					
						
							
								
									
										
										
										
											2024-01-24 15:10:17 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(value);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(END_SEND) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = END_SEND;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(END_SEND);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef receiver;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef val;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            receiver = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)receiver;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            val = value;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(receiver);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2] = val;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(ENTER_EXECUTOR) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = ENTER_EXECUTOR;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-19 14:47:42 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(ENTER_EXECUTOR);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            opcode = ENTER_EXECUTOR;
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-30 18:26:34 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #ifdef _Py_TIER2
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyCodeObject *code = _PyFrame_GetCode(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-20 09:39:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyExecutorObject *executor = code->co_executors->executors[oparg & 255];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(executor->vm_data.index == INSTR_OFFSET() - 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(executor->vm_data.code == code);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(executor->vm_data.valid);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(tstate->previous_executor == NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-02 13:10:31 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* If the eval breaker is set then stay in tier 1.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								             * This avoids any potentially infinite loops
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								             * involving _RESUME_CHECK */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                opcode = executor->vm_data.opcode;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                oparg = (oparg & ~255) | executor->vm_data.oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                next_instr = this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-06 22:21:06 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (_PyOpcode_Caches[_PyOpcode_Deopt[opcode]]) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PAUSE_ADAPTIVE_COUNTER(this_instr[1].counter);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-02 13:10:31 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                DISPATCH_GOTO();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-20 09:39:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            tstate->previous_executor = Py_None;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            Py_INCREF(executor);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            GOTO_TIER_TWO(executor);
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-30 18:26:34 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #else
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            Py_FatalError("ENTER_EXECUTOR is not supported in this build");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            #endif /* _Py_TIER2 */
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-12 19:02:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(EXIT_INIT_CHECK) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = EXIT_INIT_CHECK;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(EXIT_INIT_CHECK);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef should_be_none;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            should_be_none = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(STACK_LEVEL() == 2);
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-22 17:55:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!PyStackRef_IsNone(should_be_none)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyErr_Format(PyExc_TypeError,
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                             "__init__() should return None, not '%.200s'",
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                             Py_TYPE(PyStackRef_AsPyObjectBorrow(should_be_none))->tp_name);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(EXTENDED_ARG) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = EXTENDED_ARG;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(EXTENDED_ARG);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            opcode = EXTENDED_ARG;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(oparg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            opcode = next_instr->op.code;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            oparg = oparg << 8 | next_instr->op.arg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PRE_DISPATCH_GOTO();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH_GOTO();
							 | 
						
					
						
							
								
									
										
										
										
											2023-05-15 20:36:23 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(FORMAT_SIMPLE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = FORMAT_SIMPLE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(FORMAT_SIMPLE);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *value_o = PyStackRef_AsPyObjectBorrow(value);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* If value is a unicode object, then we know the result
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								             * of format(value) is value itself. */
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!PyUnicode_CheckExact(value_o)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 18:13:04 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = PyObject_Format(value_o, NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(value);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 18:13:04 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                res = value;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-05-15 20:36:23 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(FORMAT_WITH_SPEC) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = FORMAT_WITH_SPEC;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(FORMAT_WITH_SPEC);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef fmt_spec;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            fmt_spec = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            value = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *res_o = PyObject_Format(PyStackRef_AsPyObjectBorrow(value), PyStackRef_AsPyObjectBorrow(fmt_spec));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(value);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(fmt_spec);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_2_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(FOR_ITER) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = FOR_ITER;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(FOR_ITER);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-22 09:22:25 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PREDICTED_FOR_ITER:;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-09 14:54:39 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr - 2;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef iter;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef next;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _SPECIALIZE_FOR_ITER
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                iter = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint16_t counter = read_u16(&this_instr[1].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                (void)counter;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #if ENABLE_SPECIALIZATION
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (ADAPTIVE_COUNTER_TRIGGERS(counter)) {
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    next_instr = this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _Py_Specialize_ForIter(iter, next_instr, oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH_SAME_OPARG();
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-22 14:17:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                OPCODE_DEFERRED_INC(FOR_ITER);
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                ADVANCE_ADAPTIVE_COUNTER(this_instr[1].counter);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #endif  /* ENABLE_SPECIALIZATION */
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _FOR_ITER
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                /* before: [iter]; after: [iter, iter()] *or* [] (and jump over END_FOR.) */
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *next_o = (*Py_TYPE(iter_o)->tp_iternext)(iter_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (next_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (_PyErr_Occurred(tstate)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        int matches = _PyErr_ExceptionMatches(tstate, PyExc_StopIteration);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        if (!matches) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-29 12:17:47 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _PyEval_MonitorRaise(tstate, frame, this_instr);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _PyErr_Clear(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    /* iterator ended normally */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(next_instr[oparg].op.code == END_FOR ||
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                       next_instr[oparg].op.code == INSTRUMENTED_END_FOR);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-06 17:54:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    /* Jump forward oparg, then skip following END_FOR */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMPBY(oparg + 1);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                next = PyStackRef_FromPyObjectSteal(next_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                // Common case: no jump, leave it to the code generator
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = next;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(FOR_ITER_GEN) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = FOR_ITER_GEN;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-26 18:08:50 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(FOR_ITER_GEN);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_FOR_ITER == 1, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef iter;
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-26 18:08:50 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyInterpreterFrame *gen_frame;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyInterpreterFrame *new_frame;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-26 18:08:50 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PEP_523
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (tstate->interp->eval_frame) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(FOR_ITER);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (FOR_ITER));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(FOR_ITER);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-26 18:08:50 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _FOR_ITER_GEN_FRAME
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                iter = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyGenObject *gen = (PyGenObject *)PyStackRef_AsPyObjectBorrow(iter);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (Py_TYPE(gen) != &PyGen_Type) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(FOR_ITER);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (FOR_ITER));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(FOR_ITER);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (gen->gi_frame_state >= FRAME_EXECUTING) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(FOR_ITER);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (FOR_ITER));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(FOR_ITER);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-26 18:08:50 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(FOR_ITER, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-24 10:23:38 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                gen_frame = &gen->gi_iframe;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_StackPush(gen_frame, PyStackRef_None);
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-26 18:08:50 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                gen->gi_frame_state = FRAME_EXECUTING;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                gen->gi_exc_state.previous_item = tstate->exc_info;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                tstate->exc_info = &gen->gi_exc_state;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                gen_frame->previous = frame;
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-26 18:08:50 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                // oparg is the return offset from the next instruction.
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-29 18:25:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                frame->return_offset = (uint16_t)( 2 + oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-26 18:08:50 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _PUSH_FRAME
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                new_frame = gen_frame;
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-26 18:08:50 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                // Write it out explicitly because it's subtly different.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Eventually this should be the only occurrence of this code.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(tstate->interp->eval_frame == NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyInterpreterFrame *temp = new_frame;
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-26 18:08:50 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(new_frame->previous == frame || new_frame->previous->previous == frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-26 18:08:50 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                CALL_STAT_INC(inlined_py_calls);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                frame = tstate->current_frame = temp;
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-26 18:08:50 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                tstate->py_recursion_remaining--;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LOAD_SP();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LOAD_IP(0);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LLTRACE_RESUME_FRAME();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(FOR_ITER_LIST) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = FOR_ITER_LIST;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(FOR_ITER_LIST);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_FOR_ITER == 1, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef iter;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef next;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _ITER_CHECK_LIST
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-12 14:34:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                iter = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (Py_TYPE(PyStackRef_AsPyObjectBorrow(iter)) != &PyListIter_Type) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(FOR_ITER);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (FOR_ITER));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(FOR_ITER);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-12 14:34:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _ITER_JUMP_LIST
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-12 14:34:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyListIterObject *it = (_PyListIterObject *)iter_o;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(Py_TYPE(iter_o) == &PyListIter_Type);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(FOR_ITER, hit);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyListObject *seq = it->it_seq;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-20 15:18:44 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (seq == NULL || (size_t)it->it_index >= (size_t)PyList_GET_SIZE(seq)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-15 02:00:50 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    it->it_index = -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    #ifndef Py_GIL_DISABLED
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (seq != NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        it->it_seq = NULL;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        Py_DECREF(seq);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-15 02:00:50 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-06 17:54:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    /* Jump forward oparg, then skip following END_FOR instruction */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMPBY(oparg + 1);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _ITER_NEXT_LIST
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyListIterObject *it = (_PyListIterObject *)iter_o;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(Py_TYPE(iter_o) == &PyListIter_Type);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyListObject *seq = it->it_seq;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(seq);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(it->it_index < PyList_GET_SIZE(seq));
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                next = PyStackRef_FromPyObjectNew(PyList_GET_ITEM(seq, it->it_index++));
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-12 14:34:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = next;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(FOR_ITER_RANGE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = FOR_ITER_RANGE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(FOR_ITER_RANGE);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_FOR_ITER == 1, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef iter;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef next;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _ITER_CHECK_RANGE
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-12 14:34:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                iter = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (Py_TYPE(r) != &PyRangeIter_Type) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(FOR_ITER);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (FOR_ITER));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(FOR_ITER);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-12 14:34:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _ITER_JUMP_RANGE
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-12 14:34:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(Py_TYPE(r) == &PyRangeIter_Type);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(FOR_ITER, hit);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (r->len <= 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-06 17:54:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    // Jump over END_FOR instruction.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMPBY(oparg + 1);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-12 14:34:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _ITER_NEXT_RANGE
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-12 14:34:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(Py_TYPE(r) == &PyRangeIter_Type);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(r->len > 0);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                long value = r->start;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                r->start = value + r->step;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                r->len--;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *res = PyLong_FromLong(value);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (res == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                next = PyStackRef_FromPyObjectSteal(res);
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-12 14:34:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = next;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(FOR_ITER_TUPLE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = FOR_ITER_TUPLE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(FOR_ITER_TUPLE);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_FOR_ITER == 1, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef iter;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef next;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _ITER_CHECK_TUPLE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                iter = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (Py_TYPE(PyStackRef_AsPyObjectBorrow(iter)) != &PyTupleIter_Type) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(FOR_ITER);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (FOR_ITER));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(FOR_ITER);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _ITER_JUMP_TUPLE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyTupleIterObject *it = (_PyTupleIterObject *)iter_o;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(Py_TYPE(iter_o) == &PyTupleIter_Type);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(FOR_ITER, hit);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyTupleObject *seq = it->it_seq;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (seq == NULL || it->it_index >= PyTuple_GET_SIZE(seq)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (seq != NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        it->it_seq = NULL;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        Py_DECREF(seq);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-06 17:54:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    /* Jump forward oparg, then skip following END_FOR instruction */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMPBY(oparg + 1);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _ITER_NEXT_TUPLE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyTupleIterObject *it = (_PyTupleIterObject *)iter_o;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(Py_TYPE(iter_o) == &PyTupleIter_Type);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyTupleObject *seq = it->it_seq;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(seq);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(it->it_index < PyTuple_GET_SIZE(seq));
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                next = PyStackRef_FromPyObjectNew(PyTuple_GET_ITEM(seq, it->it_index++));
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = next;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-10 10:50:57 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(GET_AITER) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = GET_AITER;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(GET_AITER);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef obj;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef iter;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            obj = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            unaryfunc getter = NULL;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *obj_o = PyStackRef_AsPyObjectBorrow(obj);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *iter_o;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyTypeObject *type = Py_TYPE(obj_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (type->tp_as_async != NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                getter = type->tp_as_async->am_aiter;
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (getter == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyErr_Format(tstate, PyExc_TypeError,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                              "'async for' requires an object with "
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                              "__aiter__ method, got %.100s",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                              type->tp_name);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(obj);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_1_error);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            iter_o = (*getter)(obj_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(obj);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (iter_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_1_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (Py_TYPE(iter_o)->tp_as_async == NULL ||
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                Py_TYPE(iter_o)->tp_as_async->am_anext == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyErr_Format(tstate, PyExc_TypeError,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                              "'async for' received an object from __aiter__ "
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                              "that does not implement __anext__: %.100s",
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                              Py_TYPE(iter_o)->tp_name);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                Py_DECREF(iter_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            iter = PyStackRef_FromPyObjectSteal(iter_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = iter;
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(GET_ANEXT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = GET_ANEXT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(GET_ANEXT);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef aiter;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef awaitable;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            aiter = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-02 16:31:17 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *awaitable_o = _PyEval_GetANext(PyStackRef_AsPyObjectBorrow(aiter));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-02 16:31:17 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (awaitable_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            awaitable = PyStackRef_FromPyObjectSteal(awaitable_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = awaitable;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(GET_AWAITABLE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = GET_AWAITABLE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(GET_AWAITABLE);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef iterable;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef iter;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            iterable = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-02 16:31:17 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *iter_o = _PyEval_GetAwaitable(PyStackRef_AsPyObjectBorrow(iterable), oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(iterable);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (iter_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_1_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            iter = PyStackRef_FromPyObjectSteal(iter_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = iter;
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(GET_ITER) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = GET_ITER;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(GET_ITER);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef iterable;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef iter;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            iterable = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* before: [obj]; after [getiter(obj)] */
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 18:13:04 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *iter_o = PyObject_GetIter(PyStackRef_AsPyObjectBorrow(iterable));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(iterable);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (iter_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_1_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 18:13:04 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            iter = PyStackRef_FromPyObjectSteal(iter_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = iter;
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(GET_LEN) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = GET_LEN;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(GET_LEN);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef obj;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef len;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            obj = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // PUSH(len(TOS))
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            Py_ssize_t len_i = PyObject_Length(PyStackRef_AsPyObjectBorrow(obj));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (len_i < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *len_o = PyLong_FromSsize_t(len_i);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (len_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            len = PyStackRef_FromPyObjectSteal(len_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = len;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(GET_YIELD_FROM_ITER) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = GET_YIELD_FROM_ITER;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(GET_YIELD_FROM_ITER);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef iterable;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef iter;
							 | 
						
					
						
							
								
									
										
										
										
											2023-08-04 09:35:56 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            iterable = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* before: [obj]; after [getiter(obj)] */
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *iterable_o = PyStackRef_AsPyObjectBorrow(iterable);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (PyCoro_CheckExact(iterable_o)) {
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                /* `iterable` is a coroutine */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (!(_PyFrame_GetCode(frame)->co_flags & (CO_COROUTINE | CO_ITERABLE_COROUTINE))) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    /* and it is used in a 'yield from' expression of a
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                       regular generator. */
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyErr_SetString(tstate, PyExc_TypeError,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                                     "cannot 'yield from' a coroutine object "
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                                     "in a non-coroutine generator");
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                iter = iterable;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            else {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (PyGen_CheckExact(iterable_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    iter = iterable;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    /* `iterable` is not a generator. */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-05 04:56:36 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyObject *iter_o = PyObject_GetIter(iterable_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-05 04:56:36 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (iter_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-05 04:56:36 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    iter = PyStackRef_FromPyObjectSteal(iter_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(iterable);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = iter;
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(IMPORT_FROM) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = IMPORT_FROM;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(IMPORT_FROM);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef from;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            from = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *name = GETITEM(FRAME_CO_NAMES, oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 14:24:58 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *res_o = _PyEval_ImportFrom(tstate, PyStackRef_AsPyObjectBorrow(from), name);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(IMPORT_NAME) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = IMPORT_NAME;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(IMPORT_NAME);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef level;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef fromlist;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            fromlist = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            level = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *name = GETITEM(FRAME_CO_NAMES, oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 14:24:58 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *res_o = _PyEval_ImportName(tstate, frame, name,
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_AsPyObjectBorrow(fromlist),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_AsPyObjectBorrow(level));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(level);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(fromlist);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_2_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(INSTRUMENTED_CALL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = INSTRUMENTED_CALL;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(INSTRUMENTED_CALL);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            opcode = INSTRUMENTED_CALL;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *callable;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *self_or_null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *func;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *maybe_self;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 3 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _MAYBE_EXPAND_METHOD
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                self_or_null = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callable = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                func = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                maybe_self = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 09:52:49 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                (void)args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (PyStackRef_TYPE(callable[0]) == &PyMethod_Type && PyStackRef_IsNull(self_or_null[0])) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyObject *self = ((PyMethodObject *)callable_o)->im_self;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    maybe_self[0] = PyStackRef_FromPyObjectNew(self);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyObject *method = ((PyMethodObject *)callable_o)->im_func;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyStackRef temp = callable[0];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    func[0] = PyStackRef_FromPyObjectNew(method);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(temp);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _MONITOR_CALL
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                maybe_self = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                func = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int is_meth = !PyStackRef_IsNull(maybe_self[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *function = PyStackRef_AsPyObjectBorrow(func[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *arg0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (is_meth) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    arg0 = PyStackRef_AsPyObjectBorrow(maybe_self[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                else {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (oparg) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        arg0 = PyStackRef_AsPyObjectBorrow(args[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        arg0 = &_PyInstrumentation_MISSING;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int err = _Py_call_instrumentation_2args(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    tstate, PY_MONITORING_EVENT_CALL,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    frame, this_instr, function, arg0
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                );
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (err) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _DO_CALL
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                self_or_null = maybe_self;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callable = func;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                // oparg counts all of the args, but *not* self:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int total_args = oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef *arguments = args;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-12 15:32:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyStackRef_IsNull(self_or_null[0])) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    arguments--;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    total_args++;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Check if the call can be inlined or not
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (Py_TYPE(callable_o) == &PyFunction_Type &&
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    tstate->interp->eval_frame == NULL &&
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    ((PyFunctionObject *)callable_o)->vectorcall == _PyFunction_Vectorcall)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    int code_flags = ((PyCodeObject*)PyFunction_GET_CODE(callable_o))->co_flags;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *locals = code_flags & CO_OPTIMIZED ? NULL : Py_NewRef(PyFunction_GET_GLOBALS(callable_o));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyInterpreterFrame *new_frame = _PyEvalFramePushAndInit(
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        tstate, callable[0], locals,
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        arguments, total_args, NULL, frame
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    );
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    // Manipulate stack directly since we leave using DISPATCH_INLINED().
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    // The frame has stolen all the arguments from the stack,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    // so there is no need to clean them up.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (new_frame == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-29 18:25:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    frame->return_offset = 4 ;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH_INLINED(new_frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                /* Callable is not a normal Python function */
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STACKREFS_TO_PYOBJECTS(arguments, total_args, args_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (CONVERSION_FAILED(args_o)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_XCLOSE(self_or_null[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        PyStackRef_CLOSE(args[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = PyObject_Vectorcall(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    callable_o, args_o,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    total_args | PY_VECTORCALL_ARGUMENTS_OFFSET,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STACKREFS_TO_PYOBJECTS_CLEANUP(args_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (opcode == INSTRUMENTED_CALL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *arg = total_args == 0 ?
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    &_PyInstrumentation_MISSING : PyStackRef_AsPyObjectBorrow(arguments[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _Py_call_instrumentation_exc2(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            tstate, PY_MONITORING_EVENT_C_RAISE,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            frame, this_instr, callable_o, arg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    else {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        int err = _Py_call_instrumentation_2args(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            tstate, PY_MONITORING_EVENT_C_RETURN,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            frame, this_instr, callable_o, arg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        if (err < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 14:00:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            Py_CLEAR(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 14:00:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert((res_o != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_XCLOSE(self_or_null[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(args[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PERIODIC
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY();
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                QSBR_QUIESCENT_STATE(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer[-2 - oparg] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -1 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    int err = _Py_HandlePending(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (err != 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += 1 + oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 14:35:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2 - oparg] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(INSTRUMENTED_CALL_FUNCTION_EX) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = INSTRUMENTED_CALL_FUNCTION_EX;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(INSTRUMENTED_CALL_FUNCTION_EX);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            opcode = INSTRUMENTED_CALL_FUNCTION_EX;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef func;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef callargs;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef kwargs_in;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef tuple;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef kwargs_out;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef func_st;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef null;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef callargs_st;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef kwargs_st;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef result;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _MAKE_CALLARGS_A_TUPLE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                kwargs_in = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callargs = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                func = stack_pointer[-4];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *callargs_o = PyStackRef_AsPyObjectBorrow(callargs);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (PyTuple_CheckExact(callargs_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    tuple = callargs;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    kwargs_out = kwargs_in;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    int err = _Py_Check_ArgsIterable(tstate, PyStackRef_AsPyObjectBorrow(func), callargs_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (err < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *tuple_o = PySequence_Tuple(callargs_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (tuple_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    kwargs_out = kwargs_in;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(callargs);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    tuple = PyStackRef_FromPyObjectSteal(tuple_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _DO_CALL_FUNCTION_EX
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                kwargs_st = kwargs_out;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callargs_st = tuple;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                null = stack_pointer[-3];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                func_st = func;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                (void)null;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *func = PyStackRef_AsPyObjectBorrow(func_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // DICT_MERGE is called before this opcode if there are kwargs.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // It converts all dict subtypes in kwargs into regular dicts.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                EVAL_CALL_STAT_INC_IF_FUNCTION(EVAL_CALL_FUNCTION_EX, func);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *result_o;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(!_PyErr_Occurred(tstate));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (opcode == INSTRUMENTED_CALL_FUNCTION_EX) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *callargs = PyStackRef_AsPyObjectBorrow(callargs_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *kwargs = PyStackRef_AsPyObjectBorrow(kwargs_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(kwargs == NULL || PyDict_CheckExact(kwargs));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(PyTuple_CheckExact(callargs));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *arg = PyTuple_GET_SIZE(callargs) > 0 ?
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyTuple_GET_ITEM(callargs, 0) : &_PyInstrumentation_MISSING;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer[-2] = callargs_st;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer[-1] = kwargs_st;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    int err = _Py_call_instrumentation_2args(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        tstate, PY_MONITORING_EVENT_CALL,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        frame, this_instr, func, arg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (err) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    result_o = PyObject_Call(func, callargs, kwargs);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (!PyFunction_Check(func) && !PyMethod_Check(func)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        if (result_o == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            _Py_call_instrumentation_exc2(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                                tstate, PY_MONITORING_EVENT_C_RAISE,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                                frame, this_instr, func, arg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            int err = _Py_call_instrumentation_2args(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                                tstate, PY_MONITORING_EVENT_C_RETURN,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                                frame, this_instr, func, arg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            if (err < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 14:00:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                                Py_CLEAR(result_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 14:00:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (Py_TYPE(func) == &PyFunction_Type &&
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        tstate->interp->eval_frame == NULL &&
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        ((PyFunctionObject *)func)->vectorcall == _PyFunction_Vectorcall) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        PyObject *callargs = PyStackRef_AsPyObjectSteal(callargs_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        assert(PyTuple_CheckExact(callargs));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        PyObject *kwargs = PyStackRef_IsNull(kwargs_st) ? NULL : PyStackRef_AsPyObjectSteal(kwargs_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        assert(kwargs == NULL || PyDict_CheckExact(kwargs));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        Py_ssize_t nargs = PyTuple_GET_SIZE(callargs);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        int code_flags = ((PyCodeObject *)PyFunction_GET_CODE(func))->co_flags;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        PyObject *locals = code_flags & CO_OPTIMIZED ? NULL : Py_NewRef(PyFunction_GET_GLOBALS(func));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer += -2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        _PyInterpreterFrame *new_frame = _PyEvalFramePushAndInit_Ex(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            tstate, func_st, locals,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            nargs, callargs, kwargs, frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        // Need to sync the stack since we exit with DISPATCH_INLINED.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer += -2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        if (new_frame == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        assert( 1 == 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        frame->return_offset = 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        DISPATCH_INLINED(new_frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *callargs = PyStackRef_AsPyObjectBorrow(callargs_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(PyTuple_CheckExact(callargs));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *kwargs = PyStackRef_AsPyObjectBorrow(kwargs_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(kwargs == NULL || PyDict_CheckExact(kwargs));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer[-2] = callargs_st;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer[-1] = kwargs_st;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    result_o = PyObject_Call(func, callargs, kwargs);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_XCLOSE(kwargs_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(callargs_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(func_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (result_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                result = PyStackRef_FromPyObjectSteal(result_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PERIODIC
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                QSBR_QUIESCENT_STATE(tstate);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer[0] = result;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    int err = _Py_HandlePending(tstate);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (err != 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = result;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(INSTRUMENTED_CALL_KW) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = INSTRUMENTED_CALL_KW;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-16 17:11:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(INSTRUMENTED_CALL_KW);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            opcode = INSTRUMENTED_CALL_KW;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *callable;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *self_or_null;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *args;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef kwnames;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef kwnames_in;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *func;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *maybe_self;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef kwnames_out;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _MONITOR_CALL_KW
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                self_or_null = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callable = &stack_pointer[-3 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int is_meth = !PyStackRef_IsNull(self_or_null[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *arg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (is_meth) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    arg = PyStackRef_AsPyObjectBorrow(self_or_null[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (args) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        arg = PyStackRef_AsPyObjectBorrow(args[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        arg = &_PyInstrumentation_MISSING;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *function = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int err = _Py_call_instrumentation_2args(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    tstate, PY_MONITORING_EVENT_CALL,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    frame, this_instr, function, arg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (err) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _MAYBE_EXPAND_METHOD_KW
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                kwnames_in = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                func = &stack_pointer[-3 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                maybe_self = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 09:52:49 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                (void)args;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (PyStackRef_TYPE(callable[0]) == &PyMethod_Type && PyStackRef_IsNull(self_or_null[0])) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *self = ((PyMethodObject *)callable_o)->im_self;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    maybe_self[0] = PyStackRef_FromPyObjectNew(self);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *method = ((PyMethodObject *)callable_o)->im_func;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyStackRef temp = callable[0];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    func[0] = PyStackRef_FromPyObjectNew(method);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(temp);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                kwnames_out = kwnames_in;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _DO_CALL_KW
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                kwnames = kwnames_out;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                args = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                self_or_null = &stack_pointer[-2 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                callable = &stack_pointer[-3 - oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *kwnames_o = PyStackRef_AsPyObjectBorrow(kwnames);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // oparg counts all of the args, but *not* self:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int total_args = oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef *arguments = args;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (!PyStackRef_IsNull(self_or_null[0])) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    arguments--;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    total_args++;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int positional_args = total_args - (int)PyTuple_GET_SIZE(kwnames_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Check if the call can be inlined or not
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (Py_TYPE(callable_o) == &PyFunction_Type &&
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    tstate->interp->eval_frame == NULL &&
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    ((PyFunctionObject *)callable_o)->vectorcall == _PyFunction_Vectorcall)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    int code_flags = ((PyCodeObject*)PyFunction_GET_CODE(callable_o))->co_flags;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *locals = code_flags & CO_OPTIMIZED ? NULL : Py_NewRef(PyFunction_GET_GLOBALS(callable_o));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer[-1] = kwnames;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyInterpreterFrame *new_frame = _PyEvalFramePushAndInit(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        tstate, callable[0], locals,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        arguments, positional_args, kwnames_o, frame
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    );
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(kwnames);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    // Sync stack explicitly since we leave using DISPATCH_INLINED().
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    // The frame has stolen all the arguments from the stack,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    // so there is no need to clean them up.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (new_frame == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert( 4 == 1 + INLINE_CACHE_ENTRIES_CALL_KW);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    frame->return_offset = 4 ;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH_INLINED(new_frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                /* Callable is not a normal Python function */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                STACKREFS_TO_PYOBJECTS(arguments, total_args, args_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (CONVERSION_FAILED(args_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_XCLOSE(self_or_null[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        PyStackRef_CLOSE(args[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(kwnames);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -3 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer[-1] = kwnames;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = PyObject_Vectorcall(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    callable_o, args_o,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    positional_args | PY_VECTORCALL_ARGUMENTS_OFFSET,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    kwnames_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                STACKREFS_TO_PYOBJECTS_CLEANUP(args_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (opcode == INSTRUMENTED_CALL_KW) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *arg = total_args == 0 ?
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    &_PyInstrumentation_MISSING : PyStackRef_AsPyObjectBorrow(arguments[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (res_o == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        _Py_call_instrumentation_exc2(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            tstate, PY_MONITORING_EVENT_C_RAISE,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            frame, this_instr, callable_o, arg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        int err = _Py_call_instrumentation_2args(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            tstate, PY_MONITORING_EVENT_C_RETURN,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            frame, this_instr, callable_o, arg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        if (err < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 14:00:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            Py_CLEAR(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 14:00:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(callable[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_XCLOSE(self_or_null[0]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                for (int _i = oparg; --_i >= 0;) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(args[_i]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(kwnames);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -3 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-3 - oparg] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -2 - oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(INSTRUMENTED_END_FOR) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = INSTRUMENTED_END_FOR;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-06 17:54:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(INSTRUMENTED_END_FOR);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef receiver;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            receiver = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Need to create a fake StopIteration error here,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								             * to conform to PEP 380 */
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-25 18:32:43 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (PyStackRef_GenCheck(receiver)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int err = monitor_stop_iteration(tstate, frame, this_instr, PyStackRef_AsPyObjectBorrow(value));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (err) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(value);
							 | 
						
					
						
							
								
									
										
										
										
											2024-01-24 15:10:17 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(INSTRUMENTED_END_SEND) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = INSTRUMENTED_END_SEND;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(INSTRUMENTED_END_SEND);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef receiver;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef val;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            receiver = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *receiver_o = PyStackRef_AsPyObjectBorrow(receiver);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (PyGen_Check(receiver_o) || PyCoro_CheckExact(receiver_o)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int err = monitor_stop_iteration(tstate, frame, this_instr, PyStackRef_AsPyObjectBorrow(value));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (err) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            val = value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2] = val;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(receiver);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(INSTRUMENTED_FOR_ITER) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = INSTRUMENTED_FOR_ITER;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(INSTRUMENTED_FOR_ITER);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef iter_stackref = TOP();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *iter = PyStackRef_AsPyObjectBorrow(iter_stackref);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *next = (*Py_TYPE(iter)->tp_iternext)(iter);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (next != NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PUSH(PyStackRef_FromPyObjectSteal(next));
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-06 17:54:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                INSTRUMENTED_JUMP(this_instr, next_instr, PY_MONITORING_EVENT_BRANCH_LEFT);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (_PyErr_Occurred(tstate)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    int matches = _PyErr_ExceptionMatches(tstate, PyExc_StopIteration);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (!matches) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-29 12:17:47 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyEval_MonitorRaise(tstate, frame, this_instr);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyErr_Clear(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                /* iterator ended normally */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(next_instr[oparg].op.code == END_FOR ||
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                       next_instr[oparg].op.code == INSTRUMENTED_END_FOR);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-06 17:54:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                /* Skip END_FOR */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMPBY(oparg + 1);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(INSTRUMENTED_INSTRUCTION) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = INSTRUMENTED_INSTRUCTION;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(INSTRUMENTED_INSTRUCTION);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            opcode = INSTRUMENTED_INSTRUCTION;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int next_opcode = _Py_call_instrumentation_instruction(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                tstate, frame, this_instr);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (next_opcode < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr = this_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (_PyOpcode_Caches[next_opcode]) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PAUSE_ADAPTIVE_COUNTER(next_instr[1].counter);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(next_opcode > 0 && next_opcode < 256);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            opcode = next_opcode;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH_GOTO();
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(INSTRUMENTED_JUMP_BACKWARD) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = INSTRUMENTED_JUMP_BACKWARD;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(INSTRUMENTED_JUMP_BACKWARD);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PERIODIC
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY();
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                QSBR_QUIESCENT_STATE(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    int err = _Py_HandlePending(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (err != 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _MONITOR_JUMP_BACKWARD
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                INSTRUMENTED_JUMP(this_instr, next_instr - oparg, PY_MONITORING_EVENT_JUMP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(INSTRUMENTED_JUMP_FORWARD) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = INSTRUMENTED_JUMP_FORWARD;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(INSTRUMENTED_JUMP_FORWARD);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUMENTED_JUMP(this_instr, next_instr + oparg, PY_MONITORING_EVENT_JUMP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 12:24:12 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(INSTRUMENTED_LINE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = INSTRUMENTED_LINE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-09 14:54:39 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const prev_instr = frame->instr_ptr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 12:24:12 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 12:24:12 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(INSTRUMENTED_LINE);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            opcode = INSTRUMENTED_LINE;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 12:24:12 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int original_opcode = 0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (tstate->tracing) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyCodeObject *code = _PyFrame_GetCode(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-21 09:33:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int index = (int)(this_instr - _PyFrame_GetBytecode(frame));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                original_opcode = code->_co_monitoring->lines->data[index*code->_co_monitoring->lines->bytes_per_entry];
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 12:24:12 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                next_instr = this_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            } else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                original_opcode = _Py_call_instrumentation_line(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    tstate, frame, this_instr, prev_instr);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (original_opcode < 0) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    next_instr = this_instr+1;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 12:24:12 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                next_instr = frame->instr_ptr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (next_instr != this_instr) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (_PyOpcode_Caches[original_opcode]) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyBinaryOpCache *cache = (_PyBinaryOpCache *)(next_instr+1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                /* Prevent the underlying instruction from specializing
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                 * and overwriting the instrumentation. */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PAUSE_ADAPTIVE_COUNTER(cache->counter);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            opcode = original_opcode;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH_GOTO();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(INSTRUMENTED_LOAD_SUPER_ATTR) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = INSTRUMENTED_LOAD_SUPER_ATTR;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(INSTRUMENTED_LOAD_SUPER_ATTR);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            opcode = INSTRUMENTED_LOAD_SUPER_ATTR;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef global_super_st;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef class_st;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef self_st;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef attr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef null = PyStackRef_NULL;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _LOAD_SUPER_ATTR
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                self_st = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                class_st = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                global_super_st = stack_pointer[-3];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *global_super = PyStackRef_AsPyObjectBorrow(global_super_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *class = PyStackRef_AsPyObjectBorrow(class_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *self = PyStackRef_AsPyObjectBorrow(self_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (opcode == INSTRUMENTED_LOAD_SUPER_ATTR) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *arg = oparg & 2 ? class : &_PyInstrumentation_MISSING;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    int err = _Py_call_instrumentation_2args(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        tstate, PY_MONITORING_EVENT_CALL,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        frame, this_instr, global_super, arg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (err) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        PyStackRef_CLOSE(global_super_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        PyStackRef_CLOSE(class_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        PyStackRef_CLOSE(self_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(pop_3_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // we make no attempt to optimize here; specializations should
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // handle any case whose performance we care about
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *stack[] = {class, self};
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *super = PyObject_Vectorcall(global_super, stack, oparg & 2, NULL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (opcode == INSTRUMENTED_LOAD_SUPER_ATTR) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyObject *arg = oparg & 2 ? class : &_PyInstrumentation_MISSING;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (super == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        _Py_call_instrumentation_exc2(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            tstate, PY_MONITORING_EVENT_C_RAISE,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            frame, this_instr, global_super, arg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        int err = _Py_call_instrumentation_2args(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            tstate, PY_MONITORING_EVENT_C_RETURN,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            frame, this_instr, global_super, arg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        if (err < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 14:00:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            Py_CLEAR(super);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 14:00:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(global_super_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(class_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(self_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (super == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(pop_3_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *name = GETITEM(FRAME_CO_NAMES, oparg >> 2);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -3;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *attr_o = PyObject_GetAttr(super, name);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                Py_DECREF(super);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (attr_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 15:09:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                attr = PyStackRef_FromPyObjectSteal(attr_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _PUSH_NULL_CONDITIONAL
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                null = PyStackRef_NULL;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = attr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (oparg & 1) stack_pointer[1] = null;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1 + (oparg & 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2023-05-16 10:29:00 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 16:59:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(INSTRUMENTED_NOT_TAKEN) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = INSTRUMENTED_NOT_TAKEN;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-06 17:54:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const prev_instr = frame->instr_ptr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 16:59:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 16:59:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(INSTRUMENTED_NOT_TAKEN);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-06 17:54:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr; // INSTRUMENTED_JUMP requires this_instr
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUMENTED_JUMP(prev_instr, next_instr, PY_MONITORING_EVENT_BRANCH_LEFT);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(INSTRUMENTED_POP_ITER) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = INSTRUMENTED_POP_ITER;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-06 17:54:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const prev_instr = frame->instr_ptr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-06 17:54:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-06 17:54:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(INSTRUMENTED_POP_ITER);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef iter;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            iter = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUMENTED_JUMP(prev_instr, this_instr+1, PY_MONITORING_EVENT_BRANCH_RIGHT);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(iter);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 16:59:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(INSTRUMENTED_POP_JUMP_IF_FALSE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = INSTRUMENTED_POP_JUMP_IF_FALSE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(INSTRUMENTED_POP_JUMP_IF_FALSE);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef cond = POP();
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-25 18:32:43 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(PyStackRef_BoolCheck(cond));
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 16:59:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int jump = PyStackRef_IsFalse(cond);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            RECORD_BRANCH_TAKEN(this_instr[1].cache, jump);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (jump) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                INSTRUMENTED_JUMP(this_instr, next_instr + oparg, PY_MONITORING_EVENT_BRANCH_RIGHT);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-05-11 08:08:13 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(INSTRUMENTED_POP_JUMP_IF_NONE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = INSTRUMENTED_POP_JUMP_IF_NONE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(INSTRUMENTED_POP_JUMP_IF_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value_stackref = POP();
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 16:59:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int jump = PyStackRef_IsNone(value_stackref);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            RECORD_BRANCH_TAKEN(this_instr[1].cache, jump);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (jump) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                INSTRUMENTED_JUMP(this_instr, next_instr + oparg, PY_MONITORING_EVENT_BRANCH_RIGHT);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            else {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(value_stackref);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-04-25 11:45:51 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(INSTRUMENTED_POP_JUMP_IF_NOT_NONE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = INSTRUMENTED_POP_JUMP_IF_NOT_NONE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(INSTRUMENTED_POP_JUMP_IF_NOT_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value_stackref = POP();
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 16:59:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int jump = !PyStackRef_IsNone(value_stackref);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            RECORD_BRANCH_TAKEN(this_instr[1].cache, jump);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (jump) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(value_stackref);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 16:59:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                INSTRUMENTED_JUMP(this_instr, next_instr + oparg, PY_MONITORING_EVENT_BRANCH_RIGHT);
							 | 
						
					
						
							
								
									
										
										
										
											2023-05-11 08:08:13 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-04-24 16:22:14 -06:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(INSTRUMENTED_POP_JUMP_IF_TRUE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = INSTRUMENTED_POP_JUMP_IF_TRUE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(INSTRUMENTED_POP_JUMP_IF_TRUE);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef cond = POP();
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-25 18:32:43 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(PyStackRef_BoolCheck(cond));
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 16:59:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int jump = PyStackRef_IsTrue(cond);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            RECORD_BRANCH_TAKEN(this_instr[1].cache, jump);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (jump) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                INSTRUMENTED_JUMP(this_instr, next_instr + oparg, PY_MONITORING_EVENT_BRANCH_RIGHT);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(INSTRUMENTED_RESUME) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = INSTRUMENTED_RESUME;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(INSTRUMENTED_RESUME);
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-04 11:13:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _LOAD_BYTECODE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #ifdef Py_GIL_DISABLED
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (frame->tlbc_index !=
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    ((_PyThreadStateImpl *)tstate)->tlbc_index) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _Py_CODEUNIT *bytecode =
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyEval_GetExecutableCode(tstate, _PyFrame_GetCode(frame));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (bytecode == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-05 04:12:31 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    ptrdiff_t off = this_instr - _PyFrame_GetBytecode(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-04 11:13:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    frame->tlbc_index = ((_PyThreadStateImpl *)tstate)->tlbc_index;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    frame->instr_ptr = bytecode + off;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    // Make sure this_instr gets reset correctley for any uops that
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    // follow
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    next_instr = frame->instr_ptr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _MAYBE_INSTRUMENT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (tstate->tracing == 0) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    uintptr_t global_version = _Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & ~_PY_EVAL_EVENTS_MASK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    uintptr_t code_version = FT_ATOMIC_LOAD_UINTPTR_ACQUIRE(_PyFrame_GetCode(frame)->_co_instrumentation_version);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (code_version != global_version) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        int err = _Py_Instrument(_PyFrame_GetCode(frame), tstate->interp);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        if (err) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        next_instr = this_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PERIODIC_IF_NOT_YIELD_FROM
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if ((oparg & RESUME_OPARG_LOCATION_MASK) < RESUME_AFTER_YIELD_FROM) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    QSBR_QUIESCENT_STATE(tstate); \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        int err = _Py_HandlePending(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        if (err != 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _MONITOR_RESUME
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int err = _Py_call_instrumentation(
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    tstate, oparg > 0, frame, this_instr);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (err) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (frame->instr_ptr != this_instr) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    /* Instrumentation has jumped */
							 | 
						
					
						
							
								
									
										
										
										
											2024-01-22 03:56:28 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    next_instr = frame->instr_ptr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-09 10:50:09 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(INSTRUMENTED_RETURN_VALUE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = INSTRUMENTED_RETURN_VALUE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(INSTRUMENTED_RETURN_VALUE);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 12:24:12 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef val;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef retval;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 12:24:12 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _RETURN_VALUE_EVENT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                val = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 12:24:12 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int err = _Py_call_instrumentation_arg(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    tstate, PY_MONITORING_EVENT_PY_RETURN,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    frame, this_instr, PyStackRef_AsPyObjectBorrow(val));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (err) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 12:24:12 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _RETURN_VALUE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                retval = val;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-21 10:15:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(frame->owner != FRAME_OWNED_BY_INTERPRETER);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef temp = retval;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 12:24:12 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(EMPTY());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _Py_LeaveRecursiveCallPy(tstate);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // GH-99729: We need to unlink the frame *before* clearing it:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyInterpreterFrame *dying = frame;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                frame = tstate->current_frame = dying->previous;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyEval_FrameClearAndPop(tstate, dying);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 12:24:12 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                LOAD_IP(frame->return_offset);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = temp;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 12:24:12 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                LLTRACE_RESUME_FRAME();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(INSTRUMENTED_YIELD_VALUE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = INSTRUMENTED_YIELD_VALUE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(INSTRUMENTED_YIELD_VALUE);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 12:24:12 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef val;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef retval;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 12:24:12 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _YIELD_VALUE_EVENT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                val = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 12:24:12 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int err = _Py_call_instrumentation_arg(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    tstate, PY_MONITORING_EVENT_PY_YIELD,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    frame, this_instr, PyStackRef_AsPyObjectBorrow(val));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (err) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 12:24:12 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (frame->instr_ptr != this_instr) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    next_instr = frame->instr_ptr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _YIELD_VALUE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                retval = val;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 12:24:12 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                // NOTE: It's important that YIELD_VALUE never raises an exception!
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // The compiler treats any exception raised here as a failed close()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // or throw() call.
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-21 10:15:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(frame->owner != FRAME_OWNED_BY_INTERPRETER);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 12:24:12 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                frame->instr_ptr++;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyGenObject *gen = _PyGen_GetGeneratorFromFrame(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(FRAME_SUSPENDED_YIELD_FROM == FRAME_SUSPENDED + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(oparg == 0 || oparg == 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                gen->gi_frame_state = FRAME_SUSPENDED + oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef temp = retval;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 12:24:12 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                tstate->exc_info = gen->gi_exc_state.previous_item;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                gen->gi_exc_state.previous_item = NULL;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _Py_LeaveRecursiveCallPy(tstate);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyInterpreterFrame *gen_frame = frame;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                frame = tstate->current_frame = frame->previous;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                gen_frame->previous = NULL;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                /* We don't know which of these is relevant here, so keep them equal */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(INLINE_CACHE_ENTRIES_SEND == INLINE_CACHE_ENTRIES_FOR_ITER);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #if TIER_ONE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(frame->instr_ptr->op.code == INSTRUMENTED_LINE ||
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                  frame->instr_ptr->op.code == INSTRUMENTED_INSTRUCTION ||
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                  _PyOpcode_Deopt[frame->instr_ptr->op.code] == SEND ||
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                  _PyOpcode_Deopt[frame->instr_ptr->op.code] == FOR_ITER ||
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                  _PyOpcode_Deopt[frame->instr_ptr->op.code] == INTERPRETER_EXIT ||
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                  _PyOpcode_Deopt[frame->instr_ptr->op.code] == ENTER_EXECUTOR);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 12:24:12 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 12:24:12 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                LOAD_IP(1 + INLINE_CACHE_ENTRIES_SEND);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                value = temp;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-26 12:24:12 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                LLTRACE_RESUME_FRAME();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(INTERPRETER_EXIT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = INTERPRETER_EXIT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(INTERPRETER_EXIT);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef retval;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            retval = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-21 10:15:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(frame->owner == FRAME_OWNED_BY_INTERPRETER);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(_PyFrame_IsIncomplete(frame));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Restore previous frame and return. */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            tstate->current_frame = frame->previous;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(!_PyErr_Occurred(tstate));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            tstate->c_recursion_remaining += PY_EVAL_C_STACK_UNITS;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-28 10:30:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *result = PyStackRef_AsPyObjectSteal(retval);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-28 10:30:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Not strictly necessary, but prevents warnings */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            return result;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(IS_OP) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = IS_OP;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(IS_OP);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef left;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef right;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef b;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            right = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            left = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int res = Py_Is(PyStackRef_AsPyObjectBorrow(left), PyStackRef_AsPyObjectBorrow(right)) ^ oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(left);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(right);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            b = res ? PyStackRef_True : PyStackRef_False;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2] = b;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(JUMP_BACKWARD) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = JUMP_BACKWARD;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(JUMP_BACKWARD);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PREDICTED_JUMP_BACKWARD:;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr - 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _SPECIALIZE_JUMP_BACKWARD
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #if ENABLE_SPECIALIZATION
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (this_instr->op.code == JUMP_BACKWARD) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    this_instr->op.code = tstate->interp->jit ? JUMP_BACKWARD_JIT : JUMP_BACKWARD_NO_JIT;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    // Need to re-dispatch so the warmup counter isn't off by one:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    next_instr = this_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH_SAME_OPARG();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PERIODIC
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                QSBR_QUIESCENT_STATE(tstate);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    int err = _Py_HandlePending(tstate);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (err != 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _JUMP_BACKWARD_NO_INTERRUPT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                /* This bytecode is used in the `yield from` or `await` loop.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                 * If there is an interrupt, we want it handled in the innermost
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                 * generator or coroutine, so we deliberately do not check it here.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                 * (see bpo-30039).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                 */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(oparg <= INSTR_OFFSET());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMPBY(-oparg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(JUMP_BACKWARD_JIT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = JUMP_BACKWARD_JIT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(JUMP_BACKWARD_JIT);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            static_assert(1 == 1, "incorrect cache size");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PERIODIC
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY();
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                QSBR_QUIESCENT_STATE(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    int err = _Py_HandlePending(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (err != 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _JUMP_BACKWARD_NO_INTERRUPT
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                /* This bytecode is used in the `yield from` or `await` loop.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                 * If there is an interrupt, we want it handled in the innermost
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                 * generator or coroutine, so we deliberately do not check it here.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                 * (see bpo-30039).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                 */
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(oparg <= INSTR_OFFSET());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMPBY(-oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _JIT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #ifdef _Py_TIER2
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _Py_BackoffCounter counter = this_instr[1].counter;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (backoff_counter_triggers(counter) && this_instr->op.code == JUMP_BACKWARD_JIT) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _Py_CODEUNIT *start = this_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    /* Back up over EXTENDED_ARGs so optimizer sees the whole instruction */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    while (oparg > 255) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        oparg >>= 8;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        start--;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyExecutorObject *executor;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 12:18:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    int optimized = _PyOptimizer_Optimize(frame, start, &executor, 0);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-20 08:11:25 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (optimized <= 0) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        this_instr[1].counter = restart_backoff_counter(counter);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        if (optimized < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        }
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-20 08:11:25 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        this_instr[1].counter = initial_jump_backoff_counter();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        assert(tstate->previous_executor == NULL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        tstate->previous_executor = Py_None;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        GOTO_TIER_TWO(executor);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                else {
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    ADVANCE_ADAPTIVE_COUNTER(this_instr[1].counter);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(JUMP_BACKWARD_NO_INTERRUPT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = JUMP_BACKWARD_NO_INTERRUPT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(JUMP_BACKWARD_NO_INTERRUPT);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* This bytecode is used in the `yield from` or `await` loop.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								             * If there is an interrupt, we want it handled in the innermost
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								             * generator or coroutine, so we deliberately do not check it here.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								             * (see bpo-30039).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								             */
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(oparg <= INSTR_OFFSET());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            JUMPBY(-oparg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(JUMP_BACKWARD_NO_JIT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = JUMP_BACKWARD_NO_JIT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(JUMP_BACKWARD_NO_JIT);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            static_assert(1 == 1, "incorrect cache size");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PERIODIC
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                QSBR_QUIESCENT_STATE(tstate);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    int err = _Py_HandlePending(tstate);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (err != 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _JUMP_BACKWARD_NO_INTERRUPT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                /* This bytecode is used in the `yield from` or `await` loop.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                 * If there is an interrupt, we want it handled in the innermost
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                 * generator or coroutine, so we deliberately do not check it here.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                 * (see bpo-30039).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                 */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(oparg <= INSTR_OFFSET());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMPBY(-oparg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(JUMP_FORWARD) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = JUMP_FORWARD;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(JUMP_FORWARD);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            JUMPBY(oparg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(LIST_APPEND) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LIST_APPEND;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LIST_APPEND);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef list;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef v;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            v = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            list = stack_pointer[-2 - (oparg-1)];
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int err = _PyList_AppendTakeRef((PyListObject *)PyStackRef_AsPyObjectBorrow(list),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_AsPyObjectSteal(v));
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (err < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_1_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(LIST_EXTEND) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LIST_EXTEND;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LIST_EXTEND);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef list_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef iterable_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            iterable_st = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            list_st = stack_pointer[-2 - (oparg-1)];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *list = PyStackRef_AsPyObjectBorrow(list_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *iterable = PyStackRef_AsPyObjectBorrow(iterable_st);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *none_val = _PyList_Extend((PyListObject *)list, iterable);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (none_val == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int matches = _PyErr_ExceptionMatches(tstate, PyExc_TypeError);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (matches &&
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    (Py_TYPE(iterable)->tp_iter == NULL && !PySequence_Check(iterable)))
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyErr_Clear(tstate);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyErr_Format(tstate, PyExc_TypeError,
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                                  "Value after * must be an iterable, not %.200s",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                                  Py_TYPE(iterable)->tp_name);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(iterable_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_1_error);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(Py_IsNone(none_val));
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(iterable_st);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_ATTR) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_ATTR;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 10;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_ATTR);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-22 09:22:25 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PREDICTED_LOAD_ATTR:;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-09 14:54:39 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr - 10;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef owner;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef attr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *self_or_null;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _SPECIALIZE_LOAD_ATTR
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                owner = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint16_t counter = read_u16(&this_instr[1].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                (void)counter;
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-13 10:17:16 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #if ENABLE_SPECIALIZATION_FT
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (ADAPTIVE_COUNTER_TRIGGERS(counter)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyObject *name = GETITEM(FRAME_CO_NAMES, oparg>>1);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    next_instr = this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _Py_Specialize_LoadAttr(owner, next_instr, name);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH_SAME_OPARG();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-22 14:17:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                OPCODE_DEFERRED_INC(LOAD_ATTR);
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                ADVANCE_ADAPTIVE_COUNTER(this_instr[1].counter);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-13 10:17:16 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #endif  /* ENABLE_SPECIALIZATION_FT */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-20 14:27:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 8 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _LOAD_ATTR
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                self_or_null = &stack_pointer[0];
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *name = GETITEM(FRAME_CO_NAMES, oparg >> 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *attr_o;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (oparg & 1) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    /* Designed to work in tandem with CALL, pushes two values. */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    attr_o = NULL;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    int is_meth = _PyObject_GetMethod(PyStackRef_AsPyObjectBorrow(owner), name, &attr_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (is_meth) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        /* We can bypass temporary bound method object.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                           meth is unbound method and obj is self.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                           meth | self | arg1 | ... | argN
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                         */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        assert(attr_o != NULL);  // No errors on this branch
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        self_or_null[0] = owner;  // Transfer ownership
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        /* meth is not an unbound method (but a regular attr, or
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                           something was returned by a descriptor protocol).  Set
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                           the second element of the stack to NULL, to signal
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                           CALL that it's not a method call.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                           meth | NULL | arg1 | ... | argN
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                         */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        PyStackRef_CLOSE(owner);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        if (attr_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            JUMP_TO_LABEL(pop_1_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        self_or_null[0] = PyStackRef_NULL;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    /* Classic, pushes one value. */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    attr_o = PyObject_GetAttr(PyStackRef_AsPyObjectBorrow(owner), name);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(owner);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (attr_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(pop_1_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                attr = PyStackRef_FromPyObjectSteal(attr_o);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = attr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += (oparg&1);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_ATTR_CLASS) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_ATTR_CLASS;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 10;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_ATTR_CLASS);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_LOAD_ATTR == 9, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef owner;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef attr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef null = PyStackRef_NULL;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_ATTR_CLASS
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                owner = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint32_t type_version = read_u32(&this_instr[2].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyType_Check(owner_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(type_version != 0);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (FT_ATOMIC_LOAD_UINT_RELAXED(((PyTypeObject *)owner_o)->tp_version_tag) != type_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _LOAD_ATTR_CLASS
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-23 10:22:35 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *descr = read_obj(&this_instr[6].cache);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(LOAD_ATTR, hit);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(descr != NULL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                attr = PyStackRef_FromPyObjectNew(descr);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(owner);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _PUSH_NULL_CONDITIONAL
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                null = PyStackRef_NULL;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = attr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (oparg & 1) stack_pointer[0] = null;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += (oparg & 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-23 10:22:35 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_ATTR_CLASS_WITH_METACLASS_CHECK) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_ATTR_CLASS_WITH_METACLASS_CHECK;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-23 10:22:35 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 10;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_ATTR_CLASS_WITH_METACLASS_CHECK);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_LOAD_ATTR == 9, "incorrect cache size");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef owner;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef attr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef null = PyStackRef_NULL;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-23 10:22:35 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_ATTR_CLASS
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                owner = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-23 10:22:35 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint32_t type_version = read_u32(&this_instr[2].cache);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyType_Check(owner_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-23 10:22:35 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(type_version != 0);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (FT_ATOMIC_LOAD_UINT_RELAXED(((PyTypeObject *)owner_o)->tp_version_tag) != type_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-23 10:22:35 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_TYPE_VERSION
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                uint32_t type_version = read_u32(&this_instr[4].cache);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(type_version != 0);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-23 10:22:35 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _LOAD_ATTR_CLASS
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *descr = read_obj(&this_instr[6].cache);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(LOAD_ATTR, hit);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(descr != NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                attr = PyStackRef_FromPyObjectNew(descr);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(owner);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _PUSH_NULL_CONDITIONAL
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                null = PyStackRef_NULL;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = attr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (oparg & 1) stack_pointer[0] = null;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += (oparg & 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 10;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_LOAD_ATTR == 9, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef owner;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            owner = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            uint32_t type_version = read_u32(&this_instr[2].cache);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            uint32_t func_version = read_u32(&this_instr[4].cache);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *getattribute = read_obj(&this_instr[6].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert((oparg & 1) == 0);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (tstate->interp->eval_frame) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyTypeObject *cls = Py_TYPE(owner_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(type_version != 0);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (FT_ATOMIC_LOAD_UINT_RELAXED(cls->tp_version_tag) != type_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(Py_IS_TYPE(getattribute, &PyFunction_Type));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyFunctionObject *f = (PyFunctionObject *)getattribute;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(func_version != 0);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (f->func_version != func_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyCodeObject *code = (PyCodeObject *)f->func_code;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(code->co_argcount == 2);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!_PyThreadState_HasStackSpace(tstate, code->co_framesize)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STAT_INC(LOAD_ATTR, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *name = GETITEM(FRAME_CO_NAMES, oparg >> 1);
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-24 13:08:18 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyInterpreterFrame *new_frame = _PyFrame_PushUnchecked(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                tstate, PyStackRef_FromPyObjectNew(f), 2, frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // Manipulate stack directly because we exit with DISPATCH_INLINED().
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            STACK_SHRINK(1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            new_frame->localsplus[0] = owner;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            new_frame->localsplus[1] = PyStackRef_FromPyObjectNew(name);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-29 18:25:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->return_offset = 10 ;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH_INLINED(new_frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_ATTR_INSTANCE_VALUE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_ATTR_INSTANCE_VALUE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 10;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_ATTR_INSTANCE_VALUE);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_LOAD_ATTR == 9, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef owner;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef attr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef null = PyStackRef_NULL;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2023-08-04 09:35:56 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_TYPE_VERSION
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-13 16:36:19 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                owner = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint32_t type_version = read_u32(&this_instr[2].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner));
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-13 16:36:19 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(type_version != 0);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-13 16:36:19 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-08-04 09:35:56 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_MANAGED_OBJECT_HAS_VALUES
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-13 16:36:19 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(Py_TYPE(owner_o)->tp_dictoffset < 0);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(Py_TYPE(owner_o)->tp_flags & Py_TPFLAGS_INLINE_VALUES);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!FT_ATOMIC_LOAD_UINT8(_PyObject_InlineValues(owner_o)->valid)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-13 16:36:19 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-08-04 09:35:56 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _LOAD_ATTR_INSTANCE_VALUE
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-13 16:36:19 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-21 15:52:04 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint16_t offset = read_u16(&this_instr[4].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-21 15:52:04 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject **value_ptr = (PyObject**)(((char *)owner_o) + offset);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 11:56:11 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *attr_o = FT_ATOMIC_LOAD_PTR_ACQUIRE(*value_ptr);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (attr_o == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 11:56:11 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #ifdef Py_GIL_DISABLED
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (!_Py_TryIncrefCompareStackRef(value_ptr, attr_o, &attr)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (true) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 11:56:11 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #else
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                attr = PyStackRef_FromPyObjectNew(attr_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-13 16:36:19 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(LOAD_ATTR, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer[-1] = attr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(owner);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-13 16:36:19 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 5 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _PUSH_NULL_CONDITIONAL
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                null = PyStackRef_NULL;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (oparg & 1) stack_pointer[0] = null;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += (oparg & 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_ATTR_METHOD_LAZY_DICT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_ATTR_METHOD_LAZY_DICT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 10;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_ATTR_METHOD_LAZY_DICT);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_LOAD_ATTR == 9, "incorrect cache size");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef owner;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef attr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef self;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_TYPE_VERSION
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                owner = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                uint32_t type_version = read_u32(&this_instr[2].cache);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(type_version != 0);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_ATTR_METHOD_LAZY_DICT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                uint16_t dictoffset = read_u16(&this_instr[4].cache);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                char *ptr = ((char *)PyStackRef_AsPyObjectBorrow(owner)) + MANAGED_DICT_OFFSET + dictoffset;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *dict = FT_ATOMIC_LOAD_PTR_ACQUIRE(*(PyObject **)ptr);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                /* This object has a __dict__, just not yet created */
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (dict != NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _LOAD_ATTR_METHOD_LAZY_DICT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *descr = read_obj(&this_instr[6].cache);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(oparg & 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(LOAD_ATTR, hit);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(descr != NULL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                attr = PyStackRef_FromPyObjectNew(descr);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                self = owner;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = attr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = self;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_ATTR_METHOD_NO_DICT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_ATTR_METHOD_NO_DICT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 10;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_ATTR_METHOD_NO_DICT);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_LOAD_ATTR == 9, "incorrect cache size");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef owner;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef attr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef self;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_TYPE_VERSION
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                owner = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                uint32_t type_version = read_u32(&this_instr[2].cache);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(type_version != 0);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _LOAD_ATTR_METHOD_NO_DICT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *descr = read_obj(&this_instr[6].cache);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(oparg & 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(Py_TYPE(PyStackRef_AsPyObjectBorrow(owner))->tp_dictoffset == 0);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(LOAD_ATTR, hit);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(descr != NULL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                attr = PyStackRef_FromPyObjectNew(descr);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                self = owner;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = attr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = self;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_ATTR_METHOD_WITH_VALUES) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_ATTR_METHOD_WITH_VALUES;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 10;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_ATTR_METHOD_WITH_VALUES);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_LOAD_ATTR == 9, "incorrect cache size");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef owner;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef attr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef self;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_TYPE_VERSION
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                owner = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                uint32_t type_version = read_u32(&this_instr[2].cache);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(type_version != 0);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(Py_TYPE(owner_o)->tp_flags & Py_TPFLAGS_INLINE_VALUES);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyDictValues *ivs = _PyObject_InlineValues(owner_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!FT_ATOMIC_LOAD_UINT8(ivs->valid)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_KEYS_VERSION
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                uint32_t keys_version = read_u32(&this_instr[4].cache);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyTypeObject *owner_cls = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyHeapTypeObject *owner_heap_type = (PyHeapTypeObject *)owner_cls;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyDictKeysObject *keys = owner_heap_type->ht_cached_keys;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (FT_ATOMIC_LOAD_UINT32_RELAXED(keys->dk_version) != keys_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _LOAD_ATTR_METHOD_WITH_VALUES
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *descr = read_obj(&this_instr[6].cache);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(oparg & 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                /* Cached method object */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(LOAD_ATTR, hit);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(descr != NULL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                attr = PyStackRef_FromPyObjectNew(descr);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                self = owner;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = attr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = self;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_ATTR_MODULE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_ATTR_MODULE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 10;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_ATTR_MODULE);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_LOAD_ATTR == 9, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef owner;
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-13 10:17:16 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyDictKeysObject *mod_keys;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef attr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef null = PyStackRef_NULL;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-13 10:17:16 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_ATTR_MODULE_PUSH_KEYS
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                owner = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-22 14:48:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint32_t dict_version = read_u32(&this_instr[2].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (Py_TYPE(owner_o)->tp_getattro != PyModule_Type.tp_getattro) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyDictObject *dict = (PyDictObject *)((PyModuleObject *)owner_o)->md_dict;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(dict != NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-13 10:17:16 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyDictKeysObject *keys = FT_ATOMIC_LOAD_PTR_ACQUIRE(dict->ma_keys);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (FT_ATOMIC_LOAD_UINT32_RELAXED(keys->dk_version) != dict_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-13 10:17:16 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                mod_keys = keys;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-13 10:17:16 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _LOAD_ATTR_MODULE_FROM_KEYS
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-27 15:27:44 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint16_t index = read_u16(&this_instr[4].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-13 10:17:16 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(mod_keys->dk_kind == DICT_KEYS_UNICODE);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(index < FT_ATOMIC_LOAD_SSIZE_RELAXED(mod_keys->dk_nentries));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyDictUnicodeEntry *ep = DK_UNICODE_ENTRIES(mod_keys) + index;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *attr_o = FT_ATOMIC_LOAD_PTR_RELAXED(ep->me_value);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Clear mod_keys from stack in case we need to deopt
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (attr_o == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-13 10:17:16 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #ifdef Py_GIL_DISABLED
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int increfed = _Py_TryIncrefCompareStackRef(&ep->me_value, attr_o, &attr);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (!increfed) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (true) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-13 10:17:16 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #else
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                Py_INCREF(attr_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                attr = PyStackRef_FromPyObjectSteal(attr_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-13 10:17:16 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(LOAD_ATTR, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer[-1] = attr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(owner);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-27 15:27:44 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 5 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _PUSH_NULL_CONDITIONAL
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                null = PyStackRef_NULL;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (oparg & 1) stack_pointer[0] = null;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += (oparg & 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_ATTR_NONDESCRIPTOR_NO_DICT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_ATTR_NONDESCRIPTOR_NO_DICT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 10;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_ATTR_NONDESCRIPTOR_NO_DICT);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_LOAD_ATTR == 9, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef owner;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef attr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_TYPE_VERSION
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-04 08:08:02 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                owner = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint32_t type_version = read_u32(&this_instr[2].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner));
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-04 08:08:02 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(type_version != 0);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-04 08:08:02 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _LOAD_ATTR_NONDESCRIPTOR_NO_DICT
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-04 08:08:02 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *descr = read_obj(&this_instr[6].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert((oparg & 1) == 0);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(Py_TYPE(PyStackRef_AsPyObjectBorrow(owner))->tp_dictoffset == 0);
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-04 08:08:02 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(LOAD_ATTR, hit);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(descr != NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(owner);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                attr = PyStackRef_FromPyObjectNew(descr);
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-04 08:08:02 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = attr;
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 10;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_LOAD_ATTR == 9, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef owner;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef attr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_TYPE_VERSION
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                owner = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint32_t type_version = read_u32(&this_instr[2].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner));
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(type_version != 0);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_DORV_VALUES_INST_ATTR_FROM_DICT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(Py_TYPE(owner_o)->tp_flags & Py_TPFLAGS_INLINE_VALUES);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 11:56:11 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyDictValues *ivs = _PyObject_InlineValues(owner_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!FT_ATOMIC_LOAD_UINT8(ivs->valid)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_KEYS_VERSION
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                uint32_t keys_version = read_u32(&this_instr[4].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyTypeObject *owner_cls = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner));
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyHeapTypeObject *owner_heap_type = (PyHeapTypeObject *)owner_cls;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 11:56:11 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyDictKeysObject *keys = owner_heap_type->ht_cached_keys;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (FT_ATOMIC_LOAD_UINT32_RELAXED(keys->dk_version) != keys_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *descr = read_obj(&this_instr[6].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert((oparg & 1) == 0);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(LOAD_ATTR, hit);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(descr != NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(owner);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                attr = PyStackRef_FromPyObjectNew(descr);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = attr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_ATTR_PROPERTY) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_ATTR_PROPERTY;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 10;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_ATTR_PROPERTY);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_LOAD_ATTR == 9, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef owner;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-25 10:45:28 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyInterpreterFrame *new_frame;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-25 10:45:28 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PEP_523
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (tstate->interp->eval_frame) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-25 10:45:28 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_TYPE_VERSION
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                owner = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-25 10:45:28 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint32_t type_version = read_u32(&this_instr[2].cache);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(type_version != 0);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-25 10:45:28 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _LOAD_ATTR_PROPERTY_FRAME
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *fget = read_obj(&this_instr[6].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert((oparg & 1) == 0);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-25 10:45:28 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(Py_IS_TYPE(fget, &PyFunction_Type));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyFunctionObject *f = (PyFunctionObject *)fget;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyCodeObject *code = (PyCodeObject *)f->func_code;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if ((code->co_flags & (CO_VARKEYWORDS | CO_VARARGS | CO_OPTIMIZED)) != CO_OPTIMIZED) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (code->co_kwonlyargcount) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (code->co_argcount != 1) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (!_PyThreadState_HasStackSpace(tstate, code->co_framesize)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-25 10:45:28 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(LOAD_ATTR, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-24 13:08:18 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                new_frame = _PyFrame_PushUnchecked(tstate, PyStackRef_FromPyObjectNew(fget), 1, frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-25 10:45:28 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                new_frame->localsplus[0] = owner;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _SAVE_RETURN_OFFSET
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #if TIER_ONE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                frame->return_offset = (uint16_t)(next_instr - this_instr);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #if TIER_TWO
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                frame->return_offset = oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _PUSH_FRAME
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Write it out explicitly because it's subtly different.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Eventually this should be the only occurrence of this code.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(tstate->interp->eval_frame == NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyInterpreterFrame *temp = new_frame;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-25 10:45:28 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(new_frame->previous == frame || new_frame->previous->previous == frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-25 10:45:28 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                CALL_STAT_INC(inlined_py_calls);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                frame = tstate->current_frame = temp;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-25 10:45:28 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                tstate->py_recursion_remaining--;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LOAD_SP();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LOAD_IP(0);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LLTRACE_RESUME_FRAME();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_ATTR_SLOT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_ATTR_SLOT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 10;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_ATTR_SLOT);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_LOAD_ATTR == 9, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef owner;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef attr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef null = PyStackRef_NULL;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-03 15:37:21 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_TYPE_VERSION
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-27 15:27:44 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                owner = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint32_t type_version = read_u32(&this_instr[2].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner));
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-27 15:27:44 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(type_version != 0);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-27 15:27:44 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _LOAD_ATTR_SLOT
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-27 15:27:44 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint16_t index = read_u16(&this_instr[4].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 11:56:11 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject **addr = (PyObject **)((char *)owner_o + index);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *attr_o = FT_ATOMIC_LOAD_PTR(*addr);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (attr_o == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 11:56:11 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #ifdef Py_GIL_DISABLED
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int increfed = _Py_TryIncrefCompareStackRef(addr, attr_o, &attr);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!increfed) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 11:56:11 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #else
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                attr = PyStackRef_FromPyObjectNew(attr_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(LOAD_ATTR, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(owner);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 5 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _PUSH_NULL_CONDITIONAL
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                null = PyStackRef_NULL;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = attr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (oparg & 1) stack_pointer[0] = null;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += (oparg & 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_ATTR_WITH_HINT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_ATTR_WITH_HINT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 10;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_ATTR_WITH_HINT);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_LOAD_ATTR == 9, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef owner;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 11:56:11 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyDictObject *dict;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef attr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef null = PyStackRef_NULL;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-03 15:37:21 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_TYPE_VERSION
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-27 15:27:44 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                owner = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint32_t type_version = read_u32(&this_instr[2].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner));
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-27 15:27:44 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(type_version != 0);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-27 15:27:44 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_ATTR_WITH_HINT
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-27 15:27:44 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(Py_TYPE(owner_o)->tp_flags & Py_TPFLAGS_MANAGED_DICT);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 11:56:11 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyDictObject *dict_o = _PyObject_GetManagedDict(owner_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (dict_o == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 11:56:11 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(PyDict_CheckExact((PyObject *)dict_o));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                dict = dict_o;
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-27 15:27:44 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _LOAD_ATTR_WITH_HINT
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint16_t hint = read_u16(&this_instr[4].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *attr_o;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 11:56:11 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!LOCK_OBJECT(dict)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (true) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 11:56:11 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (hint >= (size_t)dict->ma_keys->dk_nentries) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UNLOCK_OBJECT(dict);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (true) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 11:56:11 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *name = GETITEM(FRAME_CO_NAMES, oparg>>1);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 11:56:11 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (dict->ma_keys->dk_kind != DICT_KEYS_UNICODE) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UNLOCK_OBJECT(dict);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (true) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 11:56:11 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-05 16:27:48 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyDictUnicodeEntry *ep = DK_UNICODE_ENTRIES(dict->ma_keys) + hint;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 11:56:11 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (ep->me_key != name) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UNLOCK_OBJECT(dict);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (true) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 11:56:11 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-05 16:27:48 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                attr_o = ep->me_value;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 11:56:11 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (attr_o == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UNLOCK_OBJECT(dict);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (true) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        UPDATE_MISS_STATS(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_PREDICTED(LOAD_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 11:56:11 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(LOAD_ATTR, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 11:56:11 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                attr = PyStackRef_FromPyObjectNew(attr_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UNLOCK_OBJECT(dict);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(owner);
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-29 13:49:54 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 5 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _PUSH_NULL_CONDITIONAL
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                null = PyStackRef_NULL;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = attr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (oparg & 1) stack_pointer[0] = null;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += (oparg & 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-08 15:54:07 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_BUILD_CLASS) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_BUILD_CLASS;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_BUILD_CLASS);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef bc;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *bc_o;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            int err = PyMapping_GetOptionalItem(BUILTINS(), &_Py_ID(__build_class__), &bc_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (err < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (bc_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyErr_SetString(tstate, PyExc_NameError,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                                 "__build_class__ not found");
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            bc = PyStackRef_FromPyObjectSteal(bc_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = bc;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-08 15:54:07 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-21 20:46:39 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_COMMON_CONSTANT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_COMMON_CONSTANT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-21 20:46:39 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_COMMON_CONSTANT);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-21 20:46:39 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // Keep in sync with _common_constants in opcode.py
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // If we ever have more than two constants, use a lookup table
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *val;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (oparg == CONSTANT_ASSERTIONERROR) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                val = PyExc_AssertionError;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(oparg == CONSTANT_NOTIMPLEMENTEDERROR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                val = PyExc_NotImplementedError;
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-21 20:46:39 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = PyStackRef_FromPyObjectImmortal(val);
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-21 20:46:39 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-21 20:46:39 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_CONST) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_CONST;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_CONST);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-22 09:22:25 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PREDICTED_LOAD_CONST:;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 10:30:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr - 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 10:30:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* We can't do this in the bytecode compiler as
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								             * marshalling can intern strings and make them immortal. */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *obj = GETITEM(FRAME_CO_CONSTS, oparg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            value = PyStackRef_FromPyObjectNew(obj);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-29 01:07:56 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if ENABLE_SPECIALIZATION_FT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            #ifdef Py_GIL_DISABLED
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            uint8_t expected = LOAD_CONST;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (!_Py_atomic_compare_exchange_uint8(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    &this_instr->op.code, &expected,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _Py_IsImmortal(obj) ? LOAD_CONST_IMMORTAL : LOAD_CONST_MORTAL)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // We might lose a race with instrumentation, which we don't care about.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(expected >= MIN_INSTRUMENTED_OPCODE);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            #else
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 10:30:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (this_instr->op.code == LOAD_CONST) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                this_instr->op.code = _Py_IsImmortal(obj) ? LOAD_CONST_IMMORTAL : LOAD_CONST_MORTAL;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-29 01:07:56 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-01-16 12:35:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-29 11:15:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_CONST_IMMORTAL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_CONST_IMMORTAL;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-29 11:15:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_CONST_IMMORTAL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            static_assert(0 == 0, "incorrect cache size");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *obj = GETITEM(FRAME_CO_CONSTS, oparg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(_Py_IsImmortal(obj));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            value = PyStackRef_FromPyObjectImmortal(obj);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 10:30:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_CONST_MORTAL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_CONST_MORTAL;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 10:30:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_CONST_MORTAL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            static_assert(0 == 0, "incorrect cache size");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *obj = GETITEM(FRAME_CO_CONSTS, oparg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            value = PyStackRef_FromPyObjectNew(obj);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_DEREF) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_DEREF;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_DEREF);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyCellObject *cell = (PyCellObject *)PyStackRef_AsPyObjectBorrow(GETLOCAL(oparg));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *value_o = PyCell_GetRef(cell);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (value_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyEval_FormatExcUnbound(tstate, _PyFrame_GetCode(frame), oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = PyStackRef_FromPyObjectSteal(value_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-08 15:54:07 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_FAST) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_FAST;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_FAST);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-29 02:14:48 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(!PyStackRef_IsNull(GETLOCAL(oparg)));
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = PyStackRef_DUP(GETLOCAL(oparg));
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_FAST_AND_CLEAR) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_FAST_AND_CLEAR;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_FAST_AND_CLEAR);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = GETLOCAL(oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            GETLOCAL(oparg) = PyStackRef_NULL;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_FAST_CHECK) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_FAST_CHECK;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_FAST_CHECK);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value_s = GETLOCAL(oparg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (PyStackRef_IsNull(value_s)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-26 09:35:11 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyEval_FormatExcCheckArg(tstate, PyExc_UnboundLocalError,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UNBOUNDLOCAL_ERROR_MSG,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyTuple_GetItem(_PyFrame_GetCode(frame)->co_localsplusnames, oparg)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                );
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-26 09:35:11 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = PyStackRef_DUP(value_s);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_FAST_LOAD_FAST) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_FAST_LOAD_FAST;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_FAST_LOAD_FAST);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value2;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            uint32_t oparg1 = oparg >> 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            uint32_t oparg2 = oparg & 15;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value1 = PyStackRef_DUP(GETLOCAL(oparg1));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            value2 = PyStackRef_DUP(GETLOCAL(oparg2));
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = value1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[1] = value2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 2;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_FROM_DICT_OR_DEREF) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_FROM_DICT_OR_DEREF;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_FROM_DICT_OR_DEREF);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef class_dict_st;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            class_dict_st = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *value_o;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *name;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *class_dict = PyStackRef_AsPyObjectBorrow(class_dict_st);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(class_dict);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(oparg >= 0 && oparg < _PyFrame_GetCode(frame)->co_nlocalsplus);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            name = PyTuple_GET_ITEM(_PyFrame_GetCode(frame)->co_localsplusnames, oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int err = PyMapping_GetOptionalItem(class_dict, name, &value_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (err < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!value_o) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyCellObject *cell = (PyCellObject *)PyStackRef_AsPyObjectBorrow(GETLOCAL(oparg));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                value_o = PyCell_GetRef(cell);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (value_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyEval_FormatExcUnbound(tstate, _PyFrame_GetCode(frame), oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(class_dict_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = PyStackRef_FromPyObjectSteal(value_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_FROM_DICT_OR_GLOBALS) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_FROM_DICT_OR_GLOBALS;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_FROM_DICT_OR_GLOBALS);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef mod_or_class_dict;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef v;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            mod_or_class_dict = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *name = GETITEM(FRAME_CO_NAMES, oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *v_o;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int err = PyMapping_GetOptionalItem(PyStackRef_AsPyObjectBorrow(mod_or_class_dict), name, &v_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(mod_or_class_dict);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (err < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_1_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (v_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-31 14:05:24 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (PyDict_CheckExact(GLOBALS())
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    && PyDict_CheckExact(BUILTINS()))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    v_o = _PyDict_LoadGlobal((PyDictObject *)GLOBALS(),
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-31 14:05:24 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        (PyDictObject *)BUILTINS(),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        name);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (v_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-31 14:05:24 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        if (!_PyErr_Occurred(tstate)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            /* _PyDict_LoadGlobal() returns NULL without raising
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                             * an exception if the key doesn't exist */
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-31 14:05:24 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            _PyEval_FormatExcCheckArg(tstate, PyExc_NameError,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                                NAME_ERROR_MSG, name);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-31 14:05:24 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-09 13:49:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-31 14:05:24 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    /* Slow-path if globals or builtins is not a dict */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    /* namespace 1: globals */
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    int err = PyMapping_GetOptionalItem(GLOBALS(), name, &v_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (err < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (v_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-31 14:05:24 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        /* namespace 2: builtins */
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        int err = PyMapping_GetOptionalItem(BUILTINS(), name, &v_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        if (err < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        if (v_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-31 14:05:24 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            _PyEval_FormatExcCheckArg(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                                tstate, PyExc_NameError,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                                NAME_ERROR_MSG, name);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-31 14:05:24 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-09 13:49:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-02 11:46:18 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-02 11:46:18 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            v = PyStackRef_FromPyObjectSteal(v_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = v;
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_GLOBAL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_GLOBAL;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-26 14:43:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 5;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_GLOBAL);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-22 09:22:25 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PREDICTED_LOAD_GLOBAL:;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-09 14:54:39 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr - 5;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-14 00:23:51 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *res;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef null = PyStackRef_NULL;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _SPECIALIZE_LOAD_GLOBAL
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                uint16_t counter = read_u16(&this_instr[1].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                (void)counter;
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-21 11:22:21 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #if ENABLE_SPECIALIZATION_FT
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (ADAPTIVE_COUNTER_TRIGGERS(counter)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyObject *name = GETITEM(FRAME_CO_NAMES, oparg>>1);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    next_instr = this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _Py_Specialize_LoadGlobal(GLOBALS(), BUILTINS(), next_instr, name);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH_SAME_OPARG();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-22 14:17:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                OPCODE_DEFERRED_INC(LOAD_GLOBAL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                ADVANCE_ADAPTIVE_COUNTER(this_instr[1].counter);
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-21 11:22:21 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #endif  /* ENABLE_SPECIALIZATION_FT */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 13:13:02 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-20 14:27:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _LOAD_GLOBAL
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-14 00:23:51 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = &stack_pointer[0];
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *name = GETITEM(FRAME_CO_NAMES, oparg>>1);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-14 00:23:51 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyEval_LoadGlobalStackRef(GLOBALS(), BUILTINS(), name, res);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (PyStackRef_IsNull(*res)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _PUSH_NULL_CONDITIONAL
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                null = PyStackRef_NULL;
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-02 11:46:18 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05: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());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_GLOBAL_BUILTIN) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_GLOBAL_BUILTIN;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 5;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_GLOBAL_BUILTIN);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_LOAD_GLOBAL == 4, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-09 08:18:25 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyDictKeysObject *builtins_keys;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef null = PyStackRef_NULL;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_GLOBALS_VERSION
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-11 11:33:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint16_t version = read_u16(&this_instr[2].cache);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyDictObject *dict = (PyDictObject *)GLOBALS();
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyDict_CheckExact(dict)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_GLOBAL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_GLOBAL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_GLOBAL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-21 11:22:21 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyDictKeysObject *keys = FT_ATOMIC_LOAD_PTR_ACQUIRE(dict->ma_keys);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (FT_ATOMIC_LOAD_UINT32_RELAXED(keys->dk_version) != version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_GLOBAL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_GLOBAL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_GLOBAL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-21 11:22:21 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(DK_IS_UNICODE(keys));
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-11 11:33:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-09 08:18:25 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_BUILTINS_VERSION_PUSH_KEYS
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-11 11:33:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint16_t version = read_u16(&this_instr[3].cache);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyDictObject *dict = (PyDictObject *)BUILTINS();
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyDict_CheckExact(dict)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_GLOBAL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_GLOBAL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_GLOBAL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-21 11:22:21 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyDictKeysObject *keys = FT_ATOMIC_LOAD_PTR_ACQUIRE(dict->ma_keys);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (FT_ATOMIC_LOAD_UINT32_RELAXED(keys->dk_version) != version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_GLOBAL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_GLOBAL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_GLOBAL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-21 11:22:21 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                builtins_keys = keys;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-09 08:18:25 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(DK_IS_UNICODE(builtins_keys));
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-09 08:18:25 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _LOAD_GLOBAL_BUILTINS_FROM_KEYS
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                uint16_t index = read_u16(&this_instr[4].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-09 08:18:25 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyDictUnicodeEntry *entries = DK_UNICODE_ENTRIES(builtins_keys);
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-21 11:22:21 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = FT_ATOMIC_LOAD_PTR_RELAXED(entries[index].me_value);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_GLOBAL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_GLOBAL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_GLOBAL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-21 11:22:21 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #if Py_GIL_DISABLED
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int increfed = _Py_TryIncrefCompareStackRef(&entries[index].me_value, res_o, &res);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!increfed) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_GLOBAL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_GLOBAL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_GLOBAL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-21 11:22:21 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #else
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                Py_INCREF(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-21 11:22:21 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(LOAD_GLOBAL, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _PUSH_NULL_CONDITIONAL
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                null = PyStackRef_NULL;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = res;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05: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());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_GLOBAL_MODULE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_GLOBAL_MODULE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 5;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_GLOBAL_MODULE);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_LOAD_GLOBAL == 4, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-09 08:18:25 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyDictKeysObject *globals_keys;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef null = PyStackRef_NULL;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-09 08:18:25 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_GLOBALS_VERSION_PUSH_KEYS
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-11 11:33:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint16_t version = read_u16(&this_instr[2].cache);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyDictObject *dict = (PyDictObject *)GLOBALS();
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!PyDict_CheckExact(dict)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_GLOBAL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_GLOBAL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_GLOBAL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-21 11:22:21 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyDictKeysObject *keys = FT_ATOMIC_LOAD_PTR_ACQUIRE(dict->ma_keys);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (FT_ATOMIC_LOAD_UINT32_RELAXED(keys->dk_version) != version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_GLOBAL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_GLOBAL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_GLOBAL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-21 11:22:21 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                globals_keys = keys;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-09 08:18:25 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(DK_IS_UNICODE(globals_keys));
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-09 08:18:25 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _LOAD_GLOBAL_MODULE_FROM_KEYS
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-11 11:33:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint16_t index = read_u16(&this_instr[4].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-09 08:18:25 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyDictUnicodeEntry *entries = DK_UNICODE_ENTRIES(globals_keys);
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-21 11:22:21 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *res_o = FT_ATOMIC_LOAD_PTR_RELAXED(entries[index].me_value);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (res_o == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_GLOBAL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_GLOBAL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_GLOBAL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-21 11:22:21 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #if Py_GIL_DISABLED
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int increfed = _Py_TryIncrefCompareStackRef(&entries[index].me_value, res_o, &res);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!increfed) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(LOAD_GLOBAL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (LOAD_GLOBAL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(LOAD_GLOBAL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-21 11:22:21 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #else
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                Py_INCREF(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-21 11:22:21 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(LOAD_GLOBAL, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _PUSH_NULL_CONDITIONAL
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                null = PyStackRef_NULL;
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = res;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05: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());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_LOCALS) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_LOCALS;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_LOCALS);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef locals;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *l = LOCALS();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (l == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyErr_SetString(tstate, PyExc_SystemError,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                                 "no locals found");
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-07 13:23:53 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            locals = PyStackRef_FromPyObjectNew(l);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = locals;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_NAME) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_NAME;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_NAME);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef v;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *name = GETITEM(FRAME_CO_NAMES, oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-02 16:31:17 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *v_o = _PyEval_LoadName(tstate, frame, name);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (v_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            v = PyStackRef_FromPyObjectSteal(v_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = v;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-29 11:15:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_SMALL_INT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_SMALL_INT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-29 11:15:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_SMALL_INT);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(oparg < _PY_NSMALLPOSINTS);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *obj = (PyObject *)&_PyLong_SMALL_INTS[_PY_NSMALLNEGINTS + oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            value = PyStackRef_FromPyObjectImmortal(obj);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-18 12:17:46 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_SPECIAL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_SPECIAL;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-18 12:17:46 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_SPECIAL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef owner;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef attr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef self_or_null;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-18 12:17:46 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            owner = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(oparg <= SPECIAL_MAX);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *owner_o = PyStackRef_AsPyObjectSteal(owner);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-18 12:17:46 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *name = _Py_SpecialMethods[oparg].name;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *self_or_null_o;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 18:13:04 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *attr_o = _PyObject_LookupSpecialMethod(owner_o, name, &self_or_null_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 18:13:04 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (attr_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-18 12:17:46 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!_PyErr_Occurred(tstate)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-18 12:17:46 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyErr_Format(tstate, PyExc_TypeError,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                                  _Py_SpecialMethods[oparg].error,
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                                  Py_TYPE(owner_o)->tp_name);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-18 12:17:46 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-18 12:17:46 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 18:13:04 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            attr = PyStackRef_FromPyObjectSteal(attr_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            self_or_null = self_or_null_o == NULL ?
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_NULL : PyStackRef_FromPyObjectSteal(self_or_null_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = attr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[1] = self_or_null;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 2;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-18 12:17:46 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_SUPER_ATTR) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_SUPER_ATTR;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_SUPER_ATTR);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-22 09:22:25 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PREDICTED_LOAD_SUPER_ATTR:;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-09 14:54:39 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr - 2;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            opcode = LOAD_SUPER_ATTR;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef global_super_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef class_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef self_st;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef attr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef null = PyStackRef_NULL;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _SPECIALIZE_LOAD_SUPER_ATTR
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                class_st = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                global_super_st = stack_pointer[-3];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint16_t counter = read_u16(&this_instr[1].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                (void)counter;
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-03 09:32:26 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #if ENABLE_SPECIALIZATION_FT
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int load_method = oparg & 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (ADAPTIVE_COUNTER_TRIGGERS(counter)) {
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    next_instr = this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _Py_Specialize_LoadSuperAttr(global_super_st, class_st, next_instr, load_method);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH_SAME_OPARG();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-22 14:17:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                OPCODE_DEFERRED_INC(LOAD_SUPER_ATTR);
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                ADVANCE_ADAPTIVE_COUNTER(this_instr[1].counter);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-03 09:32:26 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #endif  /* ENABLE_SPECIALIZATION_FT */
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-09 10:50:09 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _LOAD_SUPER_ATTR
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                self_st = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *global_super = PyStackRef_AsPyObjectBorrow(global_super_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *class = PyStackRef_AsPyObjectBorrow(class_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *self = PyStackRef_AsPyObjectBorrow(self_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (opcode == INSTRUMENTED_LOAD_SUPER_ATTR) {
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyObject *arg = oparg & 2 ? class : &_PyInstrumentation_MISSING;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    int err = _Py_call_instrumentation_2args(
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        tstate, PY_MONITORING_EVENT_CALL,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        frame, this_instr, global_super, arg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (err) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        PyStackRef_CLOSE(global_super_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        PyStackRef_CLOSE(class_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        PyStackRef_CLOSE(self_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(pop_3_error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                // we make no attempt to optimize here; specializations should
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // handle any case whose performance we care about
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *stack[] = {class, self};
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *super = PyObject_Vectorcall(global_super, stack, oparg & 2, NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (opcode == INSTRUMENTED_LOAD_SUPER_ATTR) {
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyObject *arg = oparg & 2 ? class : &_PyInstrumentation_MISSING;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (super == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _Py_call_instrumentation_exc2(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            tstate, PY_MONITORING_EVENT_C_RAISE,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            frame, this_instr, global_super, arg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    else {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        int err = _Py_call_instrumentation_2args(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            tstate, PY_MONITORING_EVENT_C_RETURN,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                            frame, this_instr, global_super, arg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        if (err < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 14:00:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            Py_CLEAR(super);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 14:00:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        }
							 | 
						
					
						
							
								
									
										
										
										
											2023-04-12 12:04:55 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(global_super_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(class_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(self_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (super == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(pop_3_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *name = GETITEM(FRAME_CO_NAMES, oparg >> 2);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -3;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 18:13:04 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *attr_o = PyObject_GetAttr(super, name);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                Py_DECREF(super);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (attr_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 18:13:04 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                attr = PyStackRef_FromPyObjectSteal(attr_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 16:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _PUSH_NULL_CONDITIONAL
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                null = PyStackRef_NULL;
							 | 
						
					
						
							
								
									
										
										
										
											2023-04-12 12:04:55 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = attr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05: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());
							 | 
						
					
						
							
								
									
										
										
										
											2023-04-12 12:04:55 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_SUPER_ATTR_ATTR) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_SUPER_ATTR_ATTR;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_SUPER_ATTR_ATTR);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_LOAD_SUPER_ATTR == 1, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef global_super_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef class_st;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef self_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef attr_st;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            self_st = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            class_st = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            global_super_st = stack_pointer[-3];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *global_super = PyStackRef_AsPyObjectBorrow(global_super_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *class = PyStackRef_AsPyObjectBorrow(class_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *self = PyStackRef_AsPyObjectBorrow(self_st);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(!(oparg & 1));
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (global_super != (PyObject *)&PySuper_Type) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(LOAD_SUPER_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (LOAD_SUPER_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(LOAD_SUPER_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (!PyType_Check(class)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(LOAD_SUPER_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (LOAD_SUPER_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(LOAD_SUPER_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STAT_INC(LOAD_SUPER_ATTR, hit);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *name = GETITEM(FRAME_CO_NAMES, oparg >> 2);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *attr = _PySuper_Lookup((PyTypeObject *)class, self, name, NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(global_super_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(class_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(self_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (attr == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_3_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            attr_st = PyStackRef_FromPyObjectSteal(attr);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            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());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(LOAD_SUPER_ATTR_METHOD) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = LOAD_SUPER_ATTR_METHOD;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(LOAD_SUPER_ATTR_METHOD);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_LOAD_SUPER_ATTR == 1, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef global_super_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef class_st;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef self_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef attr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef self_or_null;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            self_st = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            class_st = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            global_super_st = stack_pointer[-3];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *global_super = PyStackRef_AsPyObjectBorrow(global_super_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *class = PyStackRef_AsPyObjectBorrow(class_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *self = PyStackRef_AsPyObjectBorrow(self_st);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(oparg & 1);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (global_super != (PyObject *)&PySuper_Type) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(LOAD_SUPER_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (LOAD_SUPER_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(LOAD_SUPER_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (!PyType_Check(class)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(LOAD_SUPER_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (LOAD_SUPER_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(LOAD_SUPER_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STAT_INC(LOAD_SUPER_ATTR, hit);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *name = GETITEM(FRAME_CO_NAMES, oparg >> 2);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyTypeObject *cls = (PyTypeObject *)class;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            int method_found = 0;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *attr_o = _PySuper_Lookup(cls, self, name,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                Py_TYPE(self)->tp_getattro == PyObject_GenericGetAttr ? &method_found : NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (attr_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-13 17:27:35 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (method_found) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                self_or_null = self_st; // transfer ownership
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            } else {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(self_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                self_or_null = PyStackRef_NULL;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-09 18:27:01 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-13 12:37:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(global_super_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(class_st);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            attr = PyStackRef_FromPyObjectSteal(attr_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00: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());
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-09 18:27:01 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(MAKE_CELL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = MAKE_CELL;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(MAKE_CELL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // "initial" is probably NULL but not if it's an arg (or set
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-01 13:59:35 +10:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // via the f_locals proxy before MAKE_CELL has run).
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *initial = PyStackRef_AsPyObjectBorrow(GETLOCAL(oparg));
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *cell = PyCell_New(initial);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (cell == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-12 10:23:59 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 14:00:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef tmp = GETLOCAL(oparg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            GETLOCAL(oparg) = PyStackRef_FromPyObjectSteal(cell);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_XCLOSE(tmp);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(MAKE_FUNCTION) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = MAKE_FUNCTION;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(MAKE_FUNCTION);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef codeobj_st;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef func;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            codeobj_st = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *codeobj = PyStackRef_AsPyObjectBorrow(codeobj_st);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyFunctionObject *func_obj = (PyFunctionObject *)
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyFunction_New(codeobj, GLOBALS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(codeobj_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (func_obj == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFunction_SetVersion(
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                                   func_obj, ((PyCodeObject *)codeobj)->co_version);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            func = PyStackRef_FromPyObjectSteal((PyObject *)func_obj);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = func;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(MAP_ADD) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = MAP_ADD;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(MAP_ADD);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef dict_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef key;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            key = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            dict_st = stack_pointer[-3 - (oparg - 1)];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *dict = PyStackRef_AsPyObjectBorrow(dict_st);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(PyDict_CheckExact(dict));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* dict[key] = value */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // Do not DECREF INPUTS because the function steals the references
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 14:14:52 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int err = _PyDict_SetItem_Take2(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                (PyDictObject *)dict,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_AsPyObjectSteal(key),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_AsPyObjectSteal(value)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            );
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (err != 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_2_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -2;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-07 06:49:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(MATCH_CLASS) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = MATCH_CLASS;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(MATCH_CLASS);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef subject;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef type;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef names;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef attrs;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            names = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            type = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            subject = stack_pointer[-3];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // Pop TOS and TOS1. Set TOS to a tuple of attributes on success, or
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // None on failure.
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(PyTuple_CheckExact(PyStackRef_AsPyObjectBorrow(names)));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *attrs_o = _PyEval_MatchClass(tstate,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_AsPyObjectBorrow(subject),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_AsPyObjectBorrow(type), oparg,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_AsPyObjectBorrow(names));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(subject);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(type);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(names);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (attrs_o) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(PyTuple_CheckExact(attrs_o));  // Success!
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                attrs = PyStackRef_FromPyObjectSteal(attrs_o);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            else {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (_PyErr_Occurred(tstate)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(pop_3_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                // Error!
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                attrs = PyStackRef_None;  // Failure!
							 | 
						
					
						
							
								
									
										
										
										
											2023-01-31 18:47:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-3] = attrs;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -2;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(MATCH_KEYS) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = MATCH_KEYS;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(MATCH_KEYS);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef subject;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef keys;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef values_or_none;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            keys = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            subject = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // On successful match, PUSH(values). Otherwise, PUSH(None).
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *values_or_none_o = _PyEval_MatchKeys(tstate,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_AsPyObjectBorrow(subject), PyStackRef_AsPyObjectBorrow(keys));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (values_or_none_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            values_or_none = PyStackRef_FromPyObjectSteal(values_or_none_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = values_or_none;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(MATCH_MAPPING) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = MATCH_MAPPING;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(MATCH_MAPPING);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef subject;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            subject = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int match = PyStackRef_TYPE(subject)->tp_flags & Py_TPFLAGS_MAPPING;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            res = match ? PyStackRef_True : PyStackRef_False;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(MATCH_SEQUENCE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = MATCH_SEQUENCE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(MATCH_SEQUENCE);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef subject;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            subject = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int match = PyStackRef_TYPE(subject)->tp_flags & Py_TPFLAGS_SEQUENCE;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            res = match ? PyStackRef_True : PyStackRef_False;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(NOP) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = NOP;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(NOP);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 16:59:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(NOT_TAKEN) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = NOT_TAKEN;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 16:59:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(NOT_TAKEN);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(POP_EXCEPT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = POP_EXCEPT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(POP_EXCEPT);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef exc_value;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            exc_value = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyErr_StackItem *exc_info = tstate->exc_info;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            Py_XSETREF(exc_info->exc_value,
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-22 17:55:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                       PyStackRef_IsNone(exc_value)
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                       ? NULL : PyStackRef_AsPyObjectSteal(exc_value));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-06 17:54:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(POP_ITER) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = POP_ITER;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-06 17:54:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(POP_ITER);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            value = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(value);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(POP_JUMP_IF_FALSE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = POP_JUMP_IF_FALSE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(POP_JUMP_IF_FALSE);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef cond;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-20 14:27:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            cond = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-25 18:32:43 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(PyStackRef_BoolCheck(cond));
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-22 17:55:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int flag = PyStackRef_IsFalse(cond);
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-04 11:13:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            RECORD_BRANCH_TAKEN(this_instr[1].cache, flag);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 16:59:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            JUMPBY(flag ? oparg : next_instr->op.code == NOT_TAKEN);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(POP_JUMP_IF_NONE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = POP_JUMP_IF_NONE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(POP_JUMP_IF_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef b;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef cond;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-20 14:27:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _IS_NONE
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-27 15:27:44 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                value = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-22 17:55:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (PyStackRef_IsNone(value)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    b = PyStackRef_True;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                else {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    b = PyStackRef_False;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(value);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-27 15:27:44 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _POP_JUMP_IF_TRUE
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-27 15:27:44 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                cond = b;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-25 18:32:43 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(PyStackRef_BoolCheck(cond));
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-22 17:55:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int flag = PyStackRef_IsTrue(cond);
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-04 11:13:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                RECORD_BRANCH_TAKEN(this_instr[1].cache, flag);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 16:59:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMPBY(flag ? oparg : next_instr->op.code == NOT_TAKEN);
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-27 15:27:44 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(POP_JUMP_IF_NOT_NONE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = POP_JUMP_IF_NOT_NONE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(POP_JUMP_IF_NOT_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef b;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef cond;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-20 14:27:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _IS_NONE
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-27 15:27:44 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                value = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-22 17:55:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (PyStackRef_IsNone(value)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    b = PyStackRef_True;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                else {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    b = PyStackRef_False;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_CLOSE(value);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-27 15:27:44 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _POP_JUMP_IF_FALSE
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-27 15:27:44 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                cond = b;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-25 18:32:43 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(PyStackRef_BoolCheck(cond));
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-22 17:55:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int flag = PyStackRef_IsFalse(cond);
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-04 11:13:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                RECORD_BRANCH_TAKEN(this_instr[1].cache, flag);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 16:59:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMPBY(flag ? oparg : next_instr->op.code == NOT_TAKEN);
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-27 15:27:44 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-10 11:40:35 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(POP_JUMP_IF_TRUE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = POP_JUMP_IF_TRUE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(POP_JUMP_IF_TRUE);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef cond;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-20 14:27:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            cond = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-25 18:32:43 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(PyStackRef_BoolCheck(cond));
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-22 17:55:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int flag = PyStackRef_IsTrue(cond);
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-04 11:13:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            RECORD_BRANCH_TAKEN(this_instr[1].cache, flag);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 16:59:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            JUMPBY(flag ? oparg : next_instr->op.code == NOT_TAKEN);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-10 11:40:35 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(POP_TOP) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = POP_TOP;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(POP_TOP);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(value);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(PUSH_EXC_INFO) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = PUSH_EXC_INFO;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(PUSH_EXC_INFO);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef exc;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef prev_exc;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef new_exc;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            exc = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyErr_StackItem *exc_info = tstate->exc_info;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (exc_info->exc_value != NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                prev_exc = PyStackRef_FromPyObjectSteal(exc_info->exc_value);
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-04 08:08:02 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            else {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                prev_exc = PyStackRef_None;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-04 08:08:02 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(PyStackRef_ExceptionInstanceCheck(exc));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            exc_info->exc_value = PyStackRef_AsPyObjectNew(exc);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            new_exc = exc;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00: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());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(PUSH_NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = PUSH_NULL;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(PUSH_NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-23 04:26:25 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            res = PyStackRef_NULL;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2023-04-12 12:04:55 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(RAISE_VARARGS) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = RAISE_VARARGS;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(RAISE_VARARGS);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *args;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            args = &stack_pointer[-oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(oparg < 3);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *cause = oparg == 2 ? PyStackRef_AsPyObjectSteal(args[1]) : NULL;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *exc = oparg > 0 ? PyStackRef_AsPyObjectSteal(args[0]) : NULL;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -oparg;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            int err = do_raise(tstate, exc, cause);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (err) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(oparg == 0);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                monitor_reraise(tstate, frame, this_instr);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 12:18:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(exception_unwind);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2023-02-08 11:40:10 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(RERAISE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = RERAISE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(RERAISE);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *values;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef exc_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            exc_st = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            values = &stack_pointer[-1 - oparg];
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *exc = PyStackRef_AsPyObjectSteal(exc_st);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(oparg >= 0 && oparg <= 2);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (oparg) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *lasti = PyStackRef_AsPyObjectBorrow(values[0]);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (PyLong_Check(lasti)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-04 11:13:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    frame->instr_ptr = _PyFrame_GetBytecode(frame) + PyLong_AsLong(lasti);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    assert(!_PyErr_Occurred(tstate));
							 | 
						
					
						
							
								
									
										
										
										
											2023-08-16 16:26:43 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                else {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyErr_SetString(tstate, PyExc_SystemError, "lasti is not an int");
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    Py_DECREF(exc);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-04 11:36:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(exc && PyExceptionInstance_Check(exc));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyErr_SetRaisedException(tstate, exc);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            monitor_reraise(tstate, frame, this_instr);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 12:18:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            JUMP_TO_LABEL(exception_unwind);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(RESERVED) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = RESERVED;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(RESERVED);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(0 && "Executing RESERVED instruction.");
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-20 09:39:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            Py_FatalError("Executing RESERVED instruction.");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(RESUME) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = RESUME;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(RESUME);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-22 09:22:25 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PREDICTED_RESUME:;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-09 14:54:39 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr - 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-04 11:13:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _LOAD_BYTECODE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #ifdef Py_GIL_DISABLED
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (frame->tlbc_index !=
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    ((_PyThreadStateImpl *)tstate)->tlbc_index) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _Py_CODEUNIT *bytecode =
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyEval_GetExecutableCode(tstate, _PyFrame_GetCode(frame));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (bytecode == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-05 04:12:31 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    ptrdiff_t off = this_instr - _PyFrame_GetBytecode(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-04 11:13:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    frame->tlbc_index = ((_PyThreadStateImpl *)tstate)->tlbc_index;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    frame->instr_ptr = bytecode + off;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    // Make sure this_instr gets reset correctley for any uops that
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    // follow
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    next_instr = frame->instr_ptr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _MAYBE_INSTRUMENT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (tstate->tracing == 0) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    uintptr_t global_version = _Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & ~_PY_EVAL_EVENTS_MASK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    uintptr_t code_version = FT_ATOMIC_LOAD_UINTPTR_ACQUIRE(_PyFrame_GetCode(frame)->_co_instrumentation_version);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (code_version != global_version) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        int err = _Py_Instrument(_PyFrame_GetCode(frame), tstate->interp);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        if (err) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        next_instr = this_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 22:46:33 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _QUICKEN_RESUME
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-04 11:13:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #if ENABLE_SPECIALIZATION_FT
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (tstate->tracing == 0 && this_instr->op.code == RESUME) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-01 11:34:50 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    FT_ATOMIC_STORE_UINT8_RELAXED(this_instr->op.code, RESUME_CHECK);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-04 11:13:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #endif  /* ENABLE_SPECIALIZATION_FT */
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-28 07:21:42 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PERIODIC_IF_NOT_YIELD_FROM
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if ((oparg & RESUME_OPARG_LOCATION_MASK) < RESUME_AFTER_YIELD_FROM) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    QSBR_QUIESCENT_STATE(tstate); \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        int err = _Py_HandlePending(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        if (err != 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-14 12:04:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-03 11:49:24 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(RESUME_CHECK) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = RESUME_CHECK;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(RESUME_CHECK);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(0 == 0, "incorrect cache size");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            #if defined(__EMSCRIPTEN__)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (_Py_emscripten_signal_clock == 0) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(RESUME);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (RESUME));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(RESUME);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-20 06:57:48 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            uintptr_t eval_breaker = _Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker);
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-19 14:47:42 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            uintptr_t version = FT_ATOMIC_LOAD_UINTPTR_ACQUIRE(_PyFrame_GetCode(frame)->_co_instrumentation_version);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert((version & _PY_EVAL_EVENTS_MASK) == 0);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (eval_breaker != version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(RESUME);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (RESUME));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(RESUME);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-04 11:13:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #ifdef Py_GIL_DISABLED
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (frame->tlbc_index !=
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                ((_PyThreadStateImpl *)tstate)->tlbc_index) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(RESUME);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (RESUME));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(RESUME);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-04 11:13:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(RETURN_GENERATOR) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = RETURN_GENERATOR;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(RETURN_GENERATOR);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2024-09-24 13:08:18 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(PyStackRef_FunctionCheck(frame->f_funcobj));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyFunctionObject *func = (PyFunctionObject *)PyStackRef_AsPyObjectBorrow(frame->f_funcobj);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyGenObject *gen = (PyGenObject *)_Py_MakeCoro(func);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (gen == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(EMPTY());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-24 10:23:38 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyInterpreterFrame *gen_frame = &gen->gi_iframe;
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-25 11:32:47 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr++;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_Copy(frame, gen_frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(frame->frame_obj == NULL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            gen->gi_frame_state = FRAME_CREATED;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            gen_frame->owner = FRAME_OWNED_BY_GENERATOR;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _Py_LeaveRecursiveCallPy(tstate);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyInterpreterFrame *prev = frame->previous;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyThreadState_PopFrame(tstate, frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            frame = tstate->current_frame = prev;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            LOAD_IP(frame->return_offset);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            res = PyStackRef_FromPyObjectSteal((PyObject *)gen);
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-25 11:32:47 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            LLTRACE_RESUME_FRAME();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-25 11:32:47 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(RETURN_VALUE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = RETURN_VALUE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(RETURN_VALUE);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef retval;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            retval = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-21 10:15:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(frame->owner != FRAME_OWNED_BY_INTERPRETER);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef temp = retval;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(EMPTY());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_LeaveRecursiveCallPy(tstate);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // GH-99729: We need to unlink the frame *before* clearing it:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyInterpreterFrame *dying = frame;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            frame = tstate->current_frame = dying->previous;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyEval_FrameClearAndPop(tstate, dying);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            LOAD_IP(frame->return_offset);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            res = temp;
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-25 11:32:47 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            LLTRACE_RESUME_FRAME();
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-17 14:40:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-22 09:48:19 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(SEND) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = SEND;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(SEND);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-22 09:22:25 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PREDICTED_SEND:;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-09 14:54:39 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr - 2;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef receiver;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef v;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef retval;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _SPECIALIZE_SEND
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                receiver = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint16_t counter = read_u16(&this_instr[1].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                (void)counter;
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-03 10:25:12 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #if ENABLE_SPECIALIZATION_FT
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (ADAPTIVE_COUNTER_TRIGGERS(counter)) {
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    next_instr = this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _Py_Specialize_Send(receiver, next_instr);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH_SAME_OPARG();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-22 14:17:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                OPCODE_DEFERRED_INC(SEND);
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                ADVANCE_ADAPTIVE_COUNTER(this_instr[1].counter);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-03 10:25:12 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #endif  /* ENABLE_SPECIALIZATION_FT */
							 | 
						
					
						
							
								
									
										
										
										
											2023-02-08 11:40:10 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _SEND
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                v = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *receiver_o = PyStackRef_AsPyObjectBorrow(receiver);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *retval_o;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-21 10:15:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(frame->owner != FRAME_OWNED_BY_INTERPRETER);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if ((tstate->interp->eval_frame == NULL) &&
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    (Py_TYPE(receiver_o) == &PyGen_Type || Py_TYPE(receiver_o) == &PyCoro_Type) &&
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    ((PyGenObject *)receiver_o)->gi_frame_state < FRAME_EXECUTING)
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyGenObject *gen = (PyGenObject *)receiver_o;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-24 10:23:38 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyInterpreterFrame *gen_frame = &gen->gi_iframe;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    STACK_SHRINK(1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_StackPush(gen_frame, v);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    gen->gi_frame_state = FRAME_EXECUTING;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    gen->gi_exc_state.previous_item = tstate->exc_info;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    tstate->exc_info = &gen->gi_exc_state;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-29 18:25:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    assert( 2 + oparg <= UINT16_MAX);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    frame->return_offset = (uint16_t)( 2 + oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    assert(gen_frame->previous == NULL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    gen_frame->previous = frame;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH_INLINED(gen_frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-22 17:55:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (PyStackRef_IsNone(v) && PyIter_Check(receiver_o)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    retval_o = Py_TYPE(receiver_o)->tp_iternext(receiver_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                else {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    retval_o = PyObject_CallMethodOneArg(receiver_o,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        &_Py_ID(send),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        PyStackRef_AsPyObjectBorrow(v));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (retval_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    int matches = _PyErr_ExceptionMatches(tstate, PyExc_StopIteration);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (matches) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-29 12:17:47 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        _PyEval_MonitorRaise(tstate, frame, this_instr);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    int err = _PyGen_FetchStopIterationValue(&retval_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-06 08:40:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (err == 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        assert(retval_o != NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMPBY(oparg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    else {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        PyStackRef_CLOSE(v);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_LABEL(pop_1_error);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(v);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                retval = PyStackRef_FromPyObjectSteal(retval_o);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = retval;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(SEND_GEN) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = SEND_GEN;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 14:24:58 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(SEND_GEN);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_SEND == 1, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef receiver;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef v;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 14:24:58 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyInterpreterFrame *gen_frame;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyInterpreterFrame *new_frame;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 14:24:58 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _CHECK_PEP_523
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (tstate->interp->eval_frame) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(SEND);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (SEND));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(SEND);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 14:24:58 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _SEND_GEN_FRAME
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                v = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                receiver = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 14:24:58 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyGenObject *gen = (PyGenObject *)PyStackRef_AsPyObjectBorrow(receiver);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (Py_TYPE(gen) != &PyGen_Type && Py_TYPE(gen) != &PyCoro_Type) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(SEND);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (SEND));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(SEND);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (gen->gi_frame_state >= FRAME_EXECUTING) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(SEND);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (SEND));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(SEND);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 14:24:58 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(SEND, hit);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                gen_frame = &gen->gi_iframe;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_StackPush(gen_frame, v);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                gen->gi_frame_state = FRAME_EXECUTING;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                gen->gi_exc_state.previous_item = tstate->exc_info;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                tstate->exc_info = &gen->gi_exc_state;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-29 18:25:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert( 2 + oparg <= UINT16_MAX);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                frame->return_offset = (uint16_t)( 2 + oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                gen_frame->previous = frame;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 14:24:58 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _PUSH_FRAME
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                new_frame = gen_frame;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 14:24:58 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                // Write it out explicitly because it's subtly different.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Eventually this should be the only occurrence of this code.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(tstate->interp->eval_frame == NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyInterpreterFrame *temp = new_frame;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 14:24:58 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-20 16:52:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(new_frame->previous == frame || new_frame->previous->previous == frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 14:24:58 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                CALL_STAT_INC(inlined_py_calls);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                frame = tstate->current_frame = temp;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 14:24:58 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                tstate->py_recursion_remaining--;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LOAD_SP();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LOAD_IP(0);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                LLTRACE_RESUME_FRAME();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(SETUP_ANNOTATIONS) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = SETUP_ANNOTATIONS;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(SETUP_ANNOTATIONS);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *ann_dict;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (LOCALS() == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyErr_Format(tstate, PyExc_SystemError,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                              "no locals found when setting up annotations");
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2023-02-08 11:40:10 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* check if __annotations__ in locals()... */
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            int err = PyMapping_GetOptionalItem(LOCALS(), &_Py_ID(__annotations__), &ann_dict);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (err < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (ann_dict == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                ann_dict = PyDict_New();
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (ann_dict == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                err = PyObject_SetItem(LOCALS(), &_Py_ID(__annotations__),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                                       ann_dict);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                Py_DECREF(ann_dict);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (err) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            else {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                Py_DECREF(ann_dict);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(SET_ADD) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = SET_ADD;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(SET_ADD);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef set;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef v;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            v = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            set = stack_pointer[-2 - (oparg-1)];
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int err = PySet_Add(PyStackRef_AsPyObjectBorrow(set),
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-29 02:14:48 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                                PyStackRef_AsPyObjectBorrow(v));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(v);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (err) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_1_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(SET_FUNCTION_ATTRIBUTE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = SET_FUNCTION_ATTRIBUTE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(SET_FUNCTION_ATTRIBUTE);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef attr_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef func_in;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef func_out;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            func_in = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            attr_st = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *func = PyStackRef_AsPyObjectBorrow(func_in);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *attr = PyStackRef_AsPyObjectSteal(attr_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            func_out = func_in;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(PyFunction_Check(func));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            size_t offset = _Py_FunctionAttributeOffsets[oparg];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(offset != 0);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject **ptr = (PyObject **)(((char *)func) + offset);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(*ptr == NULL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            *ptr = attr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-2] = func_out;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(SET_UPDATE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = SET_UPDATE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(SET_UPDATE);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef set;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef iterable;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            iterable = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            set = stack_pointer[-2 - (oparg-1)];
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int err = _PySet_Update(PyStackRef_AsPyObjectBorrow(set),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                                    PyStackRef_AsPyObjectBorrow(iterable));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(iterable);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (err < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_1_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(STORE_ATTR) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = STORE_ATTR;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 5;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(STORE_ATTR);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-22 09:22:25 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PREDICTED_STORE_ATTR:;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-09 14:54:39 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr - 5;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef owner;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef v;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _SPECIALIZE_STORE_ATTR
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                owner = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint16_t counter = read_u16(&this_instr[1].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                (void)counter;
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 10:21:17 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #if ENABLE_SPECIALIZATION_FT
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (ADAPTIVE_COUNTER_TRIGGERS(counter)) {
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyObject *name = GETITEM(FRAME_CO_NAMES, oparg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    next_instr = this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _Py_Specialize_StoreAttr(owner, next_instr, name);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH_SAME_OPARG();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-22 14:17:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                OPCODE_DEFERRED_INC(STORE_ATTR);
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                ADVANCE_ADAPTIVE_COUNTER(this_instr[1].counter);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 10:21:17 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #endif  /* ENABLE_SPECIALIZATION_FT */
							 | 
						
					
						
							
								
									
										
										
										
											2023-02-08 11:40:10 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-20 14:27:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 3 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _STORE_ATTR
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                v = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *name = GETITEM(FRAME_CO_NAMES, oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int err = PyObject_SetAttr(PyStackRef_AsPyObjectBorrow(owner),
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-29 02:14:48 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                                       name, PyStackRef_AsPyObjectBorrow(v));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(v);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(owner);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (err) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(pop_2_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -2;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(STORE_ATTR_INSTANCE_VALUE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = STORE_ATTR_INSTANCE_VALUE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 5;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(STORE_ATTR_INSTANCE_VALUE);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_STORE_ATTR == 4, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef owner;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 10:21:17 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_TYPE_VERSION_AND_LOCK
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                owner = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint32_t type_version = read_u32(&this_instr[2].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 10:21:17 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(type_version != 0);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!LOCK_OBJECT(owner_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(STORE_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (STORE_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(STORE_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 10:21:17 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyTypeObject *tp = Py_TYPE(owner_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UNLOCK_OBJECT(owner_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (true) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        UPDATE_MISS_STATS(STORE_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        assert(_PyOpcode_Deopt[opcode] == (STORE_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_PREDICTED(STORE_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 10:21:17 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-02 11:59:21 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_DORV_NO_DICT
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(Py_TYPE(owner_o)->tp_dictoffset < 0);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(Py_TYPE(owner_o)->tp_flags & Py_TPFLAGS_INLINE_VALUES);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 10:21:17 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (_PyObject_GetManagedDict(owner_o) ||
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    !FT_ATOMIC_LOAD_UINT8(_PyObject_InlineValues(owner_o)->valid)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UNLOCK_OBJECT(owner_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (true) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        UPDATE_MISS_STATS(STORE_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        assert(_PyOpcode_Deopt[opcode] == (STORE_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_PREDICTED(STORE_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 10:21:17 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _STORE_ATTR_INSTANCE_VALUE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                value = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-21 15:52:04 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint16_t offset = read_u16(&this_instr[4].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(STORE_ATTR, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(_PyObject_GetManagedDict(owner_o) == NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-21 15:52:04 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject **value_ptr = (PyObject**)(((char *)owner_o) + offset);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *old_value = *value_ptr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 10:21:17 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                FT_ATOMIC_STORE_PTR_RELEASE(*value_ptr, PyStackRef_AsPyObjectSteal(value));
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (old_value == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-21 15:52:04 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyDictValues *values = _PyObject_InlineValues(owner_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-23 22:35:25 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    Py_ssize_t index = value_ptr - values->values;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyDictValues_AddToInsertionOrder(values, index);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 10:21:17 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                UNLOCK_OBJECT(owner_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(owner);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                Py_XDECREF(old_value);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(STORE_ATTR_SLOT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = STORE_ATTR_SLOT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 5;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(STORE_ATTR_SLOT);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_STORE_ATTR == 4, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef owner;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_TYPE_VERSION
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                owner = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint32_t type_version = read_u32(&this_instr[2].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner));
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(type_version != 0);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(STORE_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (STORE_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(STORE_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-02-08 11:40:10 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _STORE_ATTR_SLOT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                value = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint16_t index = read_u16(&this_instr[4].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (!LOCK_OBJECT(owner_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(STORE_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (STORE_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(STORE_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                char *addr = (char *)owner_o + index;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(STORE_ATTR, hit);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *old_value = *(PyObject **)addr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 10:21:17 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                FT_ATOMIC_STORE_PTR_RELEASE(*(PyObject **)addr, PyStackRef_AsPyObjectSteal(value));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UNLOCK_OBJECT(owner_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(owner);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                Py_XDECREF(old_value);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(STORE_ATTR_WITH_HINT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = STORE_ATTR_WITH_HINT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 5;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(STORE_ATTR_WITH_HINT);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_STORE_ATTR == 4, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef owner;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-28 12:47:54 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_TYPE_VERSION
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                owner = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-28 12:47:54 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint32_t type_version = read_u32(&this_instr[2].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner));
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-28 12:47:54 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(type_version != 0);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(STORE_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (STORE_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(STORE_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-28 12:47:54 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _STORE_ATTR_WITH_HINT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                value = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-28 12:47:54 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint16_t hint = read_u16(&this_instr[4].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(Py_TYPE(owner_o)->tp_flags & Py_TPFLAGS_MANAGED_DICT);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyDictObject *dict = _PyObject_GetManagedDict(owner_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (dict == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(STORE_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (STORE_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(STORE_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (!LOCK_OBJECT(dict)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(STORE_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (STORE_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(STORE_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 10:21:17 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #ifdef Py_GIL_DISABLED
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (dict != _PyObject_GetManagedDict(owner_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UNLOCK_OBJECT(dict);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (true) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        UPDATE_MISS_STATS(STORE_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        assert(_PyOpcode_Deopt[opcode] == (STORE_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_PREDICTED(STORE_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 10:21:17 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #endif
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-28 12:47:54 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(PyDict_CheckExact((PyObject *)dict));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *name = GETITEM(FRAME_CO_NAMES, oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 10:21:17 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (hint >= (size_t)dict->ma_keys->dk_nentries ||
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    !DK_IS_UNICODE(dict->ma_keys)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UNLOCK_OBJECT(dict);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (true) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        UPDATE_MISS_STATS(STORE_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        assert(_PyOpcode_Deopt[opcode] == (STORE_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_PREDICTED(STORE_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 10:21:17 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-05 16:27:48 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyDictUnicodeEntry *ep = DK_UNICODE_ENTRIES(dict->ma_keys) + hint;
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 10:21:17 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (ep->me_key != name) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UNLOCK_OBJECT(dict);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (true) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        UPDATE_MISS_STATS(STORE_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        assert(_PyOpcode_Deopt[opcode] == (STORE_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_PREDICTED(STORE_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 10:21:17 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-24 11:57:02 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *old_value = ep->me_value;
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 10:21:17 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (old_value == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UNLOCK_OBJECT(dict);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    if (true) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        UPDATE_MISS_STATS(STORE_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        assert(_PyOpcode_Deopt[opcode] == (STORE_ATTR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        JUMP_TO_PREDICTED(STORE_ATTR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    }
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 10:21:17 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-24 11:57:02 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyDict_NotifyEvent(tstate->interp, PyDict_EVENT_MODIFIED, dict, name, PyStackRef_AsPyObjectBorrow(value));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-19 10:21:17 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                FT_ATOMIC_STORE_PTR_RELEASE(ep->me_value, PyStackRef_AsPyObjectSteal(value));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UNLOCK_OBJECT(dict);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-22 23:49:09 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                // old_value should be DECREFed after GC track checking is done, if not, it could raise a segmentation fault,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // when dict only holds the strong reference to value in ep->me_value.
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-28 12:47:54 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                STAT_INC(STORE_ATTR, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer += -2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(owner);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                Py_XDECREF(old_value);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(STORE_DEREF) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = STORE_DEREF;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(STORE_DEREF);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef v;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            v = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyCellObject *cell = (PyCellObject *)PyStackRef_AsPyObjectBorrow(GETLOCAL(oparg));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyCell_SetTakeRef(cell, PyStackRef_AsPyObjectSteal(v));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(STORE_FAST) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = STORE_FAST;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(STORE_FAST);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 14:00:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef tmp = GETLOCAL(oparg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            GETLOCAL(oparg) = value;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 14:00:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_XCLOSE(tmp);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(STORE_FAST_LOAD_FAST) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = STORE_FAST_LOAD_FAST;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(STORE_FAST_LOAD_FAST);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value2;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value1 = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            uint32_t oparg1 = oparg >> 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            uint32_t oparg2 = oparg & 15;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 14:00:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef tmp = GETLOCAL(oparg1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            GETLOCAL(oparg1) = value1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value2 = PyStackRef_DUP(GETLOCAL(oparg2));
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = value2;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 14:00:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_XCLOSE(tmp);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-13 10:25:45 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(STORE_FAST_STORE_FAST) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = STORE_FAST_STORE_FAST;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(STORE_FAST_STORE_FAST);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value2;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value1 = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            value2 = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            uint32_t oparg1 = oparg >> 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            uint32_t oparg2 = oparg & 15;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 14:00:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef tmp = GETLOCAL(oparg1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            GETLOCAL(oparg1) = value1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 14:00:51 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_XCLOSE(tmp);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            tmp = GETLOCAL(oparg2);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            GETLOCAL(oparg2) = value2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_XCLOSE(tmp);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-13 10:25:45 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(STORE_GLOBAL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = STORE_GLOBAL;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(STORE_GLOBAL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef v;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            v = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *name = GETITEM(FRAME_CO_NAMES, oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int err = PyDict_SetItem(GLOBALS(), name, PyStackRef_AsPyObjectBorrow(v));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(v);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (err) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_1_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(STORE_NAME) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = STORE_NAME;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(STORE_NAME);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef v;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            v = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *name = GETITEM(FRAME_CO_NAMES, oparg);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *ns = LOCALS();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            int err;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (ns == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyErr_Format(tstate, PyExc_SystemError,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                              "no locals found when storing %R", name);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(v);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_1_error);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (PyDict_CheckExact(ns)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                err = PyDict_SetItem(ns, name, PyStackRef_AsPyObjectBorrow(v));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                err = PyObject_SetItem(ns, name, PyStackRef_AsPyObjectBorrow(v));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(v);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (err) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_1_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2023-04-12 12:04:55 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(STORE_SLICE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = STORE_SLICE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(STORE_SLICE);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef v;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef container;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef start;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef stop;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-27 10:49:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _SPECIALIZE_STORE_SLICE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                // Placeholder until we implement STORE_SLICE specialization
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #if ENABLE_SPECIALIZATION
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                OPCODE_DEFERRED_INC(STORE_SLICE);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                #endif  /* ENABLE_SPECIALIZATION */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _STORE_SLICE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stop = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                start = stack_pointer[-2];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                container = stack_pointer[-3];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                v = stack_pointer[-4];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-27 10:49:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyObject *slice = _PyBuildSlice_ConsumeRefs(PyStackRef_AsPyObjectSteal(start),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_AsPyObjectSteal(stop));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-27 10:49:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int err;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (slice == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    err = 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                else {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += -2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-27 10:49:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    err = PyObject_SetItem(PyStackRef_AsPyObjectBorrow(container), slice, PyStackRef_AsPyObjectBorrow(v));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    Py_DECREF(slice);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-27 10:49:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(v);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(container);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (err) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(pop_4_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -4;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(STORE_SUBSCR) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = STORE_SUBSCR;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(STORE_SUBSCR);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-22 09:22:25 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PREDICTED_STORE_SUBSCR:;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-09 14:54:39 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr - 2;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef container;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef sub;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef v;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _SPECIALIZE_STORE_SUBSCR
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                sub = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                container = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint16_t counter = read_u16(&this_instr[1].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                (void)counter;
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-26 21:46:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #if ENABLE_SPECIALIZATION_FT
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (ADAPTIVE_COUNTER_TRIGGERS(counter)) {
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    next_instr = this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _Py_Specialize_StoreSubscr(container, sub, next_instr);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH_SAME_OPARG();
							 | 
						
					
						
							
								
									
										
										
										
											2023-04-12 12:04:55 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-22 14:17:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                OPCODE_DEFERRED_INC(STORE_SUBSCR);
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                ADVANCE_ADAPTIVE_COUNTER(this_instr[1].counter);
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-26 21:46:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #endif  /* ENABLE_SPECIALIZATION_FT */
							 | 
						
					
						
							
								
									
										
										
										
											2023-04-12 12:04:55 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _STORE_SUBSCR
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                v = stack_pointer[-3];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                /* container[sub] = v */
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-29 02:14:48 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int err = PyObject_SetItem(PyStackRef_AsPyObjectBorrow(container), PyStackRef_AsPyObjectBorrow(sub), PyStackRef_AsPyObjectBorrow(v));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(v);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(container);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(sub);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (err) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(pop_3_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -3;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							
								
									
										
										
										
											2023-04-30 21:08:26 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(STORE_SUBSCR_DICT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = STORE_SUBSCR_DICT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(STORE_SUBSCR_DICT);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_STORE_SUBSCR == 1, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef dict_st;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-07 09:36:19 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef sub;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-07 09:36:19 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            sub = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            dict_st = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = stack_pointer[-3];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *dict = PyStackRef_AsPyObjectBorrow(dict_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!PyDict_CheckExact(dict)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(STORE_SUBSCR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (STORE_SUBSCR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(STORE_SUBSCR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STAT_INC(STORE_SUBSCR, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-07 09:36:19 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int err = _PyDict_SetItem_Take2((PyDictObject *)dict,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_AsPyObjectSteal(sub),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_AsPyObjectSteal(value));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -3;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(dict_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (err) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(STORE_SUBSCR_LIST_INT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = STORE_SUBSCR_LIST_INT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(STORE_SUBSCR_LIST_INT);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_STORE_SUBSCR == 1, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef list_st;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef sub_st;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            sub_st = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            list_st = stack_pointer[-2];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = stack_pointer[-3];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *list = PyStackRef_AsPyObjectBorrow(list_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!PyLong_CheckExact(sub)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(STORE_SUBSCR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (STORE_SUBSCR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(STORE_SUBSCR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (!PyList_CheckExact(list)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(STORE_SUBSCR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (STORE_SUBSCR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(STORE_SUBSCR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // Ensure nonnegative, zero-or-one-digit ints.
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!_PyLong_IsNonNegativeCompact((PyLongObject *)sub)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(STORE_SUBSCR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (STORE_SUBSCR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(STORE_SUBSCR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            Py_ssize_t index = ((PyLongObject*)sub)->long_value.ob_digit[0];
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!LOCK_OBJECT(list)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(STORE_SUBSCR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (STORE_SUBSCR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(STORE_SUBSCR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // Ensure index < len(list)
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-26 21:46:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (index >= PyList_GET_SIZE(list)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UNLOCK_OBJECT(list);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (true) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(STORE_SUBSCR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (STORE_SUBSCR));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(STORE_SUBSCR);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-26 21:46:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STAT_INC(STORE_SUBSCR, hit);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *old_value = PyList_GET_ITEM(list, index);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyList_SET_ITEM(list, index, PyStackRef_AsPyObjectSteal(value));
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(old_value != NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-26 21:46:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            UNLOCK_OBJECT(list);  // unlock before decrefs!
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-13 11:06:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE_SPECIALIZED(sub_st, _PyLong_ExactDealloc);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -3;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(list_st);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            Py_DECREF(old_value);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(SWAP) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = SWAP;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(SWAP);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *bottom;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *top;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            top = &stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            bottom = &stack_pointer[-2 - (oparg-2)];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef temp = bottom[0];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            bottom[0] = top[0];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            top[0] = temp;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(oparg >= 2);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(TO_BOOL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = TO_BOOL;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(TO_BOOL);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-22 09:22:25 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PREDICTED_TO_BOOL:;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-09 14:54:39 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr - 4;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _SPECIALIZE_TO_BOOL
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                value = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint16_t counter = read_u16(&this_instr[1].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                (void)counter;
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-22 07:52:16 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #if ENABLE_SPECIALIZATION_FT
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (ADAPTIVE_COUNTER_TRIGGERS(counter)) {
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    next_instr = this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _Py_Specialize_ToBool(value, next_instr);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH_SAME_OPARG();
							 | 
						
					
						
							
								
									
										
										
										
											2023-04-30 21:08:26 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-22 14:17:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                OPCODE_DEFERRED_INC(TO_BOOL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                ADVANCE_ADAPTIVE_COUNTER(this_instr[1].counter);
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-22 07:52:16 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #endif  /* ENABLE_SPECIALIZATION_FT */
							 | 
						
					
						
							
								
									
										
										
										
											2023-04-12 12:04:55 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-20 14:27:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _TO_BOOL
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int err = PyObject_IsTrue(PyStackRef_AsPyObjectBorrow(value));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(value);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (err < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(pop_1_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = err ? PyStackRef_True : PyStackRef_False;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = res;
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(TO_BOOL_ALWAYS_TRUE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = TO_BOOL_ALWAYS_TRUE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-28 16:10:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(TO_BOOL_ALWAYS_TRUE);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_TO_BOOL == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef owner;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-05 15:23:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _GUARD_TYPE_VERSION
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                owner = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-05 15:23:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint32_t type_version = read_u32(&this_instr[2].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyTypeObject *tp = Py_TYPE(PyStackRef_AsPyObjectBorrow(owner));
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-05 15:23:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(type_version != 0);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(TO_BOOL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (TO_BOOL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(TO_BOOL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-05 15:23:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // _REPLACE_WITH_TRUE
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                value = owner;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(value);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_True;
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-05 15:23:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(TO_BOOL_BOOL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = TO_BOOL_BOOL;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(TO_BOOL_BOOL);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_TO_BOOL == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!PyStackRef_BoolCheck(value)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(TO_BOOL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (TO_BOOL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(TO_BOOL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STAT_INC(TO_BOOL, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-13 09:51:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(TO_BOOL_INT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = TO_BOOL_INT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(TO_BOOL_INT);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_TO_BOOL == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *value_o = PyStackRef_AsPyObjectBorrow(value);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!PyLong_CheckExact(value_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(TO_BOOL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (TO_BOOL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(TO_BOOL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STAT_INC(TO_BOOL, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (_PyLong_IsZero((PyLongObject *)value_o)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-10 18:19:08 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(_Py_IsImmortal(value_o));
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_False;
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-13 09:51:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            else {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(value);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_True;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = res;
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(TO_BOOL_LIST) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = TO_BOOL_LIST;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(TO_BOOL_LIST);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_TO_BOOL == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *value_o = PyStackRef_AsPyObjectBorrow(value);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!PyList_CheckExact(value_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(TO_BOOL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (TO_BOOL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(TO_BOOL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STAT_INC(TO_BOOL, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-22 07:52:16 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            res = PyList_GET_SIZE(value_o) ? PyStackRef_True : PyStackRef_False;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(value);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TARGET(TO_BOOL_NONE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = TO_BOOL_NONE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-26 14:43:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(TO_BOOL_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_TO_BOOL == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // This one is a bit weird, because we expect *some* failures:
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!PyStackRef_IsNone(value)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(TO_BOOL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (TO_BOOL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(TO_BOOL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STAT_INC(TO_BOOL, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            res = PyStackRef_False;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(TO_BOOL_STR) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = TO_BOOL_STR;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 4;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(TO_BOOL_STR);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_TO_BOOL == 3, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Skip 2 cache entries */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *value_o = PyStackRef_AsPyObjectBorrow(value);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!PyUnicode_CheckExact(value_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(TO_BOOL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (TO_BOOL));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(TO_BOOL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STAT_INC(TO_BOOL, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (value_o == &_Py_STR(empty)) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-10 18:19:08 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(_Py_IsImmortal(value_o));
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_False;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            else {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                assert(Py_SIZE(value_o));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(value);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                res = PyStackRef_True;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = res;
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(UNARY_INVERT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = UNARY_INVERT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(UNARY_INVERT);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-08-04 09:35:56 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *res_o = PyNumber_Invert(PyStackRef_AsPyObjectBorrow(value));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(value);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_1_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-14 16:15:08 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(UNARY_NEGATIVE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = UNARY_NEGATIVE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(UNARY_NEGATIVE);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-08-04 09:35:56 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *res_o = PyNumber_Negative(PyStackRef_AsPyObjectBorrow(value));
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(value);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_1_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-14 16:15:08 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(UNARY_NOT) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = UNARY_NOT;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(UNARY_NOT);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-25 18:32:43 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(PyStackRef_BoolCheck(value));
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-22 17:55:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            res = PyStackRef_IsFalse(value)
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            ? PyStackRef_True : PyStackRef_False;
							 | 
						
					
						
							
								
									
										
										
										
											2023-06-14 16:15:08 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = res;
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(UNPACK_EX) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = UNPACK_EX;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(UNPACK_EX);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef seq;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *right;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            seq = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            right = &stack_pointer[(oparg & 0xFF)];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *top = right + (oparg >> 8);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int res = _PyEval_UnpackIterableStackRef(tstate, seq, oparg & 0xFF, oparg >> 8, top);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(seq);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (res == 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(pop_1_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00: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());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(UNPACK_SEQUENCE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = UNPACK_SEQUENCE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(UNPACK_SEQUENCE);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-22 09:22:25 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PREDICTED_UNPACK_SEQUENCE:;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-09 14:54:39 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr - 2;
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef seq;
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *output;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _SPECIALIZE_UNPACK_SEQUENCE
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                seq = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                uint16_t counter = read_u16(&this_instr[1].cache);
							 | 
						
					
						
							
								
									
										
										
										
											2024-02-29 18:53:32 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                (void)counter;
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-22 19:00:35 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #if ENABLE_SPECIALIZATION_FT
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (ADAPTIVE_COUNTER_TRIGGERS(counter)) {
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    next_instr = this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _Py_Specialize_UnpackSequence(seq, next_instr, oparg);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    DISPATCH_SAME_OPARG();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-22 14:17:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                OPCODE_DEFERRED_INC(UNPACK_SEQUENCE);
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-04 08:03:27 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                ADVANCE_ADAPTIVE_COUNTER(this_instr[1].counter);
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-22 19:00:35 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                #endif  /* ENABLE_SPECIALIZATION_FT */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                (void)seq;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                (void)counter;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            // _UNPACK_SEQUENCE
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 10:53:27 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            {
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-01 09:27:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                output = &stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef *top = output + oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                int res = _PyEval_UnpackIterableStackRef(tstate, seq, oparg, -1, top);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_CLOSE(seq);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (res == 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(pop_1_error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1 + oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-17 11:36:57 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(UNPACK_SEQUENCE_LIST) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = UNPACK_SEQUENCE_LIST;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 13:21:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(UNPACK_SEQUENCE_LIST);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_UNPACK_SEQUENCE == 1, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef seq;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *values;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            seq = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            values = &stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *seq_o = PyStackRef_AsPyObjectBorrow(seq);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!PyList_CheckExact(seq_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(UNPACK_SEQUENCE);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (UNPACK_SEQUENCE));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(UNPACK_SEQUENCE);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (!LOCK_OBJECT(seq_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(UNPACK_SEQUENCE);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (UNPACK_SEQUENCE));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(UNPACK_SEQUENCE);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-22 19:00:35 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (PyList_GET_SIZE(seq_o) != oparg) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-03 00:14:40 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                UNLOCK_OBJECT(seq_o);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (true) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    UPDATE_MISS_STATS(UNPACK_SEQUENCE);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    assert(_PyOpcode_Deopt[opcode] == (UNPACK_SEQUENCE));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_PREDICTED(UNPACK_SEQUENCE);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2024-11-22 19:00:35 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STAT_INC(UNPACK_SEQUENCE, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject **items = _PyList_ITEMS(seq_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            for (int i = oparg; --i >= 0; ) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                *values++ = PyStackRef_FromPyObjectNew(items[i]);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-03 00:14:40 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            UNLOCK_OBJECT(seq_o);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(seq);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1 + oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-04-12 12:04:55 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(UNPACK_SEQUENCE_TUPLE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = UNPACK_SEQUENCE_TUPLE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(UNPACK_SEQUENCE_TUPLE);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_UNPACK_SEQUENCE == 1, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef seq;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *values;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            seq = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            values = &stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *seq_o = PyStackRef_AsPyObjectBorrow(seq);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!PyTuple_CheckExact(seq_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(UNPACK_SEQUENCE);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (UNPACK_SEQUENCE));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(UNPACK_SEQUENCE);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (PyTuple_GET_SIZE(seq_o) != oparg) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(UNPACK_SEQUENCE);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (UNPACK_SEQUENCE));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(UNPACK_SEQUENCE);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STAT_INC(UNPACK_SEQUENCE, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject **items = _PyTuple_ITEMS(seq_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            for (int i = oparg; --i >= 0; ) {
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                *values++ = PyStackRef_FromPyObjectNew(items[i]);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(seq);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1 + oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-04-12 12:04:55 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(UNPACK_SEQUENCE_TWO_TUPLE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = UNPACK_SEQUENCE_TWO_TUPLE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _Py_CODEUNIT* const this_instr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            (void)this_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr += 2;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(UNPACK_SEQUENCE_TWO_TUPLE);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            static_assert(INLINE_CACHE_ENTRIES_UNPACK_SEQUENCE == 1, "incorrect cache size");
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef seq;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef val1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef val0;
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-18 13:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* Skip 1 cache entry */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            seq = stack_pointer[-1];
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-11 09:30:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(oparg == 2);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *seq_o = PyStackRef_AsPyObjectBorrow(seq);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (!PyTuple_CheckExact(seq_o)) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(UNPACK_SEQUENCE);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (UNPACK_SEQUENCE));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(UNPACK_SEQUENCE);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (PyTuple_GET_SIZE(seq_o) != 2) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                UPDATE_MISS_STATS(UNPACK_SEQUENCE);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyOpcode_Deopt[opcode] == (UNPACK_SEQUENCE));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_PREDICTED(UNPACK_SEQUENCE);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STAT_INC(UNPACK_SEQUENCE, hit);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            val0 = PyStackRef_FromPyObjectNew(PyTuple_GET_ITEM(seq_o, 0));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            val1 = PyStackRef_FromPyObjectNew(PyTuple_GET_ITEM(seq_o, 1));
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-07 13:23:53 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyStackRef_CLOSE(seq);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[-1] = val1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = val0;
							 | 
						
					
						
							
								
									
										
										
										
											2024-03-11 09:30:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-04-12 12:04:55 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(WITH_EXCEPT_START) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = WITH_EXCEPT_START;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(WITH_EXCEPT_START);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef exit_func;
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-18 12:49:24 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef exit_self;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef lasti;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef val;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef res;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            val = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            lasti = stack_pointer[-3];
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-18 12:17:46 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            exit_self = stack_pointer[-4];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            exit_func = stack_pointer[-5];
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* At the top of the stack are 4 values:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               - val: TOP = exc_info()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               - unused: SECOND = previous exception
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               - lasti: THIRD = lasti of exception in exc_info()
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-18 12:17:46 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								               - exit_self: FOURTH = the context or NULL
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               - exit_func: FIFTH = the context.__exit__ function or context.__exit__ bound method
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								               We call FOURTH(type(TOP), TOP, GetTraceback(TOP)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               Then we push the __exit__ return value.
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								             */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *exc, *tb;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *val_o = PyStackRef_AsPyObjectBorrow(val);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *exit_func_o = PyStackRef_AsPyObjectBorrow(exit_func);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(val_o && PyExceptionInstance_Check(val_o));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            exc = PyExceptionInstance_Class(val_o);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            tb = PyException_GetTraceback(val_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (tb == NULL) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                tb = Py_None;
							 | 
						
					
						
							
								
									
										
										
										
											2023-04-12 12:04:55 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            else {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                Py_DECREF(tb);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-14 15:08:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-04-12 12:04:55 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-07-25 18:32:43 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(PyStackRef_LongCheck(lasti));
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)lasti; // Shut up compiler warning if asserts are off
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *stack[5] = {NULL, PyStackRef_AsPyObjectBorrow(exit_self), exc, val_o, tb};
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            int has_self = !PyStackRef_IsNull(exit_self);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 18:13:04 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyObject *res_o = PyObject_Vectorcall(exit_func_o, stack + 2 - has_self,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                (3 + has_self) | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (res_o == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 18:13:04 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            res = PyStackRef_FromPyObjectSteal(res_o);
							 | 
						
					
						
							
								
									
										
										
										
											2023-12-07 12:49:40 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = res;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2023-04-12 12:04:55 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TARGET(YIELD_VALUE) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if defined(Py_TAIL_CALL_INTERP)
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int opcode = YIELD_VALUE;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            (void)(opcode);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 21:11:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-31 10:09:54 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr = next_instr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            next_instr += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            INSTRUCTION_STATS(YIELD_VALUE);
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-27 03:10:43 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef retval;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef value;
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            retval = stack_pointer[-1];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // NOTE: It's important that YIELD_VALUE never raises an exception!
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // The compiler treats any exception raised here as a failed close()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // or throw() call.
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-21 10:15:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(frame->owner != FRAME_OWNED_BY_INTERPRETER);
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-30 11:33:13 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            frame->instr_ptr++;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-24 10:23:38 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            PyGenObject *gen = _PyGen_GetGeneratorFromFrame(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(FRAME_SUSPENDED_YIELD_FROM == FRAME_SUSPENDED + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(oparg == 0 || oparg == 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            gen->gi_frame_state = FRAME_SUSPENDED + oparg;
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef temp = retval;
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-30 11:33:13 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += -1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-30 11:33:13 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            tstate->exc_info = gen->gi_exc_state.previous_item;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            gen->gi_exc_state.previous_item = NULL;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _Py_LeaveRecursiveCallPy(tstate);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyInterpreterFrame *gen_frame = frame;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            frame = tstate->current_frame = frame->previous;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            gen_frame->previous = NULL;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* We don't know which of these is relevant here, so keep them equal */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(INLINE_CACHE_ENTRIES_SEND == INLINE_CACHE_ENTRIES_FOR_ITER);
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-30 11:33:13 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #if TIER_ONE
							 | 
						
					
						
							
								
									
										
										
										
											2024-05-06 21:22:59 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(frame->instr_ptr->op.code == INSTRUMENTED_LINE ||
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                  frame->instr_ptr->op.code == INSTRUMENTED_INSTRUCTION ||
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                  _PyOpcode_Deopt[frame->instr_ptr->op.code] == SEND ||
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                  _PyOpcode_Deopt[frame->instr_ptr->op.code] == FOR_ITER ||
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                  _PyOpcode_Deopt[frame->instr_ptr->op.code] == INTERPRETER_EXIT ||
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                  _PyOpcode_Deopt[frame->instr_ptr->op.code] == ENTER_EXECUTOR);
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-30 11:33:13 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-22 15:19:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            LOAD_IP(1 + INLINE_CACHE_ENTRIES_SEND);
							 | 
						
					
						
							
								
									
										
										
										
											2024-10-07 14:56:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            value = temp;
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-30 11:33:13 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            LLTRACE_RESUME_FRAME();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer[0] = value;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer += 1;
							 | 
						
					
						
							
								
									
										
										
										
											2024-06-25 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(WITHIN_STACK_BOUNDS());
							 | 
						
					
						
							
								
									
										
										
										
											2024-04-30 11:33:13 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2022-11-02 21:31:26 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* END INSTRUCTIONS */
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#ifndef Py_TAIL_CALL_INTERP
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#if USE_COMPUTED_GOTOS
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        _unknown_opcode:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#else
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        EXTRA_CASES  // From pycore_opcode_metadata.h, a 'case' for each unused opcode
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Tell C compilers not to hold the opcode variable in the loop.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               next_instr points the current instruction without TARGET(). */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            opcode = next_instr->op.code;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyErr_Format(tstate, PyExc_SystemError,
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								              "%U:%d: unknown opcode %d",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								              _PyFrame_GetCode(frame)->co_filename,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								              PyUnstable_InterpreterFrame_GetLine(frame),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								              opcode);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								JUMP_TO_LABEL(error);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        /* This should never be reached. Every opcode should end with DISPATCH()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								           or goto error. */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        Py_UNREACHABLE();
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#endif /* Py_TAIL_CALL_INTERP */
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        /* BEGIN LABELS */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        LABEL(pop_4_error)
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STACK_SHRINK(4);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        LABEL(pop_3_error)
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STACK_SHRINK(3);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        LABEL(pop_2_error)
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-03 12:41:32 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            STACK_SHRINK(2);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        LABEL(pop_1_error)
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            STACK_SHRINK(1);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        LABEL(error)
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Double-check exception status. */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            #ifdef NDEBUG
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (!_PyErr_Occurred(tstate)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 12:18:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyErr_SetString(tstate, PyExc_SystemError,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                             "error return without exception set");
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 12:18:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            #else
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(_PyErr_Occurred(tstate));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Log traceback info. */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(frame->owner != FRAME_OWNED_BY_INTERPRETER);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (!_PyFrame_IsIncomplete(frame)) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 12:18:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                PyFrameObject *f = _PyFrame_GetFrameObject(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 12:18:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                if (f != NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 12:18:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    PyTraceBack_Here(f);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 12:18:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 12:18:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyEval_MonitorRaise(tstate, frame, next_instr-1);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 12:18:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_SetStackPointer(frame, stack_pointer);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            JUMP_TO_LABEL(exception_unwind);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        LABEL(exception_unwind)
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 12:18:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* STACK SPILLED */
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* We can't use frame->instr_ptr here, as RERAISE may have set it */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            int offset = INSTR_OFFSET()-1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            int level, handler, lasti;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 12:18:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int handled = get_exception_handler(_PyFrame_GetCode(frame), offset, &level, &handler, &lasti);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (handled == 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                // No handlers, so exit.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                assert(_PyErr_Occurred(tstate));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                /* Pop remaining stack entries. */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef *stackbase = _PyFrame_Stackbase(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 12:18:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                while (frame->stackpointer > stackbase) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    _PyStackRef ref = _PyFrame_StackPop(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                    PyStackRef_XCLOSE(ref);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                monitor_unwind(tstate, frame, next_instr-1);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(exit_unwind);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(STACK_LEVEL() >= level);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyStackRef *new_top = _PyFrame_Stackbase(frame) + level;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 12:18:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(frame->stackpointer >= new_top);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            while (frame->stackpointer > new_top) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                _PyStackRef ref = _PyFrame_StackPop(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyStackRef_XCLOSE(ref);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (lasti) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                int frame_lasti = _PyInterpreterFrame_LASTI(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                PyObject *lasti = PyLong_FromLong(frame_lasti);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                if (lasti == NULL) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                    JUMP_TO_LABEL(exception_unwind);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                }
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 12:18:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                _PyFrame_StackPush(frame, PyStackRef_FromPyObjectSteal(lasti));
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Make the raw exception data
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               available to the handler,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               so a program can emulate the
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               Python main loop. */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            PyObject *exc = _PyErr_GetRaisedException(tstate);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 12:18:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            _PyFrame_StackPush(frame, PyStackRef_FromPyObjectSteal(exc));
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr = _PyFrame_GetBytecode(frame) + handler;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 12:18:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            int err = monitor_handled(tstate, frame, next_instr, exc);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (err < 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(exception_unwind);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* Resume normal execution */
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 08:49:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #ifdef Py_DEBUG
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            if (frame->lltrace >= 5) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                lltrace_resume_frame(frame);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 12:18:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #ifdef Py_TAIL_CALL_INTERP
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            int opcode;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        LABEL(exit_unwind)
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 12:18:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* STACK SPILLED */
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            assert(_PyErr_Occurred(tstate));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _Py_LeaveRecursiveCallPy(tstate);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(frame->owner != FRAME_OWNED_BY_INTERPRETER);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            // GH-99729: We need to unlink the frame *before* clearing it:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyInterpreterFrame *dying = frame;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            frame = tstate->current_frame = dying->previous;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            _PyEval_FrameClearAndPop(tstate, dying);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            frame->return_offset = 0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (frame->owner == FRAME_OWNED_BY_INTERPRETER) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                /* Restore previous frame and exit */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                tstate->current_frame = frame->previous;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                tstate->c_recursion_remaining += PY_EVAL_C_STACK_UNITS;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                return NULL;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-31 17:13:20 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr = frame->instr_ptr;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            JUMP_TO_LABEL(error);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        LABEL(start_frame)
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 12:18:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            /* STACK SPILLED */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            int too_deep = _Py_EnterRecursivePy(tstate);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            if (too_deep) {
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                JUMP_TO_LABEL(exit_unwind);
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-31 17:13:20 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            }
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            next_instr = frame->instr_ptr;
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-07 08:49:51 -08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            LLTRACE_RESUME_FRAME();
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-31 17:13:20 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #ifdef Py_DEBUG
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            /* _PyEval_EvalFrameDefault() must not be called with an exception set,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               because it can clear it (directly or indirectly) and so the
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               caller loses its exception */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            assert(!_PyErr_Occurred(tstate));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-04 12:18:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            stack_pointer = _PyFrame_GetStackPointer(frame);
							 | 
						
					
						
							
								
									
										
										
										
											2025-02-06 23:21:57 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            #ifdef Py_TAIL_CALL_INTERP
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            int opcode;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            #endif
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-31 17:13:20 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            DISPATCH();
							 | 
						
					
						
							
								
									
										
										
										
											2025-01-27 18:30:20 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								/* END LABELS */
							 | 
						
					
						
							
								
									
										
										
										
											2023-11-01 13:13:02 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#undef TIER_ONE
							 |