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

Side by Side Diff: src/crankshaft/arm/lithium-arm.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/compiler/type-hint-analyzer.cc ('k') | src/crankshaft/arm/lithium-codegen-arm.cc » ('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 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 "src/crankshaft/arm/lithium-arm.h" 5 #include "src/crankshaft/arm/lithium-arm.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/crankshaft/arm/lithium-codegen-arm.h" 9 #include "src/crankshaft/arm/lithium-codegen-arm.h"
10 #include "src/crankshaft/hydrogen-osr.h" 10 #include "src/crankshaft/hydrogen-osr.h"
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 860
861 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { 861 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
862 return new(zone()) LGoto(instr->FirstSuccessor()); 862 return new(zone()) LGoto(instr->FirstSuccessor());
863 } 863 }
864 864
865 865
866 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { 866 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) {
867 HValue* value = instr->value(); 867 HValue* value = instr->value();
868 Representation r = value->representation(); 868 Representation r = value->representation();
869 HType type = value->type(); 869 HType type = value->type();
870 ToBooleanICStub::Types expected = instr->expected_input_types(); 870 ToBooleanHints expected = instr->expected_input_types();
871 if (expected.IsEmpty()) expected = ToBooleanICStub::Types::Generic(); 871 if (expected == ToBooleanHint::kNone) expected = ToBooleanHint::kAny;
872 872
873 bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() || 873 bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() ||
874 type.IsJSArray() || type.IsHeapNumber() || type.IsString(); 874 type.IsJSArray() || type.IsHeapNumber() || type.IsString();
875 LInstruction* branch = new(zone()) LBranch(UseRegister(value)); 875 LInstruction* branch = new(zone()) LBranch(UseRegister(value));
876 if (!easy_case && 876 if (!easy_case && ((!(expected & ToBooleanHint::kSmallInteger) &&
877 ((!expected.Contains(ToBooleanICStub::SMI) && expected.NeedsMap()) || 877 (expected & ToBooleanHint::kNeedsMap)) ||
878 !expected.IsGeneric())) { 878 expected != ToBooleanHint::kAny)) {
879 branch = AssignEnvironment(branch); 879 branch = AssignEnvironment(branch);
880 } 880 }
881 return branch; 881 return branch;
882 } 882 }
883 883
884 884
885 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) { 885 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) {
886 return new(zone()) LDebugBreak(); 886 return new(zone()) LDebugBreak();
887 } 887 }
888 888
(...skipping 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after
2392 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2392 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2393 LOperand* object = UseRegister(instr->object()); 2393 LOperand* object = UseRegister(instr->object());
2394 LOperand* index = UseTempRegister(instr->index()); 2394 LOperand* index = UseTempRegister(instr->index());
2395 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); 2395 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index);
2396 LInstruction* result = DefineSameAsFirst(load); 2396 LInstruction* result = DefineSameAsFirst(load);
2397 return AssignPointerMap(result); 2397 return AssignPointerMap(result);
2398 } 2398 }
2399 2399
2400 } // namespace internal 2400 } // namespace internal
2401 } // namespace v8 2401 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/type-hint-analyzer.cc ('k') | src/crankshaft/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698