diff --git a/src/objects/fixed-array-inl.cpp b/src/objects/fixed-array-inl.cpp index d2a062500f..11b9d6b4e7 100644 --- a/src/objects/fixed-array-inl.cpp +++ b/src/objects/fixed-array-inl.cpp @@ -7,7 +7,10 @@ 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(), GetReadOnlyRoots().fixed_cow_array_map()); diff --git a/src/objects/fixed-array-inl.h b/src/objects/fixed-array-inl.h index 4f84c5a567..8e93935866 100644 --- a/src/objects/fixed-array-inl.h +++ b/src/objects/fixed-array-inl.h @@ -64,11 +64,6 @@ 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 ea84a4a30b..86d9137ed5 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. - inline Object get(int index) const; + Object get(int index) const; inline Object get(PtrComprCageBase cage_base, int index) const; static inline Handle get(FixedArray array, int index,