| 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 2462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2473 LOperand* context = UseAny(instr->context()); | 2473 LOperand* context = UseAny(instr->context()); |
| 2474 LOperand* temp = TempRegister(); | 2474 LOperand* temp = TempRegister(); |
| 2475 LAllocateObject* result = new(zone()) LAllocateObject(context, temp); | 2475 LAllocateObject* result = new(zone()) LAllocateObject(context, temp); |
| 2476 return AssignPointerMap(DefineAsRegister(result)); | 2476 return AssignPointerMap(DefineAsRegister(result)); |
| 2477 } | 2477 } |
| 2478 | 2478 |
| 2479 | 2479 |
| 2480 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { | 2480 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { |
| 2481 info()->MarkAsDeferredCalling(); | 2481 info()->MarkAsDeferredCalling(); |
| 2482 LOperand* context = UseAny(instr->context()); | 2482 LOperand* context = UseAny(instr->context()); |
| 2483 // TODO(mvstanton): why can't size be a constant if possible? |
| 2483 LOperand* size = UseTempRegister(instr->size()); | 2484 LOperand* size = UseTempRegister(instr->size()); |
| 2484 LOperand* temp = TempRegister(); | 2485 LOperand* temp = TempRegister(); |
| 2485 LAllocate* result = new(zone()) LAllocate(context, size, temp); | 2486 LAllocate* result = new(zone()) LAllocate(context, size, temp); |
| 2486 return AssignPointerMap(DefineAsRegister(result)); | 2487 return AssignPointerMap(DefineAsRegister(result)); |
| 2487 } | 2488 } |
| 2488 | 2489 |
| 2489 | 2490 |
| 2490 LInstruction* LChunkBuilder::DoArrayLiteral(HArrayLiteral* instr) { | 2491 LInstruction* LChunkBuilder::DoArrayLiteral(HArrayLiteral* instr) { |
| 2491 LOperand* context = UseFixed(instr->context(), esi); | 2492 LOperand* context = UseFixed(instr->context(), esi); |
| 2492 return MarkAsCall( | 2493 return MarkAsCall( |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2534 | 2535 |
| 2535 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { | 2536 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { |
| 2536 LParameter* result = new(zone()) LParameter; | 2537 LParameter* result = new(zone()) LParameter; |
| 2537 if (instr->kind() == HParameter::STACK_PARAMETER) { | 2538 if (instr->kind() == HParameter::STACK_PARAMETER) { |
| 2538 int spill_index = chunk()->GetParameterStackSlot(instr->index()); | 2539 int spill_index = chunk()->GetParameterStackSlot(instr->index()); |
| 2539 return DefineAsSpilled(result, spill_index); | 2540 return DefineAsSpilled(result, spill_index); |
| 2540 } else { | 2541 } else { |
| 2541 ASSERT(info()->IsStub()); | 2542 ASSERT(info()->IsStub()); |
| 2542 CodeStubInterfaceDescriptor* descriptor = | 2543 CodeStubInterfaceDescriptor* descriptor = |
| 2543 info()->code_stub()->GetInterfaceDescriptor(info()->isolate()); | 2544 info()->code_stub()->GetInterfaceDescriptor(info()->isolate()); |
| 2544 Register reg = descriptor->register_params_[instr->index()]; | 2545 int index = static_cast<int>(instr->index()); |
| 2546 Register reg = DESCRIPTOR_GET_PARAMETER_REGISTER(descriptor, index); |
| 2545 return DefineFixed(result, reg); | 2547 return DefineFixed(result, reg); |
| 2546 } | 2548 } |
| 2547 } | 2549 } |
| 2548 | 2550 |
| 2549 | 2551 |
| 2550 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { | 2552 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { |
| 2551 int spill_index = chunk()->GetNextSpillIndex(false); // Not double-width. | 2553 int spill_index = chunk()->GetNextSpillIndex(false); // Not double-width. |
| 2552 if (spill_index > LUnallocated::kMaxFixedIndex) { | 2554 if (spill_index > LUnallocated::kMaxFixedIndex) { |
| 2553 Abort("Too many spill slots needed for OSR"); | 2555 Abort("Too many spill slots needed for OSR"); |
| 2554 spill_index = 0; | 2556 spill_index = 0; |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2728 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2730 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2729 LOperand* object = UseRegister(instr->object()); | 2731 LOperand* object = UseRegister(instr->object()); |
| 2730 LOperand* index = UseTempRegister(instr->index()); | 2732 LOperand* index = UseTempRegister(instr->index()); |
| 2731 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2733 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2732 } | 2734 } |
| 2733 | 2735 |
| 2734 | 2736 |
| 2735 } } // namespace v8::internal | 2737 } } // namespace v8::internal |
| 2736 | 2738 |
| 2737 #endif // V8_TARGET_ARCH_IA32 | 2739 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |