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 2406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2417 | 2417 |
2418 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { | 2418 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { |
2419 LParameter* result = new(zone()) LParameter; | 2419 LParameter* result = new(zone()) LParameter; |
2420 if (instr->kind() == HParameter::STACK_PARAMETER) { | 2420 if (instr->kind() == HParameter::STACK_PARAMETER) { |
2421 int spill_index = chunk()->GetParameterStackSlot(instr->index()); | 2421 int spill_index = chunk()->GetParameterStackSlot(instr->index()); |
2422 return DefineAsSpilled(result, spill_index); | 2422 return DefineAsSpilled(result, spill_index); |
2423 } else { | 2423 } else { |
2424 ASSERT(info()->IsStub()); | 2424 ASSERT(info()->IsStub()); |
2425 CodeStubInterfaceDescriptor* descriptor = | 2425 CodeStubInterfaceDescriptor* descriptor = |
2426 info()->code_stub()->GetInterfaceDescriptor(info()->isolate()); | 2426 info()->code_stub()->GetInterfaceDescriptor(info()->isolate()); |
2427 Register reg = descriptor->register_params_[instr->index()]; | 2427 int index = static_cast<int>(instr->index()); |
| 2428 Register reg = DESCRIPTOR_GET_PARAMETER_REGISTER(descriptor, index); |
2428 return DefineFixed(result, reg); | 2429 return DefineFixed(result, reg); |
2429 } | 2430 } |
2430 } | 2431 } |
2431 | 2432 |
2432 | 2433 |
2433 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { | 2434 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { |
2434 int spill_index = chunk()->GetNextSpillIndex(false); // Not double-width. | 2435 int spill_index = chunk()->GetNextSpillIndex(false); // Not double-width. |
2435 if (spill_index > LUnallocated::kMaxFixedIndex) { | 2436 if (spill_index > LUnallocated::kMaxFixedIndex) { |
2436 Abort("Too many spill slots needed for OSR"); | 2437 Abort("Too many spill slots needed for OSR"); |
2437 spill_index = 0; | 2438 spill_index = 0; |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2598 | 2599 |
2599 | 2600 |
2600 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2601 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2601 LOperand* object = UseRegister(instr->object()); | 2602 LOperand* object = UseRegister(instr->object()); |
2602 LOperand* index = UseRegister(instr->index()); | 2603 LOperand* index = UseRegister(instr->index()); |
2603 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2604 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2604 } | 2605 } |
2605 | 2606 |
2606 | 2607 |
2607 } } // namespace v8::internal | 2608 } } // namespace v8::internal |
OLD | NEW |