@@ -324,8 +324,8 @@ uop_dealloc(_PyUOpExecutorObject *self) {
324
324
PyObject_Free (self );
325
325
}
326
326
327
- static const char *
328
- uop_name (int index )
327
+ const char *
328
+ _PyUopName (int index )
329
329
{
330
330
if (index <= MAX_REAL_OPCODE ) {
331
331
return _PyOpcode_OpName [index ];
@@ -347,7 +347,7 @@ uop_item(_PyUOpExecutorObject *self, Py_ssize_t index)
347
347
PyErr_SetNone (PyExc_IndexError );
348
348
return NULL ;
349
349
}
350
- const char * name = uop_name (self -> trace [index ].opcode );
350
+ const char * name = _PyUopName (self -> trace [index ].opcode );
351
351
if (name == NULL ) {
352
352
name = "<nil>" ;
353
353
}
@@ -451,7 +451,7 @@ translate_bytecode_to_trace(
451
451
#define ADD_TO_TRACE (OPCODE , OPARG , OPERAND , TARGET ) \
452
452
DPRINTF(2, \
453
453
" ADD_TO_TRACE(%s, %d, %" PRIu64 ")\n", \
454
- uop_name (OPCODE), \
454
+ _PyUopName (OPCODE), \
455
455
(OPARG), \
456
456
(uint64_t)(OPERAND)); \
457
457
assert(trace_length < max_length); \
@@ -477,7 +477,7 @@ translate_bytecode_to_trace(
477
477
reserved = (n); // Keep ADD_TO_TRACE honest
478
478
479
479
// Reserve space for main+stub uops, plus 3 for _SET_IP, _CHECK_VALIDITY and _EXIT_TRACE
480
- #define RESERVE (main , stub ) RESERVE_RAW((main) + (stub) + 3, uop_name (opcode))
480
+ #define RESERVE (main , stub ) RESERVE_RAW((main) + (stub) + 3, _PyUopName (opcode))
481
481
482
482
// Trace stack operations (used by _PUSH_FRAME, _POP_FRAME)
483
483
#define TRACE_STACK_PUSH () \
@@ -549,8 +549,8 @@ translate_bytecode_to_trace(
549
549
uint32_t uopcode = BRANCH_TO_GUARD [opcode - POP_JUMP_IF_FALSE ][jump_likely ];
550
550
_Py_CODEUNIT * next_instr = instr + 1 + _PyOpcode_Caches [_PyOpcode_Deopt [opcode ]];
551
551
DPRINTF (4 , "%s(%d): counter=%x, bitcount=%d, likely=%d, uopcode=%s\n" ,
552
- uop_name (opcode ), oparg ,
553
- counter , bitcount , jump_likely , uop_name (uopcode ));
552
+ _PyUopName (opcode ), oparg ,
553
+ counter , bitcount , jump_likely , _PyUopName (uopcode ));
554
554
ADD_TO_TRACE (uopcode , max_length , 0 , target );
555
555
if (jump_likely ) {
556
556
_Py_CODEUNIT * target_instr = next_instr + oparg ;
@@ -710,7 +710,7 @@ translate_bytecode_to_trace(
710
710
}
711
711
break ;
712
712
}
713
- DPRINTF (2 , "Unsupported opcode %s\n" , uop_name (opcode ));
713
+ DPRINTF (2 , "Unsupported opcode %s\n" , _PyUopName (opcode ));
714
714
OPT_UNSUPPORTED_OPCODE (opcode );
715
715
goto done ; // Break out of loop
716
716
} // End default
@@ -844,7 +844,7 @@ make_executor_from_uops(_PyUOpInstruction *buffer, _PyBloomFilter *dependencies)
844
844
for (int i = 0 ; i < length ; i ++ ) {
845
845
printf ("%4d %s(%d, %d, %" PRIu64 ")\n" ,
846
846
i ,
847
- uop_name (executor -> trace [i ].opcode ),
847
+ _PyUopName (executor -> trace [i ].opcode ),
848
848
executor -> trace [i ].oparg ,
849
849
executor -> trace [i ].target ,
850
850
executor -> trace [i ].operand );
0 commit comments