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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
8 | 8 |
9 #include "src/hydrogen-osr.h" | 9 #include "src/hydrogen-osr.h" |
10 #include "src/ia32/lithium-codegen-ia32.h" | 10 #include "src/ia32/lithium-codegen-ia32.h" |
(...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1117 LOperand* function = UseFixed(instr->function(), edi); | 1117 LOperand* function = UseFixed(instr->function(), edi); |
1118 | 1118 |
1119 LCallJSFunction* result = new(zone()) LCallJSFunction(function); | 1119 LCallJSFunction* result = new(zone()) LCallJSFunction(function); |
1120 | 1120 |
1121 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); | 1121 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); |
1122 } | 1122 } |
1123 | 1123 |
1124 | 1124 |
1125 LInstruction* LChunkBuilder::DoCallWithDescriptor( | 1125 LInstruction* LChunkBuilder::DoCallWithDescriptor( |
1126 HCallWithDescriptor* instr) { | 1126 HCallWithDescriptor* instr) { |
1127 const CallInterfaceDescriptor* descriptor = instr->descriptor(); | 1127 bool is_stub = instr->is_stub(); |
1128 | 1128 ZoneList<LOperand*> ops(instr->OperandCount(), zone()); |
1129 LOperand* target = UseRegisterOrConstantAtStart(instr->target()); | 1129 LOperand* target = UseRegisterOrConstantAtStart(instr->target()); |
1130 ZoneList<LOperand*> ops(instr->OperandCount(), zone()); | |
1131 ops.Add(target, zone()); | 1130 ops.Add(target, zone()); |
1132 for (int i = 1; i < instr->OperandCount(); i++) { | 1131 if (is_stub) { |
1133 LOperand* op = UseFixed(instr->OperandAt(i), | 1132 LOperand* context = UseFixed(instr->context(), esi); |
1134 descriptor->GetParameterRegister(i - 1)); | 1133 ops.Add(context, zone()); |
1134 } | |
1135 int start_index = is_stub ? 2 : 1; | |
1136 for (int i = start_index; i < instr->OperandCount(); i++) { | |
1137 Register reg = instr->is_stub() | |
1138 ? instr->stub_descriptor()->GetParameterRegister(i - start_index) | |
1139 : instr->call_descriptor()->GetParameterRegister(i - start_index); | |
1140 LOperand* op = UseFixed(instr->OperandAt(i), reg); | |
1135 ops.Add(op, zone()); | 1141 ops.Add(op, zone()); |
1136 } | 1142 } |
1137 | 1143 |
1138 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor( | 1144 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor( |
1139 descriptor, ops, zone()); | 1145 ops, zone()); |
danno
2014/07/11 12:30:30
clang format the patch?
mvstanton
2014/07/21 09:41:17
This whole block is gone, I no longer need to chan
| |
1140 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); | 1146 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); |
1141 } | 1147 } |
1142 | 1148 |
1143 | 1149 |
1144 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { | 1150 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { |
1145 LOperand* context = UseFixed(instr->context(), esi); | 1151 LOperand* context = UseFixed(instr->context(), esi); |
1146 LOperand* function = UseFixed(instr->function(), edi); | 1152 LOperand* function = UseFixed(instr->function(), edi); |
1147 LInvokeFunction* result = new(zone()) LInvokeFunction(context, function); | 1153 LInvokeFunction* result = new(zone()) LInvokeFunction(context, function); |
1148 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); | 1154 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); |
1149 } | 1155 } |
(...skipping 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2667 LOperand* function = UseRegisterAtStart(instr->function()); | 2673 LOperand* function = UseRegisterAtStart(instr->function()); |
2668 LAllocateBlockContext* result = | 2674 LAllocateBlockContext* result = |
2669 new(zone()) LAllocateBlockContext(context, function); | 2675 new(zone()) LAllocateBlockContext(context, function); |
2670 return MarkAsCall(DefineFixed(result, esi), instr); | 2676 return MarkAsCall(DefineFixed(result, esi), instr); |
2671 } | 2677 } |
2672 | 2678 |
2673 | 2679 |
2674 } } // namespace v8::internal | 2680 } } // namespace v8::internal |
2675 | 2681 |
2676 #endif // V8_TARGET_ARCH_IA32 | 2682 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |