mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	GH-131798: JIT: Split CALL_TYPE_1 into several uops (GH-132419)
This commit is contained in:
		
							parent
							
								
									87b1ea016b
								
							
						
					
					
						commit
						a6a3dbb7db
					
				
					 10 changed files with 348 additions and 216 deletions
				
			
		|  | @ -846,6 +846,15 @@ dummy_func(void) { | |||
|        next = sym_new_type(ctx, &PyLong_Type); | ||||
|     } | ||||
| 
 | ||||
|     op(_CALL_TYPE_1, (unused, unused, arg -- res)) { | ||||
|         if (sym_has_type(arg)) { | ||||
|             res = sym_new_const(ctx, (PyObject *)sym_get_type(arg)); | ||||
|         } | ||||
|         else { | ||||
|             res = sym_new_not_null(ctx); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     op(_GUARD_IS_TRUE_POP, (flag -- )) { | ||||
|         if (sym_is_const(ctx, flag)) { | ||||
|             PyObject *value = sym_get_const(ctx, flag); | ||||
|  | @ -998,6 +1007,19 @@ dummy_func(void) { | |||
|         } | ||||
|     } | ||||
| 
 | ||||
|     op(_GUARD_NOS_NULL, (null, unused -- null, unused)) { | ||||
|         if (sym_is_null(null)) { | ||||
|             REPLACE_OP(this_instr, _NOP, 0, 0); | ||||
|         } | ||||
|         sym_set_null(null); | ||||
|     } | ||||
| 
 | ||||
|     op(_GUARD_CALLABLE_TYPE_1, (callable, unused, unused -- callable, unused, unused)) { | ||||
|         if (sym_get_const(ctx, callable) == (PyObject *)&PyType_Type) { | ||||
|             REPLACE_OP(this_instr, _NOP, 0, 0); | ||||
|         } | ||||
|         sym_set_const(callable, (PyObject *)&PyType_Type); | ||||
|     } | ||||
| 
 | ||||
| // END BYTECODES //
 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tomas R.
						Tomas R.