Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: src/crankshaft/arm64/lithium-arm64.cc

Issue 2498563002: [cleanup] Replace ToBooleanICStub::Types with ToBooleanHints (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/crankshaft/arm/lithium-codegen-arm.cc ('k') | src/crankshaft/arm64/lithium-codegen-arm64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/crankshaft/arm/lithium-codegen-arm.cc ('k') | src/crankshaft/arm64/lithium-codegen-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698