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

Side by Side Diff: src/crankshaft/mips/lithium-mips.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
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/mips/lithium-mips.h" 5 #include "src/crankshaft/mips/lithium-mips.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #if V8_TARGET_ARCH_MIPS 9 #if V8_TARGET_ARCH_MIPS
10 10
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 907
908 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { 908 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
909 return new(zone()) LGoto(instr->FirstSuccessor()); 909 return new(zone()) LGoto(instr->FirstSuccessor());
910 } 910 }
911 911
912 912
913 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { 913 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) {
914 HValue* value = instr->value(); 914 HValue* value = instr->value();
915 Representation r = value->representation(); 915 Representation r = value->representation();
916 HType type = value->type(); 916 HType type = value->type();
917 ToBooleanStub::Types expected = instr->expected_input_types(); 917 ToBooleanICStub::Types expected = instr->expected_input_types();
918 if (expected.IsEmpty()) expected = ToBooleanStub::Types::Generic(); 918 if (expected.IsEmpty()) expected = ToBooleanICStub::Types::Generic();
919 919
920 bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() || 920 bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() ||
921 type.IsJSArray() || type.IsHeapNumber() || type.IsString(); 921 type.IsJSArray() || type.IsHeapNumber() || type.IsString();
922 LInstruction* branch = new(zone()) LBranch(UseRegister(value)); 922 LInstruction* branch = new(zone()) LBranch(UseRegister(value));
923 if (!easy_case && 923 if (!easy_case &&
924 ((!expected.Contains(ToBooleanStub::SMI) && expected.NeedsMap()) || 924 ((!expected.Contains(ToBooleanICStub::SMI) && expected.NeedsMap()) ||
925 !expected.IsGeneric())) { 925 !expected.IsGeneric())) {
926 branch = AssignEnvironment(branch); 926 branch = AssignEnvironment(branch);
927 } 927 }
928 return branch; 928 return branch;
929 } 929 }
930 930
931 931
932 LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) { 932 LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) {
933 DCHECK(instr->value()->representation().IsTagged()); 933 DCHECK(instr->value()->representation().IsTagged());
934 LOperand* value = UseRegisterAtStart(instr->value()); 934 LOperand* value = UseRegisterAtStart(instr->value());
(...skipping 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after
2500 2500
2501 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { 2501 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) {
2502 LOperand* context = UseRegisterAtStart(instr->context()); 2502 LOperand* context = UseRegisterAtStart(instr->context());
2503 return new(zone()) LStoreFrameContext(context); 2503 return new(zone()) LStoreFrameContext(context);
2504 } 2504 }
2505 2505
2506 } // namespace internal 2506 } // namespace internal
2507 } // namespace v8 2507 } // namespace v8
2508 2508
2509 #endif // V8_TARGET_ARCH_MIPS 2509 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/crankshaft/mips/lithium-codegen-mips.cc ('k') | src/crankshaft/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698