mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	GH-131798: Turn _LOAD_SMALL_INT into _LOAD_CONST_INLINE_BORROW in the JIT (GH-134406)
This commit is contained in:
		
							parent
							
								
									3effede97c
								
							
						
					
					
						commit
						8c5e5557c6
					
				
					 4 changed files with 21 additions and 2 deletions
				
			
		|  | @ -528,7 +528,10 @@ dummy_func(void) { | |||
|     } | ||||
| 
 | ||||
|     op(_LOAD_SMALL_INT, (-- value)) { | ||||
|         PyObject *val = PyLong_FromLong(this_instr->oparg); | ||||
|         PyObject *val = PyLong_FromLong(oparg); | ||||
|         assert(val); | ||||
|         assert(_Py_IsImmortal(val)); | ||||
|         REPLACE_OP(this_instr, _LOAD_CONST_INLINE_BORROW, 0, (uintptr_t)val); | ||||
|         value = sym_new_const(ctx, val); | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										5
									
								
								Python/optimizer_cases.c.h
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										5
									
								
								Python/optimizer_cases.c.h
									
										
									
										generated
									
									
									
								
							|  | @ -79,7 +79,10 @@ | |||
| 
 | ||||
|         case _LOAD_SMALL_INT: { | ||||
|             JitOptSymbol *value; | ||||
|             PyObject *val = PyLong_FromLong(this_instr->oparg); | ||||
|             PyObject *val = PyLong_FromLong(oparg); | ||||
|             assert(val); | ||||
|             assert(_Py_IsImmortal(val)); | ||||
|             REPLACE_OP(this_instr, _LOAD_CONST_INLINE_BORROW, 0, (uintptr_t)val); | ||||
|             value = sym_new_const(ctx, val); | ||||
|             stack_pointer[0] = value; | ||||
|             stack_pointer += 1; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Nadeshiko Manju
						Nadeshiko Manju