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/ia32/lithium-ia32.h" | 5 #include "src/crankshaft/ia32/lithium-ia32.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #if V8_TARGET_ARCH_IA32 | 9 #if V8_TARGET_ARCH_IA32 |
10 | 10 |
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
929 | 929 |
930 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { | 930 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { |
931 return new(zone()) LGoto(instr->FirstSuccessor()); | 931 return new(zone()) LGoto(instr->FirstSuccessor()); |
932 } | 932 } |
933 | 933 |
934 | 934 |
935 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { | 935 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { |
936 HValue* value = instr->value(); | 936 HValue* value = instr->value(); |
937 Representation r = value->representation(); | 937 Representation r = value->representation(); |
938 HType type = value->type(); | 938 HType type = value->type(); |
939 ToBooleanStub::Types expected = instr->expected_input_types(); | 939 ToBooleanICStub::Types expected = instr->expected_input_types(); |
940 if (expected.IsEmpty()) expected = ToBooleanStub::Types::Generic(); | 940 if (expected.IsEmpty()) expected = ToBooleanICStub::Types::Generic(); |
941 | 941 |
942 bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() || | 942 bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() || |
943 type.IsJSArray() || type.IsHeapNumber() || type.IsString(); | 943 type.IsJSArray() || type.IsHeapNumber() || type.IsString(); |
944 LOperand* temp = !easy_case && expected.NeedsMap() ? TempRegister() : NULL; | 944 LOperand* temp = !easy_case && expected.NeedsMap() ? TempRegister() : NULL; |
945 LInstruction* branch = new(zone()) LBranch(UseRegister(value), temp); | 945 LInstruction* branch = new(zone()) LBranch(UseRegister(value), temp); |
946 if (!easy_case && | 946 if (!easy_case && |
947 ((!expected.Contains(ToBooleanStub::SMI) && expected.NeedsMap()) || | 947 ((!expected.Contains(ToBooleanICStub::SMI) && expected.NeedsMap()) || |
948 !expected.IsGeneric())) { | 948 !expected.IsGeneric())) { |
949 branch = AssignEnvironment(branch); | 949 branch = AssignEnvironment(branch); |
950 } | 950 } |
951 return branch; | 951 return branch; |
952 } | 952 } |
953 | 953 |
954 | 954 |
955 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) { | 955 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) { |
956 return new(zone()) LDebugBreak(); | 956 return new(zone()) LDebugBreak(); |
957 } | 957 } |
(...skipping 1647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2605 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { | 2605 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { |
2606 LOperand* context = UseRegisterAtStart(instr->context()); | 2606 LOperand* context = UseRegisterAtStart(instr->context()); |
2607 return new(zone()) LStoreFrameContext(context); | 2607 return new(zone()) LStoreFrameContext(context); |
2608 } | 2608 } |
2609 | 2609 |
2610 | 2610 |
2611 } // namespace internal | 2611 } // namespace internal |
2612 } // namespace v8 | 2612 } // namespace v8 |
2613 | 2613 |
2614 #endif // V8_TARGET_ARCH_IA32 | 2614 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |