| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "v8.h" | 5 #include "v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "lithium-allocator-inl.h" | 9 #include "lithium-allocator-inl.h" |
| 10 #include "x64/lithium-x64.h" | 10 #include "x64/lithium-x64.h" |
| (...skipping 2309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2320 val = UseRegisterAtStart(instr->value()); | 2320 val = UseRegisterAtStart(instr->value()); |
| 2321 } else { | 2321 } else { |
| 2322 val = UseRegister(instr->value()); | 2322 val = UseRegister(instr->value()); |
| 2323 } | 2323 } |
| 2324 | 2324 |
| 2325 // We only need a scratch register if we have a write barrier or we | 2325 // We only need a scratch register if we have a write barrier or we |
| 2326 // have a store into the properties array (not in-object-property). | 2326 // have a store into the properties array (not in-object-property). |
| 2327 LOperand* temp = (!is_in_object || needs_write_barrier || | 2327 LOperand* temp = (!is_in_object || needs_write_barrier || |
| 2328 needs_write_barrier_for_map) ? TempRegister() : NULL; | 2328 needs_write_barrier_for_map) ? TempRegister() : NULL; |
| 2329 | 2329 |
| 2330 LInstruction* result = new(zone()) LStoreNamedField(obj, val, temp); | 2330 return new(zone()) LStoreNamedField(obj, val, temp); |
| 2331 if (!instr->access().IsExternalMemory() && | |
| 2332 instr->field_representation().IsHeapObject() && | |
| 2333 (val->IsConstantOperand() | |
| 2334 ? HConstant::cast(instr->value())->HasSmiValue() | |
| 2335 : !instr->value()->type().IsHeapObject())) { | |
| 2336 result = AssignEnvironment(result); | |
| 2337 } | |
| 2338 return result; | |
| 2339 } | 2331 } |
| 2340 | 2332 |
| 2341 | 2333 |
| 2342 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { | 2334 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { |
| 2343 LOperand* context = UseFixed(instr->context(), rsi); | 2335 LOperand* context = UseFixed(instr->context(), rsi); |
| 2344 LOperand* object = UseFixed(instr->object(), rdx); | 2336 LOperand* object = UseFixed(instr->object(), rdx); |
| 2345 LOperand* value = UseFixed(instr->value(), rax); | 2337 LOperand* value = UseFixed(instr->value(), rax); |
| 2346 | 2338 |
| 2347 LStoreNamedGeneric* result = | 2339 LStoreNamedGeneric* result = |
| 2348 new(zone()) LStoreNamedGeneric(context, object, value); | 2340 new(zone()) LStoreNamedGeneric(context, object, value); |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2601 LOperand* index = UseTempRegister(instr->index()); | 2593 LOperand* index = UseTempRegister(instr->index()); |
| 2602 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2594 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
| 2603 LInstruction* result = DefineSameAsFirst(load); | 2595 LInstruction* result = DefineSameAsFirst(load); |
| 2604 return AssignPointerMap(result); | 2596 return AssignPointerMap(result); |
| 2605 } | 2597 } |
| 2606 | 2598 |
| 2607 | 2599 |
| 2608 } } // namespace v8::internal | 2600 } } // namespace v8::internal |
| 2609 | 2601 |
| 2610 #endif // V8_TARGET_ARCH_X64 | 2602 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |