diff --git a/src/compiler/heap-refs.h b/src/compiler/heap-refs.h index 9190bf3190..b268593a48 100644 --- a/src/compiler/heap-refs.h +++ b/src/compiler/heap-refs.h @@ -61,8 +61,6 @@ enum class OddballType : uint8_t { /* Subtypes of FixedArray */ \ V(ObjectBoilerplateDescription) \ V(ScopeInfo) \ - /* Subtypes of String */ \ - V(InternalizedString) \ /* Subtypes of Name */ \ V(Symbol) \ /* Subtypes of HeapObject */ \ @@ -94,6 +92,7 @@ enum class OddballType : uint8_t { V(FixedArray) \ V(FixedDoubleArray) \ /* Subtypes of Name */ \ + V(InternalizedString) \ V(String) \ /* Subtypes of JSReceiver */ \ V(JSObject) \ diff --git a/src/compiler/js-heap-broker.cc b/src/compiler/js-heap-broker.cc index b85d7c9b42..0b8fc5ca8a 100644 --- a/src/compiler/js-heap-broker.cc +++ b/src/compiler/js-heap-broker.cc @@ -870,10 +870,12 @@ StringData::StringData(JSHeapBroker* broker, ObjectData** storage, class InternalizedStringData : public StringData { public: InternalizedStringData(JSHeapBroker* broker, ObjectData** storage, - Handle object) - : StringData(broker, storage, object) { - DCHECK(!FLAG_turbo_direct_heap_access); - } + Handle object); + + uint32_t array_index() const { return array_index_; } + + private: + uint32_t array_index_; }; ObjectData* StringData::GetCharAsString(JSHeapBroker* broker, uint32_t index, @@ -896,6 +898,11 @@ ObjectData* StringData::GetCharAsString(JSHeapBroker* broker, uint32_t index, return result; } +InternalizedStringData::InternalizedStringData( + JSHeapBroker* broker, ObjectData** storage, + Handle object) + : StringData(broker, storage, object) {} + namespace { bool IsFastLiteralHelper(Handle boilerplate, int max_depth,