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

Side by Side Diff: src/crankshaft/ppc/lithium-ppc.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/ppc/lithium-codegen-ppc.cc ('k') | src/crankshaft/s390/lithium-codegen-s390.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/ppc/lithium-ppc.h" 5 #include "src/crankshaft/ppc/lithium-ppc.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/crankshaft/hydrogen-osr.h" 9 #include "src/crankshaft/hydrogen-osr.h"
10 #include "src/crankshaft/lithium-inl.h" 10 #include "src/crankshaft/lithium-inl.h"
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 875
876 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { 876 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
877 return new (zone()) LGoto(instr->FirstSuccessor()); 877 return new (zone()) LGoto(instr->FirstSuccessor());
878 } 878 }
879 879
880 880
881 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { 881 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) {
882 HValue* value = instr->value(); 882 HValue* value = instr->value();
883 Representation r = value->representation(); 883 Representation r = value->representation();
884 HType type = value->type(); 884 HType type = value->type();
885 ToBooleanICStub::Types expected = instr->expected_input_types(); 885 ToBooleanHints expected = instr->expected_input_types();
886 if (expected.IsEmpty()) expected = ToBooleanICStub::Types::Generic(); 886 if (expected == ToBooleanHint::kNone) expected = ToBooleanHint::kAny;
887 887
888 bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() || 888 bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() ||
889 type.IsJSArray() || type.IsHeapNumber() || type.IsString(); 889 type.IsJSArray() || type.IsHeapNumber() || type.IsString();
890 LInstruction* branch = new (zone()) LBranch(UseRegister(value)); 890 LInstruction* branch = new (zone()) LBranch(UseRegister(value));
891 if (!easy_case && 891 if (!easy_case && ((!(expected & ToBooleanHint::kSmallInteger) &&
892 ((!expected.Contains(ToBooleanICStub::SMI) && expected.NeedsMap()) || 892 (expected & ToBooleanHint::kNeedsMap)) ||
893 !expected.IsGeneric())) { 893 expected != ToBooleanHint::kAny)) {
894 branch = AssignEnvironment(branch); 894 branch = AssignEnvironment(branch);
895 } 895 }
896 return branch; 896 return branch;
897 } 897 }
898 898
899 899
900 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) { 900 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) {
901 return new (zone()) LDebugBreak(); 901 return new (zone()) LDebugBreak();
902 } 902 }
903 903
(...skipping 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after
2362 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2362 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2363 LOperand* object = UseRegister(instr->object()); 2363 LOperand* object = UseRegister(instr->object());
2364 LOperand* index = UseTempRegister(instr->index()); 2364 LOperand* index = UseTempRegister(instr->index());
2365 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index); 2365 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index);
2366 LInstruction* result = DefineSameAsFirst(load); 2366 LInstruction* result = DefineSameAsFirst(load);
2367 return AssignPointerMap(result); 2367 return AssignPointerMap(result);
2368 } 2368 }
2369 2369
2370 } // namespace internal 2370 } // namespace internal
2371 } // namespace v8 2371 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ppc/lithium-codegen-ppc.cc ('k') | src/crankshaft/s390/lithium-codegen-s390.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698