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

[compiler] Make BigInts bg-serialized

BigInts are immutable after initialization, thus safe to access
concurrently if the Heap::IsPendingAllocation predicate returns false.

Bug: v8:7790
Change-Id: Icf3954b1e50af2132846eca5304c7947afb8f298
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2856535
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74322}
parent 296fa964
......@@ -1084,7 +1084,7 @@ class AllocationSiteData : public HeapObjectData {
class BigIntData : public HeapObjectData {
public:
BigIntData(JSHeapBroker* broker, ObjectData** storage, Handle<BigInt> object,
ObjectDataKind kind = ObjectDataKind::kSerializedHeapObject)
ObjectDataKind kind)
: HeapObjectData(broker, storage, object, kind),
as_uint64_(object->AsUint64(nullptr)) {}
......
......@@ -108,7 +108,7 @@ enum class RefSerializationKind {
V(AccessorInfo, RefSerializationKind::kNeverSerialized) \
V(AllocationSite, RefSerializationKind::kSerialized) \
V(ArrayBoilerplateDescription, RefSerializationKind::kNeverSerialized) \
V(BigInt, RefSerializationKind::kPossiblyBackgroundSerialized) \
V(BigInt, RefSerializationKind::kBackgroundSerialized) \
V(CallHandlerInfo, RefSerializationKind::kNeverSerialized) \
V(Cell, RefSerializationKind::kNeverSerialized) \
V(Code, RefSerializationKind::kNeverSerialized) \
......
......@@ -1104,7 +1104,7 @@ Node* RepresentationChanger::GetWord64RepresentationFor(
HeapObjectMatcher m(node);
if (m.HasResolvedValue() && m.Ref(broker_).IsBigInt() &&
use_info.truncation().IsUsedAsWord64()) {
auto bigint = m.Ref(broker_).AsBigInt();
BigIntRef bigint = m.Ref(broker_).AsBigInt();
return jsgraph()->Int64Constant(
static_cast<int64_t>(bigint.AsUint64()));
}
......
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