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