| 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/x64/lithium-x64.h" | 5 #include "src/crankshaft/x64/lithium-x64.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_X64 | 9 #if V8_TARGET_ARCH_X64 |
| 10 | 10 |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 926 | 926 |
| 927 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) { | 927 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) { |
| 928 return new(zone()) LDebugBreak(); | 928 return new(zone()) LDebugBreak(); |
| 929 } | 929 } |
| 930 | 930 |
| 931 | 931 |
| 932 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { | 932 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { |
| 933 HValue* value = instr->value(); | 933 HValue* value = instr->value(); |
| 934 Representation r = value->representation(); | 934 Representation r = value->representation(); |
| 935 HType type = value->type(); | 935 HType type = value->type(); |
| 936 ToBooleanStub::Types expected = instr->expected_input_types(); | 936 ToBooleanICStub::Types expected = instr->expected_input_types(); |
| 937 if (expected.IsEmpty()) expected = ToBooleanStub::Types::Generic(); | 937 if (expected.IsEmpty()) expected = ToBooleanICStub::Types::Generic(); |
| 938 | 938 |
| 939 bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() || | 939 bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() || |
| 940 type.IsJSArray() || type.IsHeapNumber() || type.IsString(); | 940 type.IsJSArray() || type.IsHeapNumber() || type.IsString(); |
| 941 LInstruction* branch = new(zone()) LBranch(UseRegister(value)); | 941 LInstruction* branch = new(zone()) LBranch(UseRegister(value)); |
| 942 if (!easy_case && | 942 if (!easy_case && |
| 943 ((!expected.Contains(ToBooleanStub::SMI) && expected.NeedsMap()) || | 943 ((!expected.Contains(ToBooleanICStub::SMI) && expected.NeedsMap()) || |
| 944 !expected.IsGeneric())) { | 944 !expected.IsGeneric())) { |
| 945 branch = AssignEnvironment(branch); | 945 branch = AssignEnvironment(branch); |
| 946 } | 946 } |
| 947 return branch; | 947 return branch; |
| 948 } | 948 } |
| 949 | 949 |
| 950 | 950 |
| 951 LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) { | 951 LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) { |
| 952 DCHECK(instr->value()->representation().IsTagged()); | 952 DCHECK(instr->value()->representation().IsTagged()); |
| 953 LOperand* value = UseRegisterAtStart(instr->value()); | 953 LOperand* value = UseRegisterAtStart(instr->value()); |
| (...skipping 1654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2608 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { | 2608 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { |
| 2609 LOperand* context = UseRegisterAtStart(instr->context()); | 2609 LOperand* context = UseRegisterAtStart(instr->context()); |
| 2610 return new(zone()) LStoreFrameContext(context); | 2610 return new(zone()) LStoreFrameContext(context); |
| 2611 } | 2611 } |
| 2612 | 2612 |
| 2613 | 2613 |
| 2614 } // namespace internal | 2614 } // namespace internal |
| 2615 } // namespace v8 | 2615 } // namespace v8 |
| 2616 | 2616 |
| 2617 #endif // V8_TARGET_ARCH_X64 | 2617 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |