Index: src/compiler/access-builder.cc |
diff --git a/src/compiler/access-builder.cc b/src/compiler/access-builder.cc |
index 45173bfcf55e6c5342017aa0778ad1de8ab7b331..5aa71f726a30b8d35d3883d2fe526d4f9e554f8b 100644 |
--- a/src/compiler/access-builder.cc |
+++ b/src/compiler/access-builder.cc |
@@ -612,6 +612,29 @@ ElementAccess AccessBuilder::ForFixedArrayElement() { |
return access; |
} |
+// static |
+ElementAccess AccessBuilder::ForFixedArrayElement(ElementsKind kind) { |
+ ElementAccess access = {kTaggedBase, FixedArray::kHeaderSize, Type::Any(), |
+ MachineType::AnyTagged(), kFullWriteBarrier}; |
+ switch (kind) { |
+ case FAST_SMI_ELEMENTS: |
+ access.type = TypeCache::Get().kSmi; |
+ access.write_barrier_kind = kNoWriteBarrier; |
+ break; |
+ case FAST_HOLEY_SMI_ELEMENTS: |
+ access.type = TypeCache::Get().kHoleySmi; |
+ break; |
+ case FAST_ELEMENTS: |
+ access.type = Type::NonInternal(); |
+ break; |
+ case FAST_HOLEY_ELEMENTS: |
+ break; |
+ default: |
+ UNREACHABLE(); |
+ break; |
+ } |
+ return access; |
+} |
// static |
ElementAccess AccessBuilder::ForFixedDoubleArrayElement() { |