mirror of
https://github.com/python/cpython.git
synced 2025-12-09 10:37:17 +00:00
GH-113860: Get rid of _PyUOpExecutorObject (GH-113954)
This commit is contained in:
parent
29e2839cd6
commit
30e6cbdba2
12 changed files with 35 additions and 67 deletions
|
|
@ -29,10 +29,17 @@ typedef struct {
|
|||
_PyExecutorLinkListNode links;
|
||||
} _PyVMData;
|
||||
|
||||
typedef struct {
|
||||
uint16_t opcode;
|
||||
uint16_t oparg;
|
||||
uint32_t target;
|
||||
uint64_t operand; // A cache entry
|
||||
} _PyUOpInstruction;
|
||||
|
||||
typedef struct _PyExecutorObject {
|
||||
PyObject_VAR_HEAD
|
||||
_PyVMData vm_data; /* Used by the VM, but opaque to the optimizer */
|
||||
/* Data needed by the executor goes here, but is opaque to the VM */
|
||||
_PyUOpInstruction trace[1];
|
||||
} _PyExecutorObject;
|
||||
|
||||
typedef struct _PyOptimizerObject _PyOptimizerObject;
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@ extern "C" {
|
|||
# error "this header requires Py_BUILD_CORE define"
|
||||
#endif
|
||||
|
||||
#include "pycore_uops.h" // _PyUOpInstruction
|
||||
|
||||
int _Py_uop_analyze_and_optimize(PyCodeObject *code,
|
||||
_PyUOpInstruction *trace, int trace_len, int curr_stackentries);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
#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
|
||||
|
||||
#include "pycore_frame.h" // _PyInterpreterFrame
|
||||
|
||||
#define _Py_UOP_MAX_TRACE_LENGTH 512
|
||||
|
||||
typedef struct {
|
||||
uint16_t opcode;
|
||||
uint16_t oparg;
|
||||
uint32_t target;
|
||||
uint64_t operand; // A cache entry
|
||||
} _PyUOpInstruction;
|
||||
|
||||
typedef struct {
|
||||
_PyExecutorObject base;
|
||||
_PyUOpInstruction trace[1];
|
||||
} _PyUOpExecutorObject;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !Py_INTERNAL_UOPS_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue