| 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 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 911 | 911 |
| 912 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { | 912 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { |
| 913 return new (zone()) LGoto(instr->FirstSuccessor()); | 913 return new (zone()) LGoto(instr->FirstSuccessor()); |
| 914 } | 914 } |
| 915 | 915 |
| 916 | 916 |
| 917 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { | 917 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { |
| 918 HValue* value = instr->value(); | 918 HValue* value = instr->value(); |
| 919 Representation r = value->representation(); | 919 Representation r = value->representation(); |
| 920 HType type = value->type(); | 920 HType type = value->type(); |
| 921 ToBooleanStub::Types expected = instr->expected_input_types(); | 921 ToBooleanICStub::Types expected = instr->expected_input_types(); |
| 922 if (expected.IsEmpty()) expected = ToBooleanStub::Types::Generic(); | 922 if (expected.IsEmpty()) expected = ToBooleanICStub::Types::Generic(); |
| 923 | 923 |
| 924 bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() || | 924 bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() || |
| 925 type.IsJSArray() || type.IsHeapNumber() || type.IsString(); | 925 type.IsJSArray() || type.IsHeapNumber() || type.IsString(); |
| 926 LInstruction* branch = new (zone()) LBranch(UseRegister(value)); | 926 LInstruction* branch = new (zone()) LBranch(UseRegister(value)); |
| 927 if (!easy_case && | 927 if (!easy_case && |
| 928 ((!expected.Contains(ToBooleanStub::SMI) && expected.NeedsMap()) || | 928 ((!expected.Contains(ToBooleanICStub::SMI) && expected.NeedsMap()) || |
| 929 !expected.IsGeneric())) { | 929 !expected.IsGeneric())) { |
| 930 branch = AssignEnvironment(branch); | 930 branch = AssignEnvironment(branch); |
| 931 } | 931 } |
| 932 return branch; | 932 return branch; |
| 933 } | 933 } |
| 934 | 934 |
| 935 | 935 |
| 936 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) { | 936 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) { |
| 937 return new (zone()) LDebugBreak(); | 937 return new (zone()) LDebugBreak(); |
| 938 } | 938 } |
| (...skipping 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2503 } | 2503 } |
| 2504 | 2504 |
| 2505 | 2505 |
| 2506 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { | 2506 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { |
| 2507 LOperand* context = UseRegisterAtStart(instr->context()); | 2507 LOperand* context = UseRegisterAtStart(instr->context()); |
| 2508 return new (zone()) LStoreFrameContext(context); | 2508 return new (zone()) LStoreFrameContext(context); |
| 2509 } | 2509 } |
| 2510 | 2510 |
| 2511 } // namespace internal | 2511 } // namespace internal |
| 2512 } // namespace v8 | 2512 } // namespace v8 |
| OLD | NEW |