@@ -315,33 +315,33 @@ remove_globals(_PyInterpreterFrame *frame, _PyUOpInstruction *buffer,
315315 INST->operand0 = OPERAND;
316316
317317/* Shortened forms for convenience, used in optimizer_bytecodes.c */
318- #define ref_is_not_null _Py_uop_ref_is_not_null
319- #define ref_is_const _Py_uop_ref_is_const
320- #define ref_get_const _Py_uop_ref_get_const
321- #define ref_new_unknown _Py_uop_ref_new_unknown
322- #define ref_new_not_null _Py_uop_ref_new_not_null
323- #define ref_new_type _Py_uop_ref_new_type
324- #define ref_is_null _Py_uop_ref_is_null
325- #define ref_new_const _Py_uop_ref_new_const
326- #define ref_new_null _Py_uop_ref_new_null
327- #define ref_has_type _Py_uop_ref_has_type
328- #define ref_get_type _Py_uop_ref_get_type
329- #define ref_matches_type _Py_uop_ref_matches_type
330- #define ref_matches_type_version _Py_uop_ref_matches_type_version
331- #define ref_set_null (SYM ) _Py_uop_ref_set_null (ctx, SYM)
332- #define ref_set_non_null (SYM ) _Py_uop_ref_set_non_null (ctx, SYM)
333- #define ref_set_type (SYM , TYPE ) _Py_uop_ref_set_type (ctx, SYM, TYPE)
334- #define ref_set_type_version (SYM , VERSION ) _Py_uop_ref_set_type_version (ctx, SYM, VERSION)
335- #define ref_set_const (SYM , CNST ) _Py_uop_ref_set_const (ctx, SYM, CNST)
336- #define ref_is_bottom _Py_uop_ref_is_bottom
337- #define ref_truthiness _Py_uop_ref_truthiness
318+ #define sym_is_not_null _Py_uop_sym_is_not_null
319+ #define sym_is_const _Py_uop_sym_is_const
320+ #define sym_get_const _Py_uop_sym_get_const
321+ #define sym_new_unknown _Py_uop_sym_new_unknown
322+ #define sym_new_not_null _Py_uop_sym_new_not_null
323+ #define sym_new_type _Py_uop_sym_new_type
324+ #define sym_is_null _Py_uop_sym_is_null
325+ #define sym_new_const _Py_uop_sym_new_const
326+ #define sym_new_null _Py_uop_sym_new_null
327+ #define sym_has_type _Py_uop_sym_has_type
328+ #define sym_get_type _Py_uop_sym_get_type
329+ #define sym_matches_type _Py_uop_sym_matches_type
330+ #define sym_matches_type_version _Py_uop_sym_matches_type_version
331+ #define sym_set_null (SYM ) _Py_uop_sym_set_null (ctx, SYM)
332+ #define sym_set_non_null (SYM ) _Py_uop_sym_set_non_null (ctx, SYM)
333+ #define sym_set_type (SYM , TYPE ) _Py_uop_sym_set_type (ctx, SYM, TYPE)
334+ #define sym_set_type_version (SYM , VERSION ) _Py_uop_sym_set_type_version (ctx, SYM, VERSION)
335+ #define sym_set_const (SYM , CNST ) _Py_uop_sym_set_const (ctx, SYM, CNST)
336+ #define sym_is_bottom _Py_uop_sym_is_bottom
337+ #define sym_truthiness _Py_uop_sym_truthiness
338338#define frame_new _Py_uop_frame_new
339339#define frame_pop _Py_uop_frame_pop
340- #define ref_new_tuple _Py_uop_ref_new_tuple
341- #define ref_tuple_getitem _Py_uop_ref_tuple_getitem
342- #define ref_tuple_length _Py_uop_ref_tuple_length
343- #define ref_is_immortal _Py_uop_ref_is_immortal
344- #define ref_new_truthiness _Py_uop_ref_new_truthiness
340+ #define sym_new_tuple _Py_uop_sym_new_tuple
341+ #define sym_tuple_getitem _Py_uop_sym_tuple_getitem
342+ #define sym_tuple_length _Py_uop_sym_tuple_length
343+ #define sym_is_immortal _Py_uop_sym_is_immortal
344+ #define sym_new_truthiness _Py_uop_sym_new_truthiness
345345
346346static int
347347optimize_to_bool (
@@ -350,16 +350,16 @@ optimize_to_bool(
350350 JitOptRef value ,
351351 JitOptRef * result_ptr )
352352{
353- if (ref_matches_type (value , & PyBool_Type )) {
353+ if (sym_matches_type (value , & PyBool_Type )) {
354354 REPLACE_OP (this_instr , _NOP , 0 , 0 );
355355 * result_ptr = value ;
356356 return 1 ;
357357 }
358- int truthiness = ref_truthiness (ctx , value );
358+ int truthiness = sym_truthiness (ctx , value );
359359 if (truthiness >= 0 ) {
360360 PyObject * load = truthiness ? Py_True : Py_False ;
361361 REPLACE_OP (this_instr , _POP_TOP_LOAD_CONST_INLINE_BORROW , 0 , (uintptr_t )load );
362- * result_ptr = ref_new_const (ctx , load );
362+ * result_ptr = sym_new_const (ctx , load );
363363 return 1 ;
364364 }
365365 return 0 ;
@@ -386,10 +386,10 @@ lookup_attr(JitOptContext *ctx, _PyUOpInstruction *this_instr,
386386 if (lookup ) {
387387 int opcode = _Py_IsImmortal (lookup ) ? immortal : mortal ;
388388 REPLACE_OP (this_instr , opcode , 0 , (uintptr_t )lookup );
389- return ref_new_const (ctx , lookup );
389+ return sym_new_const (ctx , lookup );
390390 }
391391 }
392- return ref_new_not_null (ctx );
392+ return sym_new_not_null (ctx );
393393}
394394
395395/* _PUSH_FRAME/_RETURN_VALUE's operand can be 0, a PyFunctionObject *, or a
0 commit comments