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 #include "src/hydrogen-osr.h" | 7 #include "src/hydrogen-osr.h" |
8 #include "src/lithium-allocator-inl.h" | 8 #include "src/lithium-allocator-inl.h" |
9 #include "src/mips64/lithium-codegen-mips64.h" | 9 #include "src/mips64/lithium-codegen-mips64.h" |
10 #include "src/mips64/lithium-mips64.h" | 10 #include "src/mips64/lithium-mips64.h" |
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1079 LOperand* function = UseFixed(instr->function(), a1); | 1079 LOperand* function = UseFixed(instr->function(), a1); |
1080 | 1080 |
1081 LCallJSFunction* result = new(zone()) LCallJSFunction(function); | 1081 LCallJSFunction* result = new(zone()) LCallJSFunction(function); |
1082 | 1082 |
1083 return MarkAsCall(DefineFixed(result, v0), instr); | 1083 return MarkAsCall(DefineFixed(result, v0), instr); |
1084 } | 1084 } |
1085 | 1085 |
1086 | 1086 |
1087 LInstruction* LChunkBuilder::DoCallWithDescriptor( | 1087 LInstruction* LChunkBuilder::DoCallWithDescriptor( |
1088 HCallWithDescriptor* instr) { | 1088 HCallWithDescriptor* instr) { |
1089 const CallInterfaceDescriptor* descriptor = instr->descriptor(); | 1089 const InterfaceDescriptor* descriptor = instr->descriptor(); |
1090 | 1090 |
1091 LOperand* target = UseRegisterOrConstantAtStart(instr->target()); | 1091 LOperand* target = UseRegisterOrConstantAtStart(instr->target()); |
1092 ZoneList<LOperand*> ops(instr->OperandCount(), zone()); | 1092 ZoneList<LOperand*> ops(instr->OperandCount(), zone()); |
1093 ops.Add(target, zone()); | 1093 ops.Add(target, zone()); |
1094 for (int i = 1; i < instr->OperandCount(); i++) { | 1094 for (int i = 1; i < instr->OperandCount(); i++) { |
1095 LOperand* op = UseFixed(instr->OperandAt(i), | 1095 LOperand* op = UseFixed(instr->OperandAt(i), |
1096 descriptor->GetParameterRegister(i - 1)); | 1096 descriptor->GetParameterRegister(i - 1)); |
1097 ops.Add(op, zone()); | 1097 ops.Add(op, zone()); |
1098 } | 1098 } |
1099 | 1099 |
(...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2349 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { | 2349 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { |
2350 LParameter* result = new(zone()) LParameter; | 2350 LParameter* result = new(zone()) LParameter; |
2351 if (instr->kind() == HParameter::STACK_PARAMETER) { | 2351 if (instr->kind() == HParameter::STACK_PARAMETER) { |
2352 int spill_index = chunk()->GetParameterStackSlot(instr->index()); | 2352 int spill_index = chunk()->GetParameterStackSlot(instr->index()); |
2353 return DefineAsSpilled(result, spill_index); | 2353 return DefineAsSpilled(result, spill_index); |
2354 } else { | 2354 } else { |
2355 ASSERT(info()->IsStub()); | 2355 ASSERT(info()->IsStub()); |
2356 CodeStubInterfaceDescriptor* descriptor = | 2356 CodeStubInterfaceDescriptor* descriptor = |
2357 info()->code_stub()->GetInterfaceDescriptor(); | 2357 info()->code_stub()->GetInterfaceDescriptor(); |
2358 int index = static_cast<int>(instr->index()); | 2358 int index = static_cast<int>(instr->index()); |
2359 Register reg = descriptor->GetParameterRegister(index); | 2359 Register reg = descriptor->GetEnvironmentParameterRegister(index); |
2360 return DefineFixed(result, reg); | 2360 return DefineFixed(result, reg); |
2361 } | 2361 } |
2362 } | 2362 } |
2363 | 2363 |
2364 | 2364 |
2365 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { | 2365 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { |
2366 // Use an index that corresponds to the location in the unoptimized frame, | 2366 // Use an index that corresponds to the location in the unoptimized frame, |
2367 // which the optimized frame will subsume. | 2367 // which the optimized frame will subsume. |
2368 int env_index = instr->index(); | 2368 int env_index = instr->index(); |
2369 int spill_index = 0; | 2369 int spill_index = 0; |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2535 HAllocateBlockContext* instr) { | 2535 HAllocateBlockContext* instr) { |
2536 LOperand* context = UseFixed(instr->context(), cp); | 2536 LOperand* context = UseFixed(instr->context(), cp); |
2537 LOperand* function = UseRegisterAtStart(instr->function()); | 2537 LOperand* function = UseRegisterAtStart(instr->function()); |
2538 LAllocateBlockContext* result = | 2538 LAllocateBlockContext* result = |
2539 new(zone()) LAllocateBlockContext(context, function); | 2539 new(zone()) LAllocateBlockContext(context, function); |
2540 return MarkAsCall(DefineFixed(result, cp), instr); | 2540 return MarkAsCall(DefineFixed(result, cp), instr); |
2541 } | 2541 } |
2542 | 2542 |
2543 | 2543 |
2544 } } // namespace v8::internal | 2544 } } // namespace v8::internal |
OLD | NEW |