Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index f0a27ab4af525bef9280e0f826dc34ff0fb5e1ea..eae931cec088a904e9ca0f13a6a08e4ec68e70c9 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -1906,7 +1906,20 @@ void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) { |
void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { |
- Abort("Unimplemented: %s", "DoLoadContextSlot"); |
+ Register context = ToRegister(instr->context()); |
+ Register result = ToRegister(instr->result()); |
+ __ movq(result, ContextOperand(context, instr->slot_index())); |
+} |
+ |
+ |
+void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) { |
+ Register context = ToRegister(instr->context()); |
+ Register value = ToRegister(instr->value()); |
+ __ movq(ContextOperand(context, instr->slot_index()), value); |
+ if (instr->needs_write_barrier()) { |
+ int offset = Context::SlotOffset(instr->slot_index()); |
+ __ RecordWrite(context, offset, value, kScratchRegister); |
+ } |
} |