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

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

Issue 1744163002: [stubs] Introduce a proper ToBooleanStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix mips Created 4 years, 9 months 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/x64/lithium-codegen-x64.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 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 900 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 911
912 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { 912 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
913 return new (zone()) LGoto(instr->FirstSuccessor()); 913 return new (zone()) LGoto(instr->FirstSuccessor());
914 } 914 }
915 915
916 916
917 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { 917 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) {
918 HValue* value = instr->value(); 918 HValue* value = instr->value();
919 Representation r = value->representation(); 919 Representation r = value->representation();
920 HType type = value->type(); 920 HType type = value->type();
921 ToBooleanStub::Types expected = instr->expected_input_types(); 921 ToBooleanICStub::Types expected = instr->expected_input_types();
922 if (expected.IsEmpty()) expected = ToBooleanStub::Types::Generic(); 922 if (expected.IsEmpty()) expected = ToBooleanICStub::Types::Generic();
923 923
924 bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() || 924 bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() ||
925 type.IsJSArray() || type.IsHeapNumber() || type.IsString(); 925 type.IsJSArray() || type.IsHeapNumber() || type.IsString();
926 LInstruction* branch = new (zone()) LBranch(UseRegister(value)); 926 LInstruction* branch = new (zone()) LBranch(UseRegister(value));
927 if (!easy_case && 927 if (!easy_case &&
928 ((!expected.Contains(ToBooleanStub::SMI) && expected.NeedsMap()) || 928 ((!expected.Contains(ToBooleanICStub::SMI) && expected.NeedsMap()) ||
929 !expected.IsGeneric())) { 929 !expected.IsGeneric())) {
930 branch = AssignEnvironment(branch); 930 branch = AssignEnvironment(branch);
931 } 931 }
932 return branch; 932 return branch;
933 } 933 }
934 934
935 935
936 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) { 936 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) {
937 return new (zone()) LDebugBreak(); 937 return new (zone()) LDebugBreak();
938 } 938 }
(...skipping 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after
2503 } 2503 }
2504 2504
2505 2505
2506 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { 2506 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) {
2507 LOperand* context = UseRegisterAtStart(instr->context()); 2507 LOperand* context = UseRegisterAtStart(instr->context());
2508 return new (zone()) LStoreFrameContext(context); 2508 return new (zone()) LStoreFrameContext(context);
2509 } 2509 }
2510 2510
2511 } // namespace internal 2511 } // namespace internal
2512 } // namespace v8 2512 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ppc/lithium-codegen-ppc.cc ('k') | src/crankshaft/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698