Commit 0b7466fd authored by Jakob Gruber's avatar Jakob Gruber Committed by V8 LUCI CQ

[compiler] Mark HeapNumber as NeverEverSerialized

Bug: v8:7790
Change-Id: I763fcf7049b1b0157ebf2bd026674e2f2b05ae9c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3008637
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75776}
parent 1231ac25
...@@ -802,16 +802,11 @@ class HeapNumberData : public HeapObjectData { ...@@ -802,16 +802,11 @@ class HeapNumberData : public HeapObjectData {
HeapNumberData(JSHeapBroker* broker, ObjectData** storage, HeapNumberData(JSHeapBroker* broker, ObjectData** storage,
Handle<HeapNumber> object, Handle<HeapNumber> object,
ObjectDataKind kind = ObjectDataKind::kSerializedHeapObject) ObjectDataKind kind = ObjectDataKind::kSerializedHeapObject)
: HeapObjectData(broker, storage, object, kind), : HeapObjectData(broker, storage, object, kind) {
value_(object->value()), // TODO(jgruber): Remove this class once all kNeverSerialized types are
value_as_bits_(object->value_as_bits(kRelaxedLoad)) {} // NeverEverSerialize.
UNREACHABLE();
double value() const { return value_; } }
uint64_t value_as_bits() const { return value_as_bits_; }
private:
double const value_;
uint64_t const value_as_bits_;
}; };
class ContextData : public HeapObjectData { class ContextData : public HeapObjectData {
...@@ -2290,6 +2285,7 @@ NEVER_EVER_SERIALIZE(CodeDataContainer) ...@@ -2290,6 +2285,7 @@ NEVER_EVER_SERIALIZE(CodeDataContainer)
NEVER_EVER_SERIALIZE(Context) NEVER_EVER_SERIALIZE(Context)
NEVER_EVER_SERIALIZE(FixedDoubleArray) NEVER_EVER_SERIALIZE(FixedDoubleArray)
NEVER_EVER_SERIALIZE(FunctionTemplateInfo) NEVER_EVER_SERIALIZE(FunctionTemplateInfo)
NEVER_EVER_SERIALIZE(HeapNumber)
NEVER_EVER_SERIALIZE(InternalizedString) NEVER_EVER_SERIALIZE(InternalizedString)
NEVER_EVER_SERIALIZE(Name) NEVER_EVER_SERIALIZE(Name)
NEVER_EVER_SERIALIZE(NativeContext) NEVER_EVER_SERIALIZE(NativeContext)
...@@ -2867,14 +2863,10 @@ BIMODAL_ACCESSOR_C(FeedbackVector, double, invocation_count) ...@@ -2867,14 +2863,10 @@ BIMODAL_ACCESSOR_C(FeedbackVector, double, invocation_count)
BIMODAL_ACCESSOR(HeapObject, Map, map) BIMODAL_ACCESSOR(HeapObject, Map, map)
BIMODAL_ACCESSOR_C(HeapNumber, double, value) HEAP_ACCESSOR_C(HeapNumber, double, value)
uint64_t HeapNumberRef::value_as_bits() const { uint64_t HeapNumberRef::value_as_bits() const {
if (data_->should_access_heap()) { return object()->value_as_bits(kRelaxedLoad);
return object()->value_as_bits(kRelaxedLoad);
}
return ObjectRef::data()->AsHeapNumber()->value_as_bits();
} }
base::Optional<JSReceiverRef> JSBoundFunctionRef::bound_target_function() base::Optional<JSReceiverRef> JSBoundFunctionRef::bound_target_function()
......
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