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 <sstream> | 5 #include <sstream> |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #if V8_TARGET_ARCH_X87 | 9 #if V8_TARGET_ARCH_X87 |
10 | 10 |
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1157 UseFixed(instr->OperandAt(i), descriptor.GetParameterRegister(i - 1)); | 1157 UseFixed(instr->OperandAt(i), descriptor.GetParameterRegister(i - 1)); |
1158 ops.Add(op, zone()); | 1158 ops.Add(op, zone()); |
1159 } | 1159 } |
1160 | 1160 |
1161 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor( | 1161 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor( |
1162 descriptor, ops, zone()); | 1162 descriptor, ops, zone()); |
1163 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); | 1163 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); |
1164 } | 1164 } |
1165 | 1165 |
1166 | 1166 |
1167 LInstruction* LChunkBuilder::DoTailCallThroughMegamorphicCache( | |
1168 HTailCallThroughMegamorphicCache* instr) { | |
1169 LOperand* context = UseFixed(instr->context(), esi); | |
1170 LOperand* receiver_register = | |
1171 UseFixed(instr->receiver(), LoadDescriptor::ReceiverRegister()); | |
1172 LOperand* name_register = | |
1173 UseFixed(instr->name(), LoadDescriptor::NameRegister()); | |
1174 | |
1175 // Not marked as call. It can't deoptimize, and it never returns. | |
1176 return new (zone()) LTailCallThroughMegamorphicCache( | |
1177 context, receiver_register, name_register); | |
1178 } | |
1179 | |
1180 | |
1181 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { | 1167 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { |
1182 LOperand* context = UseFixed(instr->context(), esi); | 1168 LOperand* context = UseFixed(instr->context(), esi); |
1183 LOperand* function = UseFixed(instr->function(), edi); | 1169 LOperand* function = UseFixed(instr->function(), edi); |
1184 LInvokeFunction* result = new(zone()) LInvokeFunction(context, function); | 1170 LInvokeFunction* result = new(zone()) LInvokeFunction(context, function); |
1185 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); | 1171 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); |
1186 } | 1172 } |
1187 | 1173 |
1188 | 1174 |
1189 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { | 1175 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { |
1190 switch (instr->op()) { | 1176 switch (instr->op()) { |
(...skipping 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2749 LOperand* function = UseRegisterAtStart(instr->function()); | 2735 LOperand* function = UseRegisterAtStart(instr->function()); |
2750 LAllocateBlockContext* result = | 2736 LAllocateBlockContext* result = |
2751 new(zone()) LAllocateBlockContext(context, function); | 2737 new(zone()) LAllocateBlockContext(context, function); |
2752 return MarkAsCall(DefineFixed(result, esi), instr); | 2738 return MarkAsCall(DefineFixed(result, esi), instr); |
2753 } | 2739 } |
2754 | 2740 |
2755 | 2741 |
2756 } } // namespace v8::internal | 2742 } } // namespace v8::internal |
2757 | 2743 |
2758 #endif // V8_TARGET_ARCH_X87 | 2744 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |