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 #include "lithium-allocator-inl.h" | 7 #include "lithium-allocator-inl.h" |
8 #include "arm/lithium-arm.h" | 8 #include "arm/lithium-arm.h" |
9 #include "arm/lithium-codegen-arm.h" | 9 #include "arm/lithium-codegen-arm.h" |
10 #include "hydrogen-osr.h" | 10 #include "hydrogen-osr.h" |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 return chunk_; | 422 return chunk_; |
423 } | 423 } |
424 | 424 |
425 | 425 |
426 void LChunkBuilder::Abort(BailoutReason reason) { | 426 void LChunkBuilder::Abort(BailoutReason reason) { |
427 info()->set_bailout_reason(reason); | 427 info()->set_bailout_reason(reason); |
428 status_ = ABORTED; | 428 status_ = ABORTED; |
429 } | 429 } |
430 | 430 |
431 | 431 |
| 432 void LChunkBuilder::AddDeprecationDependency(Handle<Map> map) { |
| 433 if (map->is_deprecated()) return Abort(kMapBecameDeprecated); |
| 434 chunk_->AddDeprecationDependency(map); |
| 435 } |
| 436 |
| 437 |
432 LUnallocated* LChunkBuilder::ToUnallocated(Register reg) { | 438 LUnallocated* LChunkBuilder::ToUnallocated(Register reg) { |
433 return new(zone()) LUnallocated(LUnallocated::FIXED_REGISTER, | 439 return new(zone()) LUnallocated(LUnallocated::FIXED_REGISTER, |
434 Register::ToAllocationIndex(reg)); | 440 Register::ToAllocationIndex(reg)); |
435 } | 441 } |
436 | 442 |
437 | 443 |
438 LUnallocated* LChunkBuilder::ToUnallocated(DoubleRegister reg) { | 444 LUnallocated* LChunkBuilder::ToUnallocated(DoubleRegister reg) { |
439 return new(zone()) LUnallocated(LUnallocated::FIXED_DOUBLE_REGISTER, | 445 return new(zone()) LUnallocated(LUnallocated::FIXED_DOUBLE_REGISTER, |
440 DoubleRegister::ToAllocationIndex(reg)); | 446 DoubleRegister::ToAllocationIndex(reg)); |
441 } | 447 } |
(...skipping 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2293 val = UseTempRegister(instr->value()); | 2299 val = UseTempRegister(instr->value()); |
2294 } else if (instr->field_representation().IsDouble()) { | 2300 } else if (instr->field_representation().IsDouble()) { |
2295 val = UseRegisterAtStart(instr->value()); | 2301 val = UseRegisterAtStart(instr->value()); |
2296 } else { | 2302 } else { |
2297 val = UseRegister(instr->value()); | 2303 val = UseRegister(instr->value()); |
2298 } | 2304 } |
2299 | 2305 |
2300 // We need a temporary register for write barrier of the map field. | 2306 // We need a temporary register for write barrier of the map field. |
2301 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; | 2307 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; |
2302 | 2308 |
| 2309 // Add a deprecation dependency on the transition target map. |
| 2310 if (instr->has_transition()) { |
| 2311 AddDeprecationDependency(instr->transition_map()); |
| 2312 } |
| 2313 |
2303 LInstruction* result = new(zone()) LStoreNamedField(obj, val, temp); | 2314 LInstruction* result = new(zone()) LStoreNamedField(obj, val, temp); |
2304 if (!instr->access().IsExternalMemory() && | 2315 if (!instr->access().IsExternalMemory() && |
2305 instr->field_representation().IsHeapObject() && | 2316 instr->field_representation().IsHeapObject() && |
2306 !instr->value()->type().IsHeapObject()) { | 2317 !instr->value()->type().IsHeapObject()) { |
2307 result = AssignEnvironment(result); | 2318 result = AssignEnvironment(result); |
2308 } | 2319 } |
2309 return result; | 2320 return result; |
2310 } | 2321 } |
2311 | 2322 |
2312 | 2323 |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2559 | 2570 |
2560 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2571 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2561 LOperand* object = UseRegister(instr->object()); | 2572 LOperand* object = UseRegister(instr->object()); |
2562 LOperand* index = UseRegister(instr->index()); | 2573 LOperand* index = UseRegister(instr->index()); |
2563 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2574 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
2564 LInstruction* result = DefineSameAsFirst(load); | 2575 LInstruction* result = DefineSameAsFirst(load); |
2565 return AssignPointerMap(result); | 2576 return AssignPointerMap(result); |
2566 } | 2577 } |
2567 | 2578 |
2568 } } // namespace v8::internal | 2579 } } // namespace v8::internal |
OLD | NEW |