| 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 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 927 type.IsHeapNumber()) { | 927 type.IsHeapNumber()) { |
| 928 // These types have simple checks that cannot deoptimize. | 928 // These types have simple checks that cannot deoptimize. |
| 929 return new(zone()) LBranch(UseRegister(value), NULL, NULL); | 929 return new(zone()) LBranch(UseRegister(value), NULL, NULL); |
| 930 } | 930 } |
| 931 | 931 |
| 932 if (type.IsString()) { | 932 if (type.IsString()) { |
| 933 // This type cannot deoptimize, but needs a scratch register. | 933 // This type cannot deoptimize, but needs a scratch register. |
| 934 return new(zone()) LBranch(UseRegister(value), TempRegister(), NULL); | 934 return new(zone()) LBranch(UseRegister(value), TempRegister(), NULL); |
| 935 } | 935 } |
| 936 | 936 |
| 937 ToBooleanICStub::Types expected = instr->expected_input_types(); | 937 ToBooleanHints expected = instr->expected_input_types(); |
| 938 bool needs_temps = expected.NeedsMap() || expected.IsEmpty(); | 938 bool needs_temps = (expected & ToBooleanHint::kNeedsMap) || |
| 939 expected == ToBooleanHint::kNone; |
| 939 LOperand* temp1 = needs_temps ? TempRegister() : NULL; | 940 LOperand* temp1 = needs_temps ? TempRegister() : NULL; |
| 940 LOperand* temp2 = needs_temps ? TempRegister() : NULL; | 941 LOperand* temp2 = needs_temps ? TempRegister() : NULL; |
| 941 | 942 |
| 942 if (expected.IsGeneric() || expected.IsEmpty()) { | 943 if (expected == ToBooleanHint::kAny || expected == ToBooleanHint::kNone) { |
| 943 // The generic case cannot deoptimize because it already supports every | 944 // The generic case cannot deoptimize because it already supports every |
| 944 // possible input type. | 945 // possible input type. |
| 945 DCHECK(needs_temps); | 946 DCHECK(needs_temps); |
| 946 return new(zone()) LBranch(UseRegister(value), temp1, temp2); | 947 return new(zone()) LBranch(UseRegister(value), temp1, temp2); |
| 947 } else { | 948 } else { |
| 948 return AssignEnvironment( | 949 return AssignEnvironment( |
| 949 new(zone()) LBranch(UseRegister(value), temp1, temp2)); | 950 new(zone()) LBranch(UseRegister(value), temp1, temp2)); |
| 950 } | 951 } |
| 951 } | 952 } |
| 952 } | 953 } |
| (...skipping 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2489 | 2490 |
| 2490 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { | 2491 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { |
| 2491 LOperand* receiver = UseRegister(instr->receiver()); | 2492 LOperand* receiver = UseRegister(instr->receiver()); |
| 2492 LOperand* function = UseRegister(instr->function()); | 2493 LOperand* function = UseRegister(instr->function()); |
| 2493 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function); | 2494 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function); |
| 2494 return AssignEnvironment(DefineAsRegister(result)); | 2495 return AssignEnvironment(DefineAsRegister(result)); |
| 2495 } | 2496 } |
| 2496 | 2497 |
| 2497 } // namespace internal | 2498 } // namespace internal |
| 2498 } // namespace v8 | 2499 } // namespace v8 |
| OLD | NEW |