| 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 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 870 | 870 |
| 871 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { | 871 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { |
| 872 return new(zone()) LGoto(instr->FirstSuccessor()); | 872 return new(zone()) LGoto(instr->FirstSuccessor()); |
| 873 } | 873 } |
| 874 | 874 |
| 875 | 875 |
| 876 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { | 876 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { |
| 877 HValue* value = instr->value(); | 877 HValue* value = instr->value(); |
| 878 Representation r = value->representation(); | 878 Representation r = value->representation(); |
| 879 HType type = value->type(); | 879 HType type = value->type(); |
| 880 ToBooleanICStub::Types expected = instr->expected_input_types(); | 880 ToBooleanHints expected = instr->expected_input_types(); |
| 881 if (expected.IsEmpty()) expected = ToBooleanICStub::Types::Generic(); | 881 if (expected == ToBooleanHint::kNone) expected = ToBooleanHint::kAny; |
| 882 | 882 |
| 883 bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() || | 883 bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() || |
| 884 type.IsJSArray() || type.IsHeapNumber() || type.IsString(); | 884 type.IsJSArray() || type.IsHeapNumber() || type.IsString(); |
| 885 LInstruction* branch = new(zone()) LBranch(UseRegister(value)); | 885 LInstruction* branch = new(zone()) LBranch(UseRegister(value)); |
| 886 if (!easy_case && | 886 if (!easy_case && ((!(expected & ToBooleanHint::kSmallInteger) && |
| 887 ((!expected.Contains(ToBooleanICStub::SMI) && expected.NeedsMap()) || | 887 (expected & ToBooleanHint::kNeedsMap)) || |
| 888 !expected.IsGeneric())) { | 888 expected != ToBooleanHint::kAny)) { |
| 889 branch = AssignEnvironment(branch); | 889 branch = AssignEnvironment(branch); |
| 890 } | 890 } |
| 891 return branch; | 891 return branch; |
| 892 } | 892 } |
| 893 | 893 |
| 894 | 894 |
| 895 LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) { | 895 LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) { |
| 896 DCHECK(instr->value()->representation().IsTagged()); | 896 DCHECK(instr->value()->representation().IsTagged()); |
| 897 LOperand* value = UseRegisterAtStart(instr->value()); | 897 LOperand* value = UseRegisterAtStart(instr->value()); |
| 898 LOperand* temp = TempRegister(); | 898 LOperand* temp = TempRegister(); |
| (...skipping 1447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2346 LOperand* index = UseTempRegister(instr->index()); | 2346 LOperand* index = UseTempRegister(instr->index()); |
| 2347 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2347 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
| 2348 LInstruction* result = DefineSameAsFirst(load); | 2348 LInstruction* result = DefineSameAsFirst(load); |
| 2349 return AssignPointerMap(result); | 2349 return AssignPointerMap(result); |
| 2350 } | 2350 } |
| 2351 | 2351 |
| 2352 } // namespace internal | 2352 } // namespace internal |
| 2353 } // namespace v8 | 2353 } // namespace v8 |
| 2354 | 2354 |
| 2355 #endif // V8_TARGET_ARCH_MIPS64 | 2355 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |