| 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-allocator-inl.h" | 10 #include "src/lithium-allocator-inl.h" |
| (...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1097 LOperand* function = UseFixed(instr->function(), rdi); | 1097 LOperand* function = UseFixed(instr->function(), rdi); |
| 1098 | 1098 |
| 1099 LCallJSFunction* result = new(zone()) LCallJSFunction(function); | 1099 LCallJSFunction* result = new(zone()) LCallJSFunction(function); |
| 1100 | 1100 |
| 1101 return MarkAsCall(DefineFixed(result, rax), instr); | 1101 return MarkAsCall(DefineFixed(result, rax), instr); |
| 1102 } | 1102 } |
| 1103 | 1103 |
| 1104 | 1104 |
| 1105 LInstruction* LChunkBuilder::DoCallWithDescriptor( | 1105 LInstruction* LChunkBuilder::DoCallWithDescriptor( |
| 1106 HCallWithDescriptor* instr) { | 1106 HCallWithDescriptor* instr) { |
| 1107 const CallInterfaceDescriptor* descriptor = instr->descriptor(); | 1107 const InterfaceDescriptor* descriptor = instr->descriptor(); |
| 1108 | 1108 |
| 1109 LOperand* target = UseRegisterOrConstantAtStart(instr->target()); | 1109 LOperand* target = UseRegisterOrConstantAtStart(instr->target()); |
| 1110 ZoneList<LOperand*> ops(instr->OperandCount(), zone()); | 1110 ZoneList<LOperand*> ops(instr->OperandCount(), zone()); |
| 1111 ops.Add(target, zone()); | 1111 ops.Add(target, zone()); |
| 1112 for (int i = 1; i < instr->OperandCount(); i++) { | 1112 for (int i = 1; i < instr->OperandCount(); i++) { |
| 1113 LOperand* op = UseFixed(instr->OperandAt(i), | 1113 LOperand* op = UseFixed(instr->OperandAt(i), |
| 1114 descriptor->GetParameterRegister(i - 1)); | 1114 descriptor->GetParameterRegister(i - 1)); |
| 1115 ops.Add(op, zone()); | 1115 ops.Add(op, zone()); |
| 1116 } | 1116 } |
| 1117 | 1117 |
| (...skipping 1326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2444 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { | 2444 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { |
| 2445 LParameter* result = new(zone()) LParameter; | 2445 LParameter* result = new(zone()) LParameter; |
| 2446 if (instr->kind() == HParameter::STACK_PARAMETER) { | 2446 if (instr->kind() == HParameter::STACK_PARAMETER) { |
| 2447 int spill_index = chunk()->GetParameterStackSlot(instr->index()); | 2447 int spill_index = chunk()->GetParameterStackSlot(instr->index()); |
| 2448 return DefineAsSpilled(result, spill_index); | 2448 return DefineAsSpilled(result, spill_index); |
| 2449 } else { | 2449 } else { |
| 2450 ASSERT(info()->IsStub()); | 2450 ASSERT(info()->IsStub()); |
| 2451 CodeStubInterfaceDescriptor* descriptor = | 2451 CodeStubInterfaceDescriptor* descriptor = |
| 2452 info()->code_stub()->GetInterfaceDescriptor(); | 2452 info()->code_stub()->GetInterfaceDescriptor(); |
| 2453 int index = static_cast<int>(instr->index()); | 2453 int index = static_cast<int>(instr->index()); |
| 2454 Register reg = descriptor->GetParameterRegister(index); | 2454 Register reg = descriptor->GetEnvironmentParameterRegister(index); |
| 2455 return DefineFixed(result, reg); | 2455 return DefineFixed(result, reg); |
| 2456 } | 2456 } |
| 2457 } | 2457 } |
| 2458 | 2458 |
| 2459 | 2459 |
| 2460 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { | 2460 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { |
| 2461 // Use an index that corresponds to the location in the unoptimized frame, | 2461 // Use an index that corresponds to the location in the unoptimized frame, |
| 2462 // which the optimized frame will subsume. | 2462 // which the optimized frame will subsume. |
| 2463 int env_index = instr->index(); | 2463 int env_index = instr->index(); |
| 2464 int spill_index = 0; | 2464 int spill_index = 0; |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2643 LOperand* function = UseRegisterAtStart(instr->function()); | 2643 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2644 LAllocateBlockContext* result = | 2644 LAllocateBlockContext* result = |
| 2645 new(zone()) LAllocateBlockContext(context, function); | 2645 new(zone()) LAllocateBlockContext(context, function); |
| 2646 return MarkAsCall(DefineFixed(result, rsi), instr); | 2646 return MarkAsCall(DefineFixed(result, rsi), instr); |
| 2647 } | 2647 } |
| 2648 | 2648 |
| 2649 | 2649 |
| 2650 } } // namespace v8::internal | 2650 } } // namespace v8::internal |
| 2651 | 2651 |
| 2652 #endif // V8_TARGET_ARCH_X64 | 2652 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |