OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/ppc/lithium-ppc.h" | 5 #include "src/crankshaft/ppc/lithium-ppc.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
10 #include "src/crankshaft/lithium-inl.h" | 10 #include "src/crankshaft/lithium-inl.h" |
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 | 875 |
876 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { | 876 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { |
877 return new (zone()) LGoto(instr->FirstSuccessor()); | 877 return new (zone()) LGoto(instr->FirstSuccessor()); |
878 } | 878 } |
879 | 879 |
880 | 880 |
881 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { | 881 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { |
882 HValue* value = instr->value(); | 882 HValue* value = instr->value(); |
883 Representation r = value->representation(); | 883 Representation r = value->representation(); |
884 HType type = value->type(); | 884 HType type = value->type(); |
885 ToBooleanICStub::Types expected = instr->expected_input_types(); | 885 ToBooleanHints expected = instr->expected_input_types(); |
886 if (expected.IsEmpty()) expected = ToBooleanICStub::Types::Generic(); | 886 if (expected == ToBooleanHint::kNone) expected = ToBooleanHint::kAny; |
887 | 887 |
888 bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() || | 888 bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() || |
889 type.IsJSArray() || type.IsHeapNumber() || type.IsString(); | 889 type.IsJSArray() || type.IsHeapNumber() || type.IsString(); |
890 LInstruction* branch = new (zone()) LBranch(UseRegister(value)); | 890 LInstruction* branch = new (zone()) LBranch(UseRegister(value)); |
891 if (!easy_case && | 891 if (!easy_case && ((!(expected & ToBooleanHint::kSmallInteger) && |
892 ((!expected.Contains(ToBooleanICStub::SMI) && expected.NeedsMap()) || | 892 (expected & ToBooleanHint::kNeedsMap)) || |
893 !expected.IsGeneric())) { | 893 expected != ToBooleanHint::kAny)) { |
894 branch = AssignEnvironment(branch); | 894 branch = AssignEnvironment(branch); |
895 } | 895 } |
896 return branch; | 896 return branch; |
897 } | 897 } |
898 | 898 |
899 | 899 |
900 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) { | 900 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) { |
901 return new (zone()) LDebugBreak(); | 901 return new (zone()) LDebugBreak(); |
902 } | 902 } |
903 | 903 |
(...skipping 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2362 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2362 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2363 LOperand* object = UseRegister(instr->object()); | 2363 LOperand* object = UseRegister(instr->object()); |
2364 LOperand* index = UseTempRegister(instr->index()); | 2364 LOperand* index = UseTempRegister(instr->index()); |
2365 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index); | 2365 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index); |
2366 LInstruction* result = DefineSameAsFirst(load); | 2366 LInstruction* result = DefineSameAsFirst(load); |
2367 return AssignPointerMap(result); | 2367 return AssignPointerMap(result); |
2368 } | 2368 } |
2369 | 2369 |
2370 } // namespace internal | 2370 } // namespace internal |
2371 } // namespace v8 | 2371 } // namespace v8 |
OLD | NEW |