Commit 0c591684 authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

[compiler] Replace Cell with direct reads

Bug: v8:7790
Change-Id: I2f0c2fdcb44c216471a8778816b9e041478f0792
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2410191Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69965}
parent f6965281
...@@ -65,6 +65,7 @@ enum class OddballType : uint8_t { ...@@ -65,6 +65,7 @@ enum class OddballType : uint8_t {
V(AccessorInfo) \ V(AccessorInfo) \
V(ArrayBoilerplateDescription) \ V(ArrayBoilerplateDescription) \
V(BigInt) \ V(BigInt) \
V(Cell) \
V(HeapNumber) \ V(HeapNumber) \
V(TemplateObjectDescription) V(TemplateObjectDescription)
...@@ -97,7 +98,6 @@ enum class OddballType : uint8_t { ...@@ -97,7 +98,6 @@ enum class OddballType : uint8_t {
/* Subtypes of HeapObject */ \ /* Subtypes of HeapObject */ \
V(AllocationSite) \ V(AllocationSite) \
V(CallHandlerInfo) \ V(CallHandlerInfo) \
V(Cell) \
V(Code) \ V(Code) \
V(DescriptorArray) \ V(DescriptorArray) \
V(FeedbackCell) \ V(FeedbackCell) \
......
...@@ -1903,27 +1903,12 @@ void SourceTextModuleData::Serialize(JSHeapBroker* broker) { ...@@ -1903,27 +1903,12 @@ void SourceTextModuleData::Serialize(JSHeapBroker* broker) {
class CellData : public HeapObjectData { class CellData : public HeapObjectData {
public: public:
CellData(JSHeapBroker* broker, ObjectData** storage, Handle<Cell> object); CellData(JSHeapBroker* broker, ObjectData** storage, Handle<Cell> object)
: HeapObjectData(broker, storage, object) {
void Serialize(JSHeapBroker* broker); DCHECK(!FLAG_turbo_direct_heap_access);
ObjectData* value() { return value_; } }
private:
ObjectData* value_ = nullptr;
}; };
CellData::CellData(JSHeapBroker* broker, ObjectData** storage,
Handle<Cell> object)
: HeapObjectData(broker, storage, object) {}
void CellData::Serialize(JSHeapBroker* broker) {
if (value_ != nullptr) return;
TraceScope tracer(broker, this, "CellData::Serialize");
auto cell = Handle<Cell>::cast(object());
value_ = broker->GetOrCreateData(cell->value());
}
class JSGlobalObjectData : public JSObjectData { class JSGlobalObjectData : public JSObjectData {
public: public:
JSGlobalObjectData(JSHeapBroker* broker, ObjectData** storage, JSGlobalObjectData(JSHeapBroker* broker, ObjectData** storage,
...@@ -3368,8 +3353,6 @@ BIMODAL_ACCESSOR_C(BytecodeArray, int, parameter_count) ...@@ -3368,8 +3353,6 @@ BIMODAL_ACCESSOR_C(BytecodeArray, int, parameter_count)
BIMODAL_ACCESSOR_C(BytecodeArray, interpreter::Register, BIMODAL_ACCESSOR_C(BytecodeArray, interpreter::Register,
incoming_new_target_or_generator_register) incoming_new_target_or_generator_register)
BIMODAL_ACCESSOR(Cell, Object, value)
BIMODAL_ACCESSOR_C(FeedbackVector, double, invocation_count) BIMODAL_ACCESSOR_C(FeedbackVector, double, invocation_count)
BIMODAL_ACCESSOR(HeapObject, Map, map) BIMODAL_ACCESSOR(HeapObject, Map, map)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment