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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
8 | 8 |
9 #include "lithium-allocator-inl.h" | 9 #include "lithium-allocator-inl.h" |
10 #include "ia32/lithium-ia32.h" | 10 #include "ia32/lithium-ia32.h" |
(...skipping 2376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2387 } | 2387 } |
2388 | 2388 |
2389 // We only need a scratch register if we have a write barrier or we | 2389 // We only need a scratch register if we have a write barrier or we |
2390 // have a store into the properties array (not in-object-property). | 2390 // have a store into the properties array (not in-object-property). |
2391 LOperand* temp = (!is_in_object || needs_write_barrier || | 2391 LOperand* temp = (!is_in_object || needs_write_barrier || |
2392 needs_write_barrier_for_map) ? TempRegister() : NULL; | 2392 needs_write_barrier_for_map) ? TempRegister() : NULL; |
2393 | 2393 |
2394 // We need a temporary register for write barrier of the map field. | 2394 // We need a temporary register for write barrier of the map field. |
2395 LOperand* temp_map = needs_write_barrier_for_map ? TempRegister() : NULL; | 2395 LOperand* temp_map = needs_write_barrier_for_map ? TempRegister() : NULL; |
2396 | 2396 |
2397 LInstruction* result = | 2397 return new(zone()) LStoreNamedField(obj, val, temp, temp_map); |
2398 new(zone()) LStoreNamedField(obj, val, temp, temp_map); | |
2399 if (!instr->access().IsExternalMemory() && | |
2400 instr->field_representation().IsHeapObject() && | |
2401 (val->IsConstantOperand() | |
2402 ? HConstant::cast(instr->value())->HasSmiValue() | |
2403 : !instr->value()->type().IsHeapObject())) { | |
2404 result = AssignEnvironment(result); | |
2405 } | |
2406 return result; | |
2407 } | 2398 } |
2408 | 2399 |
2409 | 2400 |
2410 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { | 2401 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { |
2411 LOperand* context = UseFixed(instr->context(), esi); | 2402 LOperand* context = UseFixed(instr->context(), esi); |
2412 LOperand* object = UseFixed(instr->object(), edx); | 2403 LOperand* object = UseFixed(instr->object(), edx); |
2413 LOperand* value = UseFixed(instr->value(), eax); | 2404 LOperand* value = UseFixed(instr->value(), eax); |
2414 | 2405 |
2415 LStoreNamedGeneric* result = | 2406 LStoreNamedGeneric* result = |
2416 new(zone()) LStoreNamedGeneric(context, object, value); | 2407 new(zone()) LStoreNamedGeneric(context, object, value); |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2672 LOperand* index = UseTempRegister(instr->index()); | 2663 LOperand* index = UseTempRegister(instr->index()); |
2673 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2664 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
2674 LInstruction* result = DefineSameAsFirst(load); | 2665 LInstruction* result = DefineSameAsFirst(load); |
2675 return AssignPointerMap(result); | 2666 return AssignPointerMap(result); |
2676 } | 2667 } |
2677 | 2668 |
2678 | 2669 |
2679 } } // namespace v8::internal | 2670 } } // namespace v8::internal |
2680 | 2671 |
2681 #endif // V8_TARGET_ARCH_IA32 | 2672 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |