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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/hydrogen-osr.h" | 9 #include "src/hydrogen-osr.h" |
10 #include "src/lithium-inl.h" | 10 #include "src/lithium-inl.h" |
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1112 UseFixed(instr->OperandAt(i), descriptor.GetParameterRegister(i - 1)); | 1112 UseFixed(instr->OperandAt(i), descriptor.GetParameterRegister(i - 1)); |
1113 ops.Add(op, zone()); | 1113 ops.Add(op, zone()); |
1114 } | 1114 } |
1115 | 1115 |
1116 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor( | 1116 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor( |
1117 descriptor, ops, zone()); | 1117 descriptor, ops, zone()); |
1118 return MarkAsCall(DefineFixed(result, rax), instr); | 1118 return MarkAsCall(DefineFixed(result, rax), instr); |
1119 } | 1119 } |
1120 | 1120 |
1121 | 1121 |
| 1122 LInstruction* LChunkBuilder::DoTailCallThroughMegamorphicCache( |
| 1123 HTailCallThroughMegamorphicCache* instr) { |
| 1124 LOperand* context = UseFixed(instr->context(), rsi); |
| 1125 LOperand* receiver_register = |
| 1126 UseFixed(instr->receiver(), LoadDescriptor::ReceiverRegister()); |
| 1127 LOperand* name_register = |
| 1128 UseFixed(instr->name(), LoadDescriptor::NameRegister()); |
| 1129 // Not marked as call. It can't deoptimize, and it never returns. |
| 1130 return new (zone()) LTailCallThroughMegamorphicCache( |
| 1131 context, receiver_register, name_register); |
| 1132 } |
| 1133 |
| 1134 |
1122 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { | 1135 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { |
1123 LOperand* context = UseFixed(instr->context(), rsi); | 1136 LOperand* context = UseFixed(instr->context(), rsi); |
1124 LOperand* function = UseFixed(instr->function(), rdi); | 1137 LOperand* function = UseFixed(instr->function(), rdi); |
1125 LInvokeFunction* result = new(zone()) LInvokeFunction(context, function); | 1138 LInvokeFunction* result = new(zone()) LInvokeFunction(context, function); |
1126 return MarkAsCall(DefineFixed(result, rax), instr, CANNOT_DEOPTIMIZE_EAGERLY); | 1139 return MarkAsCall(DefineFixed(result, rax), instr, CANNOT_DEOPTIMIZE_EAGERLY); |
1127 } | 1140 } |
1128 | 1141 |
1129 | 1142 |
1130 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { | 1143 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { |
1131 switch (instr->op()) { | 1144 switch (instr->op()) { |
(...skipping 1545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2677 LOperand* function = UseRegisterAtStart(instr->function()); | 2690 LOperand* function = UseRegisterAtStart(instr->function()); |
2678 LAllocateBlockContext* result = | 2691 LAllocateBlockContext* result = |
2679 new(zone()) LAllocateBlockContext(context, function); | 2692 new(zone()) LAllocateBlockContext(context, function); |
2680 return MarkAsCall(DefineFixed(result, rsi), instr); | 2693 return MarkAsCall(DefineFixed(result, rsi), instr); |
2681 } | 2694 } |
2682 | 2695 |
2683 | 2696 |
2684 } } // namespace v8::internal | 2697 } } // namespace v8::internal |
2685 | 2698 |
2686 #endif // V8_TARGET_ARCH_X64 | 2699 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |