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 "mips/lithium-mips.h" | 8 #include "mips/lithium-mips.h" |
9 #include "mips/lithium-codegen-mips.h" | 9 #include "mips/lithium-codegen-mips.h" |
10 #include "hydrogen-osr.h" | 10 #include "hydrogen-osr.h" |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 return chunk_; | 427 return chunk_; |
428 } | 428 } |
429 | 429 |
430 | 430 |
431 void LCodeGen::Abort(BailoutReason reason) { | 431 void LCodeGen::Abort(BailoutReason reason) { |
432 info()->set_bailout_reason(reason); | 432 info()->set_bailout_reason(reason); |
433 status_ = ABORTED; | 433 status_ = ABORTED; |
434 } | 434 } |
435 | 435 |
436 | 436 |
| 437 void LChunkBuilder::AddDeprecationDependency(Handle<Map> map) { |
| 438 if (map->is_deprecated()) return Abort(kMapBecameDeprecated); |
| 439 chunk_->AddDeprecationDependency(map); |
| 440 } |
| 441 |
| 442 |
437 LUnallocated* LChunkBuilder::ToUnallocated(Register reg) { | 443 LUnallocated* LChunkBuilder::ToUnallocated(Register reg) { |
438 return new(zone()) LUnallocated(LUnallocated::FIXED_REGISTER, | 444 return new(zone()) LUnallocated(LUnallocated::FIXED_REGISTER, |
439 Register::ToAllocationIndex(reg)); | 445 Register::ToAllocationIndex(reg)); |
440 } | 446 } |
441 | 447 |
442 | 448 |
443 LUnallocated* LChunkBuilder::ToUnallocated(DoubleRegister reg) { | 449 LUnallocated* LChunkBuilder::ToUnallocated(DoubleRegister reg) { |
444 return new(zone()) LUnallocated(LUnallocated::FIXED_DOUBLE_REGISTER, | 450 return new(zone()) LUnallocated(LUnallocated::FIXED_DOUBLE_REGISTER, |
445 DoubleRegister::ToAllocationIndex(reg)); | 451 DoubleRegister::ToAllocationIndex(reg)); |
446 } | 452 } |
(...skipping 1797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2244 val = UseTempRegister(instr->value()); | 2250 val = UseTempRegister(instr->value()); |
2245 } else if (instr->field_representation().IsDouble()) { | 2251 } else if (instr->field_representation().IsDouble()) { |
2246 val = UseRegisterAtStart(instr->value()); | 2252 val = UseRegisterAtStart(instr->value()); |
2247 } else { | 2253 } else { |
2248 val = UseRegister(instr->value()); | 2254 val = UseRegister(instr->value()); |
2249 } | 2255 } |
2250 | 2256 |
2251 // We need a temporary register for write barrier of the map field. | 2257 // We need a temporary register for write barrier of the map field. |
2252 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; | 2258 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; |
2253 | 2259 |
| 2260 // Add a deprecation dependency on the transition target map. |
| 2261 if (instr->has_transition()) { |
| 2262 AddDeprecationDependency(instr->transition_map()); |
| 2263 } |
| 2264 |
2254 LInstruction* result = new(zone()) LStoreNamedField(obj, val, temp); | 2265 LInstruction* result = new(zone()) LStoreNamedField(obj, val, temp); |
2255 if (!instr->access().IsExternalMemory() && | 2266 if (!instr->access().IsExternalMemory() && |
2256 instr->field_representation().IsHeapObject() && | 2267 instr->field_representation().IsHeapObject() && |
2257 !instr->value()->type().IsHeapObject()) { | 2268 !instr->value()->type().IsHeapObject()) { |
2258 result = AssignEnvironment(result); | 2269 result = AssignEnvironment(result); |
2259 } | 2270 } |
2260 return result; | 2271 return result; |
2261 } | 2272 } |
2262 | 2273 |
2263 | 2274 |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2511 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2522 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2512 LOperand* object = UseRegister(instr->object()); | 2523 LOperand* object = UseRegister(instr->object()); |
2513 LOperand* index = UseRegister(instr->index()); | 2524 LOperand* index = UseRegister(instr->index()); |
2514 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2525 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
2515 LInstruction* result = DefineSameAsFirst(load); | 2526 LInstruction* result = DefineSameAsFirst(load); |
2516 return AssignPointerMap(result); | 2527 return AssignPointerMap(result); |
2517 } | 2528 } |
2518 | 2529 |
2519 | 2530 |
2520 } } // namespace v8::internal | 2531 } } // namespace v8::internal |
OLD | NEW |