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 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 return chunk_; | 471 return chunk_; |
472 } | 472 } |
473 | 473 |
474 | 474 |
475 void LChunkBuilder::Abort(BailoutReason reason) { | 475 void LChunkBuilder::Abort(BailoutReason reason) { |
476 info()->set_bailout_reason(reason); | 476 info()->set_bailout_reason(reason); |
477 status_ = ABORTED; | 477 status_ = ABORTED; |
478 } | 478 } |
479 | 479 |
480 | 480 |
481 void LChunkBuilder::AddDeprecationDependency(Handle<Map> map) { | |
482 if (map->is_deprecated()) return Abort(kMapBecameDeprecated); | |
483 chunk_->AddDeprecationDependency(map); | |
484 } | |
485 | |
486 | |
487 LUnallocated* LChunkBuilder::ToUnallocated(Register reg) { | 481 LUnallocated* LChunkBuilder::ToUnallocated(Register reg) { |
488 return new(zone()) LUnallocated(LUnallocated::FIXED_REGISTER, | 482 return new(zone()) LUnallocated(LUnallocated::FIXED_REGISTER, |
489 Register::ToAllocationIndex(reg)); | 483 Register::ToAllocationIndex(reg)); |
490 } | 484 } |
491 | 485 |
492 | 486 |
493 LUnallocated* LChunkBuilder::ToUnallocated(XMMRegister reg) { | 487 LUnallocated* LChunkBuilder::ToUnallocated(XMMRegister reg) { |
494 return new(zone()) LUnallocated(LUnallocated::FIXED_DOUBLE_REGISTER, | 488 return new(zone()) LUnallocated(LUnallocated::FIXED_DOUBLE_REGISTER, |
495 XMMRegister::ToAllocationIndex(reg)); | 489 XMMRegister::ToAllocationIndex(reg)); |
496 } | 490 } |
(...skipping 1924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2421 } | 2415 } |
2422 | 2416 |
2423 // We only need a scratch register if we have a write barrier or we | 2417 // We only need a scratch register if we have a write barrier or we |
2424 // have a store into the properties array (not in-object-property). | 2418 // have a store into the properties array (not in-object-property). |
2425 LOperand* temp = (!is_in_object || needs_write_barrier || | 2419 LOperand* temp = (!is_in_object || needs_write_barrier || |
2426 needs_write_barrier_for_map) ? TempRegister() : NULL; | 2420 needs_write_barrier_for_map) ? TempRegister() : NULL; |
2427 | 2421 |
2428 // We need a temporary register for write barrier of the map field. | 2422 // We need a temporary register for write barrier of the map field. |
2429 LOperand* temp_map = needs_write_barrier_for_map ? TempRegister() : NULL; | 2423 LOperand* temp_map = needs_write_barrier_for_map ? TempRegister() : NULL; |
2430 | 2424 |
2431 // Add a deprecation dependency on the transition target map. | |
2432 if (instr->has_transition()) { | |
2433 AddDeprecationDependency(instr->transition_map()); | |
2434 } | |
2435 | |
2436 LInstruction* result = | 2425 LInstruction* result = |
2437 new(zone()) LStoreNamedField(obj, val, temp, temp_map); | 2426 new(zone()) LStoreNamedField(obj, val, temp, temp_map); |
2438 if (!instr->access().IsExternalMemory() && | 2427 if (!instr->access().IsExternalMemory() && |
2439 instr->field_representation().IsHeapObject() && | 2428 instr->field_representation().IsHeapObject() && |
2440 (val->IsConstantOperand() | 2429 (val->IsConstantOperand() |
2441 ? HConstant::cast(instr->value())->HasSmiValue() | 2430 ? HConstant::cast(instr->value())->HasSmiValue() |
2442 : !instr->value()->type().IsHeapObject())) { | 2431 : !instr->value()->type().IsHeapObject())) { |
2443 result = AssignEnvironment(result); | 2432 result = AssignEnvironment(result); |
2444 } | 2433 } |
2445 return result; | 2434 return result; |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2711 LOperand* index = UseTempRegister(instr->index()); | 2700 LOperand* index = UseTempRegister(instr->index()); |
2712 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2701 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
2713 LInstruction* result = DefineSameAsFirst(load); | 2702 LInstruction* result = DefineSameAsFirst(load); |
2714 return AssignPointerMap(result); | 2703 return AssignPointerMap(result); |
2715 } | 2704 } |
2716 | 2705 |
2717 | 2706 |
2718 } } // namespace v8::internal | 2707 } } // namespace v8::internal |
2719 | 2708 |
2720 #endif // V8_TARGET_ARCH_IA32 | 2709 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |