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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 return chunk_; | 438 return chunk_; |
439 } | 439 } |
440 | 440 |
441 | 441 |
442 void LCodeGen::Abort(BailoutReason reason) { | 442 void LCodeGen::Abort(BailoutReason reason) { |
443 info()->set_bailout_reason(reason); | 443 info()->set_bailout_reason(reason); |
444 status_ = ABORTED; | 444 status_ = ABORTED; |
445 } | 445 } |
446 | 446 |
447 | 447 |
| 448 void LChunkBuilder::AddDeprecationDependency(Handle<Map> map) { |
| 449 if (map->is_deprecated()) return Abort(kMapBecameDeprecated); |
| 450 chunk_->AddDeprecationDependency(map); |
| 451 } |
| 452 |
| 453 |
448 LUnallocated* LChunkBuilder::ToUnallocated(Register reg) { | 454 LUnallocated* LChunkBuilder::ToUnallocated(Register reg) { |
449 return new(zone()) LUnallocated(LUnallocated::FIXED_REGISTER, | 455 return new(zone()) LUnallocated(LUnallocated::FIXED_REGISTER, |
450 Register::ToAllocationIndex(reg)); | 456 Register::ToAllocationIndex(reg)); |
451 } | 457 } |
452 | 458 |
453 | 459 |
454 LUnallocated* LChunkBuilder::ToUnallocated(XMMRegister reg) { | 460 LUnallocated* LChunkBuilder::ToUnallocated(XMMRegister reg) { |
455 return new(zone()) LUnallocated(LUnallocated::FIXED_DOUBLE_REGISTER, | 461 return new(zone()) LUnallocated(LUnallocated::FIXED_DOUBLE_REGISTER, |
456 XMMRegister::ToAllocationIndex(reg)); | 462 XMMRegister::ToAllocationIndex(reg)); |
457 } | 463 } |
(...skipping 1849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2307 val = UseRegisterAtStart(instr->value()); | 2313 val = UseRegisterAtStart(instr->value()); |
2308 } else { | 2314 } else { |
2309 val = UseRegister(instr->value()); | 2315 val = UseRegister(instr->value()); |
2310 } | 2316 } |
2311 | 2317 |
2312 // We only need a scratch register if we have a write barrier or we | 2318 // We only need a scratch register if we have a write barrier or we |
2313 // have a store into the properties array (not in-object-property). | 2319 // have a store into the properties array (not in-object-property). |
2314 LOperand* temp = (!is_in_object || needs_write_barrier || | 2320 LOperand* temp = (!is_in_object || needs_write_barrier || |
2315 needs_write_barrier_for_map) ? TempRegister() : NULL; | 2321 needs_write_barrier_for_map) ? TempRegister() : NULL; |
2316 | 2322 |
| 2323 // Add a deprecation dependency on the transition target map. |
| 2324 if (instr->has_transition()) { |
| 2325 AddDeprecationDependency(instr->transition_map()); |
| 2326 } |
| 2327 |
2317 LInstruction* result = new(zone()) LStoreNamedField(obj, val, temp); | 2328 LInstruction* result = new(zone()) LStoreNamedField(obj, val, temp); |
2318 if (!instr->access().IsExternalMemory() && | 2329 if (!instr->access().IsExternalMemory() && |
2319 instr->field_representation().IsHeapObject() && | 2330 instr->field_representation().IsHeapObject() && |
2320 (val->IsConstantOperand() | 2331 (val->IsConstantOperand() |
2321 ? HConstant::cast(instr->value())->HasSmiValue() | 2332 ? HConstant::cast(instr->value())->HasSmiValue() |
2322 : !instr->value()->type().IsHeapObject())) { | 2333 : !instr->value()->type().IsHeapObject())) { |
2323 result = AssignEnvironment(result); | 2334 result = AssignEnvironment(result); |
2324 } | 2335 } |
2325 return result; | 2336 return result; |
2326 } | 2337 } |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2588 LOperand* index = UseTempRegister(instr->index()); | 2599 LOperand* index = UseTempRegister(instr->index()); |
2589 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2600 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
2590 LInstruction* result = DefineSameAsFirst(load); | 2601 LInstruction* result = DefineSameAsFirst(load); |
2591 return AssignPointerMap(result); | 2602 return AssignPointerMap(result); |
2592 } | 2603 } |
2593 | 2604 |
2594 | 2605 |
2595 } } // namespace v8::internal | 2606 } } // namespace v8::internal |
2596 | 2607 |
2597 #endif // V8_TARGET_ARCH_X64 | 2608 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |