OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 "src/crankshaft/arm64/lithium-arm64.h" | 5 #include "src/crankshaft/arm64/lithium-arm64.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" | 9 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" |
10 #include "src/crankshaft/hydrogen-osr.h" | 10 #include "src/crankshaft/hydrogen-osr.h" |
(...skipping 1489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1500 HEnvironment* outer = | 1500 HEnvironment* outer = |
1501 current_block_->last_environment()->DiscardInlined(false); | 1501 current_block_->last_environment()->DiscardInlined(false); |
1502 current_block_->UpdateEnvironment(outer); | 1502 current_block_->UpdateEnvironment(outer); |
1503 | 1503 |
1504 return pop; | 1504 return pop; |
1505 } | 1505 } |
1506 | 1506 |
1507 | 1507 |
1508 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { | 1508 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { |
1509 LOperand* context = UseRegisterAtStart(instr->value()); | 1509 LOperand* context = UseRegisterAtStart(instr->value()); |
1510 return DefineAsRegister(new (zone()) LLoadContextSlot(context)); | 1510 LInstruction* result = |
| 1511 DefineAsRegister(new(zone()) LLoadContextSlot(context)); |
| 1512 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { |
| 1513 result = AssignEnvironment(result); |
| 1514 } |
| 1515 return result; |
1511 } | 1516 } |
1512 | 1517 |
1513 | 1518 |
1514 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( | 1519 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( |
1515 HLoadFunctionPrototype* instr) { | 1520 HLoadFunctionPrototype* instr) { |
1516 LOperand* function = UseRegister(instr->function()); | 1521 LOperand* function = UseRegister(instr->function()); |
1517 LOperand* temp = TempRegister(); | 1522 LOperand* temp = TempRegister(); |
1518 return AssignEnvironment(DefineAsRegister( | 1523 return AssignEnvironment(DefineAsRegister( |
1519 new(zone()) LLoadFunctionPrototype(function, temp))); | 1524 new(zone()) LLoadFunctionPrototype(function, temp))); |
1520 } | 1525 } |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2086 LOperand* value; | 2091 LOperand* value; |
2087 if (instr->NeedsWriteBarrier()) { | 2092 if (instr->NeedsWriteBarrier()) { |
2088 // TODO(all): Replace these constraints when RecordWriteStub has been | 2093 // TODO(all): Replace these constraints when RecordWriteStub has been |
2089 // rewritten. | 2094 // rewritten. |
2090 context = UseRegisterAndClobber(instr->context()); | 2095 context = UseRegisterAndClobber(instr->context()); |
2091 value = UseRegisterAndClobber(instr->value()); | 2096 value = UseRegisterAndClobber(instr->value()); |
2092 } else { | 2097 } else { |
2093 context = UseRegister(instr->context()); | 2098 context = UseRegister(instr->context()); |
2094 value = UseRegister(instr->value()); | 2099 value = UseRegister(instr->value()); |
2095 } | 2100 } |
2096 return new (zone()) LStoreContextSlot(context, value, temp); | 2101 LInstruction* result = new(zone()) LStoreContextSlot(context, value, temp); |
| 2102 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { |
| 2103 result = AssignEnvironment(result); |
| 2104 } |
| 2105 return result; |
2097 } | 2106 } |
2098 | 2107 |
2099 | 2108 |
2100 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { | 2109 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { |
2101 LOperand* key = UseRegisterOrConstant(instr->key()); | 2110 LOperand* key = UseRegisterOrConstant(instr->key()); |
2102 LOperand* temp = NULL; | 2111 LOperand* temp = NULL; |
2103 LOperand* elements = NULL; | 2112 LOperand* elements = NULL; |
2104 LOperand* val = NULL; | 2113 LOperand* val = NULL; |
2105 | 2114 |
2106 if (!instr->is_fixed_typed_array() && | 2115 if (!instr->is_fixed_typed_array() && |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2480 | 2489 |
2481 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { | 2490 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { |
2482 LOperand* receiver = UseRegister(instr->receiver()); | 2491 LOperand* receiver = UseRegister(instr->receiver()); |
2483 LOperand* function = UseRegister(instr->function()); | 2492 LOperand* function = UseRegister(instr->function()); |
2484 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function); | 2493 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function); |
2485 return AssignEnvironment(DefineAsRegister(result)); | 2494 return AssignEnvironment(DefineAsRegister(result)); |
2486 } | 2495 } |
2487 | 2496 |
2488 } // namespace internal | 2497 } // namespace internal |
2489 } // namespace v8 | 2498 } // namespace v8 |
OLD | NEW |