| 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_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 8 | 8 |
| 9 #include "src/hydrogen-osr.h" | 9 #include "src/hydrogen-osr.h" |
| 10 #include "src/lithium-allocator-inl.h" | 10 #include "src/lithium-allocator-inl.h" |
| (...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1113 LOperand* function = UseFixed(instr->function(), edi); | 1113 LOperand* function = UseFixed(instr->function(), edi); |
| 1114 | 1114 |
| 1115 LCallJSFunction* result = new(zone()) LCallJSFunction(function); | 1115 LCallJSFunction* result = new(zone()) LCallJSFunction(function); |
| 1116 | 1116 |
| 1117 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); | 1117 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); |
| 1118 } | 1118 } |
| 1119 | 1119 |
| 1120 | 1120 |
| 1121 LInstruction* LChunkBuilder::DoCallWithDescriptor( | 1121 LInstruction* LChunkBuilder::DoCallWithDescriptor( |
| 1122 HCallWithDescriptor* instr) { | 1122 HCallWithDescriptor* instr) { |
| 1123 const CallInterfaceDescriptor* descriptor = instr->descriptor(); | 1123 const InterfaceDescriptor* descriptor = instr->descriptor(); |
| 1124 | |
| 1125 LOperand* target = UseRegisterOrConstantAtStart(instr->target()); | 1124 LOperand* target = UseRegisterOrConstantAtStart(instr->target()); |
| 1126 ZoneList<LOperand*> ops(instr->OperandCount(), zone()); | 1125 ZoneList<LOperand*> ops(instr->OperandCount(), zone()); |
| 1127 ops.Add(target, zone()); | 1126 ops.Add(target, zone()); |
| 1128 for (int i = 1; i < instr->OperandCount(); i++) { | 1127 for (int i = 1; i < instr->OperandCount(); i++) { |
| 1129 LOperand* op = UseFixed(instr->OperandAt(i), | 1128 LOperand* op = UseFixed(instr->OperandAt(i), |
| 1130 descriptor->GetParameterRegister(i - 1)); | 1129 descriptor->GetParameterRegister(i - 1)); |
| 1131 ops.Add(op, zone()); | 1130 ops.Add(op, zone()); |
| 1132 } | 1131 } |
| 1133 | 1132 |
| 1134 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor( | 1133 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor( |
| (...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2451 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { | 2450 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { |
| 2452 LParameter* result = new(zone()) LParameter; | 2451 LParameter* result = new(zone()) LParameter; |
| 2453 if (instr->kind() == HParameter::STACK_PARAMETER) { | 2452 if (instr->kind() == HParameter::STACK_PARAMETER) { |
| 2454 int spill_index = chunk()->GetParameterStackSlot(instr->index()); | 2453 int spill_index = chunk()->GetParameterStackSlot(instr->index()); |
| 2455 return DefineAsSpilled(result, spill_index); | 2454 return DefineAsSpilled(result, spill_index); |
| 2456 } else { | 2455 } else { |
| 2457 ASSERT(info()->IsStub()); | 2456 ASSERT(info()->IsStub()); |
| 2458 CodeStubInterfaceDescriptor* descriptor = | 2457 CodeStubInterfaceDescriptor* descriptor = |
| 2459 info()->code_stub()->GetInterfaceDescriptor(); | 2458 info()->code_stub()->GetInterfaceDescriptor(); |
| 2460 int index = static_cast<int>(instr->index()); | 2459 int index = static_cast<int>(instr->index()); |
| 2461 Register reg = descriptor->GetParameterRegister(index); | 2460 Register reg = descriptor->GetEnvironmentParameterRegister(index); |
| 2462 return DefineFixed(result, reg); | 2461 return DefineFixed(result, reg); |
| 2463 } | 2462 } |
| 2464 } | 2463 } |
| 2465 | 2464 |
| 2466 | 2465 |
| 2467 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { | 2466 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { |
| 2468 // Use an index that corresponds to the location in the unoptimized frame, | 2467 // Use an index that corresponds to the location in the unoptimized frame, |
| 2469 // which the optimized frame will subsume. | 2468 // which the optimized frame will subsume. |
| 2470 int env_index = instr->index(); | 2469 int env_index = instr->index(); |
| 2471 int spill_index = 0; | 2470 int spill_index = 0; |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2654 LOperand* function = UseRegisterAtStart(instr->function()); | 2653 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2655 LAllocateBlockContext* result = | 2654 LAllocateBlockContext* result = |
| 2656 new(zone()) LAllocateBlockContext(context, function); | 2655 new(zone()) LAllocateBlockContext(context, function); |
| 2657 return MarkAsCall(DefineFixed(result, esi), instr); | 2656 return MarkAsCall(DefineFixed(result, esi), instr); |
| 2658 } | 2657 } |
| 2659 | 2658 |
| 2660 | 2659 |
| 2661 } } // namespace v8::internal | 2660 } } // namespace v8::internal |
| 2662 | 2661 |
| 2663 #endif // V8_TARGET_ARCH_X87 | 2662 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |