Index: src/arm/lithium-arm.cc |
diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc |
index b7c1b78d1ba2075ec31e017c97f2268d2653dcb1..e8d21991f21d3e46e3b428cba902bc183831abcd 100644 |
--- a/src/arm/lithium-arm.cc |
+++ b/src/arm/lithium-arm.cc |
@@ -258,7 +258,15 @@ void LUnaryMathOperation::PrintDataTo(StringStream* stream) { |
void LLoadContextSlot::PrintDataTo(StringStream* stream) { |
- stream->Add("(%d, %d)", context_chain_length(), slot_index()); |
+ InputAt(0)->PrintTo(stream); |
+ stream->Add("[%d]", slot_index()); |
+} |
+ |
+ |
+void LStoreContextSlot::PrintDataTo(StringStream* stream) { |
+ InputAt(0)->PrintTo(stream); |
+ stream->Add("[%d] <- ", slot_index()); |
+ InputAt(1)->PrintTo(stream); |
} |
@@ -1105,13 +1113,26 @@ LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) { |
} |
+LInstruction* LChunkBuilder::DoContext(HContext* instr) { |
+ return DefineAsRegister(new LContext); |
+} |
+ |
+ |
+LInstruction* LChunkBuilder::DoOuterContext(HOuterContext* instr) { |
+ LOperand* context = UseRegisterAtStart(instr->value()); |
+ return DefineAsRegister(new LOuterContext(context)); |
+} |
+ |
+ |
LInstruction* LChunkBuilder::DoGlobalObject(HGlobalObject* instr) { |
- return DefineAsRegister(new LGlobalObject); |
+ LOperand* context = UseRegisterAtStart(instr->value()); |
+ return DefineAsRegister(new LGlobalObject(context)); |
} |
LInstruction* LChunkBuilder::DoGlobalReceiver(HGlobalReceiver* instr) { |
- return DefineAsRegister(new LGlobalReceiver); |
+ LOperand* global_object = UseRegisterAtStart(instr->value()); |
+ return DefineAsRegister(new LGlobalReceiver(global_object)); |
} |
@@ -1621,7 +1642,22 @@ LInstruction* LChunkBuilder::DoStoreGlobal(HStoreGlobal* instr) { |
LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { |
- return DefineAsRegister(new LLoadContextSlot); |
+ LOperand* context = UseRegisterAtStart(instr->value()); |
+ return DefineAsRegister(new LLoadContextSlot(context)); |
+} |
+ |
+ |
+LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { |
+ LOperand* context; |
+ LOperand* value; |
+ if (instr->NeedsWriteBarrier()) { |
+ context = UseTempRegister(instr->context()); |
+ value = UseTempRegister(instr->value()); |
+ } else { |
+ context = UseRegisterAtStart(instr->context()); |
+ value = UseRegister(instr->value()); |
+ } |
+ return new LStoreContextSlot(context, value); |
} |