2023-06-26 23:02:57 -03:00
|
|
|
#ifndef Py_INTERNAL_UOPS_H
|
|
|
|
#define Py_INTERNAL_UOPS_H
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef Py_BUILD_CORE
|
|
|
|
# error "this header requires Py_BUILD_CORE define"
|
|
|
|
#endif
|
|
|
|
|
2023-09-06 10:56:08 -03:00
|
|
|
#include "pycore_frame.h" // _PyInterpreterFrame
|
|
|
|
|
2023-08-15 15:04:17 -03:00
|
|
|
#define _Py_UOP_MAX_TRACE_LENGTH 64
|
2023-06-26 23:02:57 -03:00
|
|
|
|
|
|
|
typedef struct {
|
2023-07-17 16:12:33 -03:00
|
|
|
uint32_t opcode;
|
|
|
|
uint32_t oparg;
|
|
|
|
uint64_t operand; // A cache entry
|
2023-06-26 23:02:57 -03:00
|
|
|
} _PyUOpInstruction;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
_PyExecutorObject base;
|
2023-08-05 01:10:46 -03:00
|
|
|
_PyUOpInstruction trace[1];
|
2023-06-26 23:02:57 -03:00
|
|
|
} _PyUOpExecutorObject;
|
|
|
|
|
|
|
|
_PyInterpreterFrame *_PyUopExecute(
|
|
|
|
_PyExecutorObject *executor,
|
|
|
|
_PyInterpreterFrame *frame,
|
|
|
|
PyObject **stack_pointer);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif /* !Py_INTERNAL_UOPS_H */
|