Move intrinsic functions further up in native context
The interpreter assumed that native context indices of the runtime functions are less than 256, which is not the case if intrinsics are at the end of the native context and we keep adding fields to native context. Also fix the operand type, so that we get a DCHECK failing if the ids don't fall into the expected range. Change-Id: I8bc13a90593739ec66cb0a507572cf5b2acc4235 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2129632 Commit-Queue: Marja Hölttä <marja@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#66925}
This commit is contained in:
parent
12e5ae677c
commit
e06e1fa6b6
@ -37,7 +37,7 @@ namespace interpreter {
|
||||
V(Flag8, OperandTypeInfo::kFixedUnsignedByte) \
|
||||
V(IntrinsicId, OperandTypeInfo::kFixedUnsignedByte) \
|
||||
V(RuntimeId, OperandTypeInfo::kFixedUnsignedShort) \
|
||||
V(NativeContextIndex, OperandTypeInfo::kScalableUnsignedByte)
|
||||
V(NativeContextIndex, OperandTypeInfo::kFixedUnsignedByte)
|
||||
|
||||
// Carefully ordered for operand type range checks below.
|
||||
#define NON_REGISTER_OPERAND_TYPE_LIST(V) \
|
||||
|
@ -65,6 +65,7 @@ enum ContextLookupFlags {
|
||||
V(EMBEDDER_DATA_INDEX, HeapObject, embedder_data) \
|
||||
V(CONTINUATION_PRESERVED_EMBEDDER_DATA_INDEX, HeapObject, \
|
||||
continuation_preserved_embedder_data) \
|
||||
NATIVE_CONTEXT_INTRINSIC_FUNCTIONS(V) \
|
||||
/* Below is alpha-sorted */ \
|
||||
V(ACCESSOR_PROPERTY_DESCRIPTOR_MAP_INDEX, Map, \
|
||||
accessor_property_descriptor_map) \
|
||||
@ -370,8 +371,7 @@ enum ContextLookupFlags {
|
||||
V(WEAKMAP_SET_INDEX, JSFunction, weakmap_set) \
|
||||
V(WEAKMAP_GET_INDEX, JSFunction, weakmap_get) \
|
||||
V(WEAKSET_ADD_INDEX, JSFunction, weakset_add) \
|
||||
V(OSR_CODE_CACHE_INDEX, WeakFixedArray, osr_code_cache) \
|
||||
NATIVE_CONTEXT_INTRINSIC_FUNCTIONS(V)
|
||||
V(OSR_CODE_CACHE_INDEX, WeakFixedArray, osr_code_cache)
|
||||
|
||||
// A table of all script contexts. Every loaded top-level script with top-level
|
||||
// lexical declarations contributes its ScriptContext into this table.
|
||||
|
Loading…
Reference in New Issue
Block a user