| OLD | NEW |
| 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/mips64/lithium-mips64.h" | 5 #include "src/crankshaft/mips64/lithium-mips64.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_MIPS64 | 9 #if V8_TARGET_ARCH_MIPS64 |
| 10 | 10 |
| (...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 1570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2505 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { | 2505 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { |
| 2506 LOperand* context = UseRegisterAtStart(instr->context()); | 2506 LOperand* context = UseRegisterAtStart(instr->context()); |
| 2507 return new(zone()) LStoreFrameContext(context); | 2507 return new(zone()) LStoreFrameContext(context); |
| 2508 } | 2508 } |
| 2509 | 2509 |
| 2510 | 2510 |
| 2511 } // namespace internal | 2511 } // namespace internal |
| 2512 } // namespace v8 | 2512 } // namespace v8 |
| 2513 | 2513 |
| 2514 #endif // V8_TARGET_ARCH_MIPS64 | 2514 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |