Index: src/x64/lithium-x64.cc |
diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc |
index b74b1a8a9a1408873784bb8c146f1f4c6521732b..714d5f1b88e647eedb7b5cf851807de96fb7cf98 100644 |
--- a/src/x64/lithium-x64.cc |
+++ b/src/x64/lithium-x64.cc |
@@ -2263,13 +2263,14 @@ LInstruction* LChunkBuilder::DoTrapAllocationMemento( |
LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { |
+ bool is_in_object = instr->access().IsInobject(); |
bool needs_write_barrier = instr->NeedsWriteBarrier(); |
bool needs_write_barrier_for_map = !instr->transition().is_null() && |
instr->NeedsWriteBarrierForMap(); |
LOperand* obj; |
if (needs_write_barrier) { |
- obj = instr->is_in_object() |
+ obj = is_in_object |
? UseRegister(instr->object()) |
: UseTempRegister(instr->object()); |
} else { |
@@ -2298,7 +2299,7 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { |
// We only need a scratch register if we have a write barrier or we |
// have a store into the properties array (not in-object-property). |
- LOperand* temp = (!instr->is_in_object() || needs_write_barrier || |
+ LOperand* temp = (!is_in_object || needs_write_barrier || |
needs_write_barrier_for_map) ? TempRegister() : NULL; |
LStoreNamedField* result = new(zone()) LStoreNamedField(obj, val, temp); |