OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2299 | 2299 |
2300 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { | 2300 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { |
2301 LParameter* result = new(zone()) LParameter; | 2301 LParameter* result = new(zone()) LParameter; |
2302 if (instr->kind() == HParameter::STACK_PARAMETER) { | 2302 if (instr->kind() == HParameter::STACK_PARAMETER) { |
2303 int spill_index = chunk()->GetParameterStackSlot(instr->index()); | 2303 int spill_index = chunk()->GetParameterStackSlot(instr->index()); |
2304 return DefineAsSpilled(result, spill_index); | 2304 return DefineAsSpilled(result, spill_index); |
2305 } else { | 2305 } else { |
2306 ASSERT(info()->IsStub()); | 2306 ASSERT(info()->IsStub()); |
2307 CodeStubInterfaceDescriptor* descriptor = | 2307 CodeStubInterfaceDescriptor* descriptor = |
2308 info()->code_stub()->GetInterfaceDescriptor(info()->isolate()); | 2308 info()->code_stub()->GetInterfaceDescriptor(info()->isolate()); |
2309 Register reg = descriptor->register_params_[instr->index()]; | 2309 int index = static_cast<int>(instr->index()); |
| 2310 Register reg = DESCRIPTOR_GET_PARAMETER_REGISTER(descriptor, index); |
2310 return DefineFixed(result, reg); | 2311 return DefineFixed(result, reg); |
2311 } | 2312 } |
2312 } | 2313 } |
2313 | 2314 |
2314 | 2315 |
2315 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { | 2316 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { |
2316 int spill_index = chunk()->GetNextSpillIndex(false); // Not double-width. | 2317 int spill_index = chunk()->GetNextSpillIndex(false); // Not double-width. |
2317 if (spill_index > LUnallocated::kMaxFixedIndex) { | 2318 if (spill_index > LUnallocated::kMaxFixedIndex) { |
2318 Abort("Too many spill slots needed for OSR"); | 2319 Abort("Too many spill slots needed for OSR"); |
2319 spill_index = 0; | 2320 spill_index = 0; |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2488 | 2489 |
2489 | 2490 |
2490 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2491 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2491 LOperand* object = UseRegister(instr->object()); | 2492 LOperand* object = UseRegister(instr->object()); |
2492 LOperand* index = UseRegister(instr->index()); | 2493 LOperand* index = UseRegister(instr->index()); |
2493 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2494 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2494 } | 2495 } |
2495 | 2496 |
2496 | 2497 |
2497 } } // namespace v8::internal | 2498 } } // namespace v8::internal |
OLD | NEW |