Index: src/compiler/access-builder.cc |
diff --git a/src/compiler/access-builder.cc b/src/compiler/access-builder.cc |
index 7e798c6f61f64a084eab1c4829a64d3319bc2c94..9217a13b378cab116bba08f5544339558ffcbb03 100644 |
--- a/src/compiler/access-builder.cc |
+++ b/src/compiler/access-builder.cc |
@@ -73,6 +73,15 @@ FieldAccess AccessBuilder::ForValue() { |
// static |
+FieldAccess AccessBuilder::ForContextSlot(size_t index) { |
+ int offset = Context::kHeaderSize + static_cast<int>(index) * kPointerSize; |
+ DCHECK_EQ(offset, |
+ Context::SlotOffset(static_cast<int>(index)) + kHeapObjectTag); |
+ return {kTaggedBase, offset, Handle<Name>(), Type::Any(), kMachAnyTagged}; |
+} |
+ |
+ |
+// static |
ElementAccess AccessBuilder::ForFixedArrayElement() { |
return {kTaggedBase, FixedArray::kHeaderSize, Type::Any(), kMachAnyTagged}; |
} |