diff --git a/src/objects/fixed-array-inl.cpp b/src/objects/fixed-array-inl.cpp index d346ed40ac..cfaee4747c 100644 --- a/src/objects/fixed-array-inl.cpp +++ b/src/objects/fixed-array-inl.cpp @@ -7,10 +7,7 @@ namespace v8 { namespace internal { -Object FixedArray::get(int index) const { - PtrComprCageBase cage_base = GetPtrComprCageBase(*this); - return get(cage_base, index); -} + void FixedArray::set(int index, Smi value) { DCHECK_NE(map(), EarlyGetReadOnlyRoots().unchecked_fixed_cow_array_map()); diff --git a/src/objects/fixed-array-inl.h b/src/objects/fixed-array-inl.h index 8e93935866..4f84c5a567 100644 --- a/src/objects/fixed-array-inl.h +++ b/src/objects/fixed-array-inl.h @@ -64,6 +64,11 @@ bool FixedArray::ContainsOnlySmisOrHoles() { return true; } +Object FixedArray::get(int index) const { + PtrComprCageBase cage_base = GetPtrComprCageBase(*this); + return get(cage_base, index); +} + Object FixedArray::get(PtrComprCageBase cage_base, int index) const { DCHECK_LT(static_cast(index), static_cast(length())); return TaggedField::Relaxed_Load(cage_base, *this, diff --git a/src/objects/fixed-array.h b/src/objects/fixed-array.h index 91a79fec40..f3bc650456 100644 --- a/src/objects/fixed-array.h +++ b/src/objects/fixed-array.h @@ -102,7 +102,7 @@ class FixedArray : public TorqueGeneratedFixedArray { public: // Setter and getter for elements. - Object get(int index) const; + inline Object get(int index) const; inline Object get(PtrComprCageBase cage_base, int index) const; static inline Handle get(FixedArray array, int index,