Commit 015ceed4 authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

[compiler] Replace BigInt with direct reads

Bug: v8:7790
Change-Id: Ib0c95f27d21e4aea09dcc9804a800b16440a2fe2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2403254Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69835}
parent 354e4f4a
...@@ -64,6 +64,7 @@ enum class OddballType : uint8_t { ...@@ -64,6 +64,7 @@ enum class OddballType : uint8_t {
/* Subtypes of HeapObject */ \ /* Subtypes of HeapObject */ \
V(AccessorInfo) \ V(AccessorInfo) \
V(ArrayBoilerplateDescription) \ V(ArrayBoilerplateDescription) \
V(BigInt) \
V(HeapNumber) V(HeapNumber)
// This list is sorted such that subtypes appear before their supertypes. // This list is sorted such that subtypes appear before their supertypes.
...@@ -94,7 +95,6 @@ enum class OddballType : uint8_t { ...@@ -94,7 +95,6 @@ enum class OddballType : uint8_t {
V(JSObject) \ V(JSObject) \
/* Subtypes of HeapObject */ \ /* Subtypes of HeapObject */ \
V(AllocationSite) \ V(AllocationSite) \
V(BigInt) \
V(CallHandlerInfo) \ V(CallHandlerInfo) \
V(Cell) \ V(Cell) \
V(Code) \ V(Code) \
......
...@@ -1019,7 +1019,9 @@ class BigIntData : public HeapObjectData { ...@@ -1019,7 +1019,9 @@ class BigIntData : public HeapObjectData {
public: public:
BigIntData(JSHeapBroker* broker, ObjectData** storage, Handle<BigInt> object) BigIntData(JSHeapBroker* broker, ObjectData** storage, Handle<BigInt> object)
: HeapObjectData(broker, storage, object), : HeapObjectData(broker, storage, object),
as_uint64_(object->AsUint64(nullptr)) {} as_uint64_(object->AsUint64(nullptr)) {
DCHECK(!FLAG_turbo_direct_heap_access);
}
uint64_t AsUint64() const { return as_uint64_; } uint64_t AsUint64() const { return as_uint64_; }
...@@ -3336,6 +3338,8 @@ BIMODAL_ACCESSOR_C(AllocationSite, bool, PointsToLiteral) ...@@ -3336,6 +3338,8 @@ BIMODAL_ACCESSOR_C(AllocationSite, bool, PointsToLiteral)
BIMODAL_ACCESSOR_C(AllocationSite, ElementsKind, GetElementsKind) BIMODAL_ACCESSOR_C(AllocationSite, ElementsKind, GetElementsKind)
BIMODAL_ACCESSOR_C(AllocationSite, AllocationType, GetAllocationType) BIMODAL_ACCESSOR_C(AllocationSite, AllocationType, GetAllocationType)
BIMODAL_ACCESSOR_C(BigInt, uint64_t, AsUint64)
BIMODAL_ACCESSOR_C(BytecodeArray, int, register_count) BIMODAL_ACCESSOR_C(BytecodeArray, int, register_count)
BIMODAL_ACCESSOR_C(BytecodeArray, int, parameter_count) BIMODAL_ACCESSOR_C(BytecodeArray, int, parameter_count)
BIMODAL_ACCESSOR_C(BytecodeArray, interpreter::Register, BIMODAL_ACCESSOR_C(BytecodeArray, interpreter::Register,
...@@ -3879,11 +3883,6 @@ base::Optional<ObjectRef> JSArrayRef::GetOwnCowElement( ...@@ -3879,11 +3883,6 @@ base::Optional<ObjectRef> JSArrayRef::GetOwnCowElement(
return ObjectRef(broker(), element); return ObjectRef(broker(), element);
} }
uint64_t BigIntRef::AsUint64() const {
IF_ACCESS_FROM_HEAP_C(AsUint64);
return data()->AsBigInt()->AsUint64();
}
base::Optional<CellRef> SourceTextModuleRef::GetCell(int cell_index) const { base::Optional<CellRef> SourceTextModuleRef::GetCell(int cell_index) const {
if (data_->should_access_heap()) { if (data_->should_access_heap()) {
AllowHandleAllocationIfNeeded allow_handle_allocation(data()->kind(), AllowHandleAllocationIfNeeded allow_handle_allocation(data()->kind(),
......
...@@ -1684,6 +1684,9 @@ struct SimplifiedLoweringPhase { ...@@ -1684,6 +1684,9 @@ struct SimplifiedLoweringPhase {
data->source_positions(), data->node_origins(), data->source_positions(), data->node_origins(),
data->info()->GetPoisoningMitigationLevel(), data->info()->GetPoisoningMitigationLevel(),
&data->info()->tick_counter()); &data->info()->tick_counter());
// RepresentationChanger needs the LocalHeap unparked.
UnparkedScopeIfNeeded scope(data->broker());
lowering.LowerAllNodes(); lowering.LowerAllNodes();
} }
}; };
......
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