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/x87/lithium-x87.h" | 5 #include "src/crankshaft/x87/lithium-x87.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #if V8_TARGET_ARCH_X87 | 9 #if V8_TARGET_ARCH_X87 |
10 | 10 |
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 | 945 |
946 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { | 946 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { |
947 return new(zone()) LGoto(instr->FirstSuccessor()); | 947 return new(zone()) LGoto(instr->FirstSuccessor()); |
948 } | 948 } |
949 | 949 |
950 | 950 |
951 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { | 951 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { |
952 HValue* value = instr->value(); | 952 HValue* value = instr->value(); |
953 Representation r = value->representation(); | 953 Representation r = value->representation(); |
954 HType type = value->type(); | 954 HType type = value->type(); |
955 ToBooleanStub::Types expected = instr->expected_input_types(); | 955 ToBooleanICStub::Types expected = instr->expected_input_types(); |
956 if (expected.IsEmpty()) expected = ToBooleanStub::Types::Generic(); | 956 if (expected.IsEmpty()) expected = ToBooleanICStub::Types::Generic(); |
957 | 957 |
958 bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() || | 958 bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() || |
959 type.IsJSArray() || type.IsHeapNumber() || type.IsString(); | 959 type.IsJSArray() || type.IsHeapNumber() || type.IsString(); |
960 LOperand* temp = !easy_case && expected.NeedsMap() ? TempRegister() : NULL; | 960 LOperand* temp = !easy_case && expected.NeedsMap() ? TempRegister() : NULL; |
961 LInstruction* branch = | 961 LInstruction* branch = |
962 temp != NULL ? new (zone()) LBranch(UseRegister(value), temp) | 962 temp != NULL ? new (zone()) LBranch(UseRegister(value), temp) |
963 : new (zone()) LBranch(UseRegisterAtStart(value), temp); | 963 : new (zone()) LBranch(UseRegisterAtStart(value), temp); |
964 if (!easy_case && | 964 if (!easy_case && |
965 ((!expected.Contains(ToBooleanStub::SMI) && expected.NeedsMap()) || | 965 ((!expected.Contains(ToBooleanICStub::SMI) && expected.NeedsMap()) || |
966 !expected.IsGeneric())) { | 966 !expected.IsGeneric())) { |
967 branch = AssignEnvironment(branch); | 967 branch = AssignEnvironment(branch); |
968 } | 968 } |
969 return branch; | 969 return branch; |
970 } | 970 } |
971 | 971 |
972 | 972 |
973 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) { | 973 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) { |
974 return new(zone()) LDebugBreak(); | 974 return new(zone()) LDebugBreak(); |
975 } | 975 } |
(...skipping 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2610 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { | 2610 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { |
2611 LOperand* context = UseRegisterAtStart(instr->context()); | 2611 LOperand* context = UseRegisterAtStart(instr->context()); |
2612 return new(zone()) LStoreFrameContext(context); | 2612 return new(zone()) LStoreFrameContext(context); |
2613 } | 2613 } |
2614 | 2614 |
2615 | 2615 |
2616 } // namespace internal | 2616 } // namespace internal |
2617 } // namespace v8 | 2617 } // namespace v8 |
2618 | 2618 |
2619 #endif // V8_TARGET_ARCH_X87 | 2619 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |