◐ Shell
clean mode source ↗

gh-144145: Revert PR#144122 for performance and potential bugs. by cocolato · Pull Request #144391 · python/cpython

Expand Up @@ -16,10 +16,6 @@ extern "C" {
#define TY_ARENA_SIZE (UOP_MAX_TRACE_LENGTH * 5)
// Maximum descriptor mappings per object tracked symbolically #define MAX_SYMBOLIC_DESCR_SIZE 16 #define DESCR_ARENA_SIZE (MAX_SYMBOLIC_DESCR_SIZE * 100)
// Need extras for root frame and for overflow frame (see TRACE_STACK_PUSH()) #define MAX_ABSTRACT_FRAME_DEPTH (16)
Expand All @@ -45,7 +41,6 @@ typedef enum _JitSymType { JIT_SYM_TRUTHINESS_TAG = 9, JIT_SYM_COMPACT_INT = 10, JIT_SYM_PREDICATE_TAG = 11, JIT_SYM_DESCR_TAG = 12, } JitSymType;
typedef struct _jit_opt_known_class { Expand Down Expand Up @@ -96,31 +91,6 @@ typedef struct { uint8_t tag; } JitOptCompactInt;
/* Mapping from slot index or attribute offset to its symbolic value. SAFETY: This structure is used for both STORE_ATTR_SLOT and STORE_ATTR_INSTANCE_VALUE. These two never appear on the same object type because: __slots__ classes don't have Py_TPFLAGS_INLINE_VALUES Therefore, there is no index collision between slot offsets and inline value offsets. Note: STORE_ATTR_WITH_HINT is NOT currently tracked. If we want to track it in the future, we need to be careful about potential index collisions with STORE_ATTR_INSTANCE_VALUE. */ typedef struct { uint16_t slot_index; uint16_t symbol; } JitOptDescrMapping;
typedef struct _jit_opt_descr { uint8_t tag; uint8_t num_descrs; uint16_t last_modified_index; // Index in out_buffer when this object was last modified uint32_t type_version; JitOptDescrMapping *descrs; } JitOptDescrObject;
typedef union _jit_opt_symbol { uint8_t tag; JitOptKnownClass cls; Expand All @@ -129,7 +99,6 @@ typedef union _jit_opt_symbol { JitOptTuple tuple; JitOptTruthiness truthiness; JitOptCompactInt compact; JitOptDescrObject descr; JitOptPredicate predicate; } JitOptSymbol;
Expand Down Expand Up @@ -159,11 +128,6 @@ typedef struct ty_arena { JitOptSymbol arena[TY_ARENA_SIZE]; } ty_arena;
typedef struct descr_arena { int descr_curr_number; int descr_max_number; JitOptDescrMapping arena[DESCR_ARENA_SIZE]; } descr_arena;
#ifdef __cplusplus } Expand Down