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/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 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
860 | 860 |
861 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { | 861 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { |
862 return new(zone()) LGoto(instr->FirstSuccessor()); | 862 return new(zone()) LGoto(instr->FirstSuccessor()); |
863 } | 863 } |
864 | 864 |
865 | 865 |
866 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { | 866 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { |
867 HValue* value = instr->value(); | 867 HValue* value = instr->value(); |
868 Representation r = value->representation(); | 868 Representation r = value->representation(); |
869 HType type = value->type(); | 869 HType type = value->type(); |
870 ToBooleanICStub::Types expected = instr->expected_input_types(); | 870 ToBooleanHints expected = instr->expected_input_types(); |
871 if (expected.IsEmpty()) expected = ToBooleanICStub::Types::Generic(); | 871 if (expected == ToBooleanHint::kNone) expected = ToBooleanHint::kAny; |
872 | 872 |
873 bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() || | 873 bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() || |
874 type.IsJSArray() || type.IsHeapNumber() || type.IsString(); | 874 type.IsJSArray() || type.IsHeapNumber() || type.IsString(); |
875 LInstruction* branch = new(zone()) LBranch(UseRegister(value)); | 875 LInstruction* branch = new(zone()) LBranch(UseRegister(value)); |
876 if (!easy_case && | 876 if (!easy_case && ((!(expected & ToBooleanHint::kSmallInteger) && |
877 ((!expected.Contains(ToBooleanICStub::SMI) && expected.NeedsMap()) || | 877 (expected & ToBooleanHint::kNeedsMap)) || |
878 !expected.IsGeneric())) { | 878 expected != ToBooleanHint::kAny)) { |
879 branch = AssignEnvironment(branch); | 879 branch = AssignEnvironment(branch); |
880 } | 880 } |
881 return branch; | 881 return branch; |
882 } | 882 } |
883 | 883 |
884 | 884 |
885 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) { | 885 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) { |
886 return new(zone()) LDebugBreak(); | 886 return new(zone()) LDebugBreak(); |
887 } | 887 } |
888 | 888 |
(...skipping 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2392 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2392 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2393 LOperand* object = UseRegister(instr->object()); | 2393 LOperand* object = UseRegister(instr->object()); |
2394 LOperand* index = UseTempRegister(instr->index()); | 2394 LOperand* index = UseTempRegister(instr->index()); |
2395 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2395 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
2396 LInstruction* result = DefineSameAsFirst(load); | 2396 LInstruction* result = DefineSameAsFirst(load); |
2397 return AssignPointerMap(result); | 2397 return AssignPointerMap(result); |
2398 } | 2398 } |
2399 | 2399 |
2400 } // namespace internal | 2400 } // namespace internal |
2401 } // namespace v8 | 2401 } // namespace v8 |
OLD | NEW |