Index: src/code-stub-assembler.cc |
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc |
index 9d38079b645da2182713cd9a4dce95b2d9fc5dd9..03d44024680add83756f2b021ad5fa7d23ce1580 100644 |
--- a/src/code-stub-assembler.cc |
+++ b/src/code-stub-assembler.cc |
@@ -1092,6 +1092,13 @@ Node* CodeStubAssembler::LoadContextElement(Node* context, int slot_index) { |
return Load(MachineType::AnyTagged(), context, IntPtrConstant(offset)); |
} |
+Node* CodeStubAssembler::StoreContextElement(Node* context, int slot_index, |
+ Node* value) { |
+ int offset = Context::SlotOffset(slot_index); |
+ return Store(MachineRepresentation::kTagged, context, IntPtrConstant(offset), |
+ value); |
+} |
+ |
Node* CodeStubAssembler::LoadNativeContext(Node* context) { |
return LoadContextElement(context, Context::NATIVE_CONTEXT_INDEX); |
} |