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

Side by Side Diff: src/crankshaft/arm/lithium-arm.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/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 886 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 897
898 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { 898 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
899 return new(zone()) LGoto(instr->FirstSuccessor()); 899 return new(zone()) LGoto(instr->FirstSuccessor());
900 } 900 }
901 901
902 902
903 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { 903 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) {
904 HValue* value = instr->value(); 904 HValue* value = instr->value();
905 Representation r = value->representation(); 905 Representation r = value->representation();
906 HType type = value->type(); 906 HType type = value->type();
907 ToBooleanStub::Types expected = instr->expected_input_types(); 907 ToBooleanICStub::Types expected = instr->expected_input_types();
908 if (expected.IsEmpty()) expected = ToBooleanStub::Types::Generic(); 908 if (expected.IsEmpty()) expected = ToBooleanICStub::Types::Generic();
909 909
910 bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() || 910 bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() ||
911 type.IsJSArray() || type.IsHeapNumber() || type.IsString(); 911 type.IsJSArray() || type.IsHeapNumber() || type.IsString();
912 LInstruction* branch = new(zone()) LBranch(UseRegister(value)); 912 LInstruction* branch = new(zone()) LBranch(UseRegister(value));
913 if (!easy_case && 913 if (!easy_case &&
914 ((!expected.Contains(ToBooleanStub::SMI) && expected.NeedsMap()) || 914 ((!expected.Contains(ToBooleanICStub::SMI) && expected.NeedsMap()) ||
915 !expected.IsGeneric())) { 915 !expected.IsGeneric())) {
916 branch = AssignEnvironment(branch); 916 branch = AssignEnvironment(branch);
917 } 917 }
918 return branch; 918 return branch;
919 } 919 }
920 920
921 921
922 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) { 922 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) {
923 return new(zone()) LDebugBreak(); 923 return new(zone()) LDebugBreak();
924 } 924 }
(...skipping 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after
2550 } 2550 }
2551 2551
2552 2552
2553 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { 2553 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) {
2554 LOperand* context = UseRegisterAtStart(instr->context()); 2554 LOperand* context = UseRegisterAtStart(instr->context());
2555 return new(zone()) LStoreFrameContext(context); 2555 return new(zone()) LStoreFrameContext(context);
2556 } 2556 }
2557 2557
2558 } // namespace internal 2558 } // namespace internal
2559 } // namespace v8 2559 } // 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