Commit f7a4c311 authored by Maya Lekova's avatar Maya Lekova Committed by Commit Bot

Revert "[compiler] Replace HeapNumberData with direct reads"

This reverts commit 7964ac86.

Reason for revert: Introduces a data race - https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20TSAN/32870

Original change's description:
> [compiler] Replace HeapNumberData with direct reads
> 
> Bug: v8:7790
> Change-Id: I3fbbbd36900146111f83596fd6615a2e4a4f5d33
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2362952
> Commit-Queue: Georg Neis <neis@chromium.org>
> Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#69474}

TBR=neis@chromium.org,solanes@chromium.org,nicohartmann@chromium.org

Change-Id: Idd17677b2083acf452195a88cb5c363034b43c5f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7790
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2364493Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69475}
parent 7964ac86
......@@ -88,6 +88,7 @@ enum class OddballType : uint8_t {
V(FeedbackVector) \
V(FixedArrayBase) \
V(FunctionTemplateInfo) \
V(HeapNumber) \
V(JSReceiver) \
V(Map) \
V(Name) \
......@@ -98,9 +99,7 @@ enum class OddballType : uint8_t {
/* Subtypes of Object */ \
V(HeapObject)
#define HEAP_BROKER_NEVER_SERIALIZED_OBJECT_LIST(V) \
V(HeapNumber) \
V(ScopeInfo)
#define HEAP_BROKER_NEVER_SERIALIZED_OBJECT_LIST(V) V(ScopeInfo)
class CompilationDependencies;
struct FeedbackSource;
......
......@@ -686,6 +686,18 @@ class JSRegExpData : public JSObjectData {
ObjectData* last_index_ = nullptr;
};
class HeapNumberData : public HeapObjectData {
public:
HeapNumberData(JSHeapBroker* broker, ObjectData** storage,
Handle<HeapNumber> object)
: HeapObjectData(broker, storage, object), value_(object->value()) {}
double value() const { return value_; }
private:
double const value_;
};
class ContextData : public HeapObjectData {
public:
ContextData(JSHeapBroker* broker, ObjectData** storage,
......@@ -3814,7 +3826,7 @@ base::Optional<ObjectRef> JSArrayRef::GetOwnCowElement(
double HeapNumberRef::value() const {
IF_ACCESS_FROM_HEAP_C(HeapNumber, value);
UNREACHABLE();
return data()->AsHeapNumber()->value();
}
uint64_t BigIntRef::AsUint64() const {
......
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