| 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_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 8 | 8 |
| 9 #include "lithium-allocator-inl.h" | 9 #include "lithium-allocator-inl.h" |
| 10 #include "x87/lithium-x87.h" | 10 #include "x87/lithium-x87.h" |
| (...skipping 2361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2372 } | 2372 } |
| 2373 | 2373 |
| 2374 // We only need a scratch register if we have a write barrier or we | 2374 // We only need a scratch register if we have a write barrier or we |
| 2375 // have a store into the properties array (not in-object-property). | 2375 // have a store into the properties array (not in-object-property). |
| 2376 LOperand* temp = (!is_in_object || needs_write_barrier || | 2376 LOperand* temp = (!is_in_object || needs_write_barrier || |
| 2377 needs_write_barrier_for_map) ? TempRegister() : NULL; | 2377 needs_write_barrier_for_map) ? TempRegister() : NULL; |
| 2378 | 2378 |
| 2379 // We need a temporary register for write barrier of the map field. | 2379 // We need a temporary register for write barrier of the map field. |
| 2380 LOperand* temp_map = needs_write_barrier_for_map ? TempRegister() : NULL; | 2380 LOperand* temp_map = needs_write_barrier_for_map ? TempRegister() : NULL; |
| 2381 | 2381 |
| 2382 LInstruction* result = | 2382 return new(zone()) LStoreNamedField(obj, val, temp, temp_map); |
| 2383 new(zone()) LStoreNamedField(obj, val, temp, temp_map); | |
| 2384 if (!instr->access().IsExternalMemory() && | |
| 2385 instr->field_representation().IsHeapObject() && | |
| 2386 (val->IsConstantOperand() | |
| 2387 ? HConstant::cast(instr->value())->HasSmiValue() | |
| 2388 : !instr->value()->type().IsHeapObject())) { | |
| 2389 result = AssignEnvironment(result); | |
| 2390 } | |
| 2391 return result; | |
| 2392 } | 2383 } |
| 2393 | 2384 |
| 2394 | 2385 |
| 2395 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { | 2386 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { |
| 2396 LOperand* context = UseFixed(instr->context(), esi); | 2387 LOperand* context = UseFixed(instr->context(), esi); |
| 2397 LOperand* object = UseFixed(instr->object(), edx); | 2388 LOperand* object = UseFixed(instr->object(), edx); |
| 2398 LOperand* value = UseFixed(instr->value(), eax); | 2389 LOperand* value = UseFixed(instr->value(), eax); |
| 2399 | 2390 |
| 2400 LStoreNamedGeneric* result = | 2391 LStoreNamedGeneric* result = |
| 2401 new(zone()) LStoreNamedGeneric(context, object, value); | 2392 new(zone()) LStoreNamedGeneric(context, object, value); |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2657 LOperand* index = UseTempRegister(instr->index()); | 2648 LOperand* index = UseTempRegister(instr->index()); |
| 2658 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2649 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
| 2659 LInstruction* result = DefineSameAsFirst(load); | 2650 LInstruction* result = DefineSameAsFirst(load); |
| 2660 return AssignPointerMap(result); | 2651 return AssignPointerMap(result); |
| 2661 } | 2652 } |
| 2662 | 2653 |
| 2663 | 2654 |
| 2664 } } // namespace v8::internal | 2655 } } // namespace v8::internal |
| 2665 | 2656 |
| 2666 #endif // V8_TARGET_ARCH_X87 | 2657 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |