Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: src/ia32/lithium-ia32.cc

Issue 12385014: Hydrogen stubs for array constructors (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 2498 matching lines...) Expand 10 before | Expand all | Expand 10 after
2509 LOperand* context = UseAny(instr->context()); 2509 LOperand* context = UseAny(instr->context());
2510 LOperand* temp = TempRegister(); 2510 LOperand* temp = TempRegister();
2511 LAllocateObject* result = new(zone()) LAllocateObject(context, temp); 2511 LAllocateObject* result = new(zone()) LAllocateObject(context, temp);
2512 return AssignPointerMap(DefineAsRegister(result)); 2512 return AssignPointerMap(DefineAsRegister(result));
2513 } 2513 }
2514 2514
2515 2515
2516 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { 2516 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) {
2517 info()->MarkAsDeferredCalling(); 2517 info()->MarkAsDeferredCalling();
2518 LOperand* context = UseAny(instr->context()); 2518 LOperand* context = UseAny(instr->context());
2519 // TODO(mvstanton): why can't size be a constant if possible?
2519 LOperand* size = UseTempRegister(instr->size()); 2520 LOperand* size = UseTempRegister(instr->size());
2520 LOperand* temp = TempRegister(); 2521 LOperand* temp = TempRegister();
2521 LAllocate* result = new(zone()) LAllocate(context, size, temp); 2522 LAllocate* result = new(zone()) LAllocate(context, size, temp);
2522 return AssignPointerMap(DefineAsRegister(result)); 2523 return AssignPointerMap(DefineAsRegister(result));
2523 } 2524 }
2524 2525
2525 2526
2526 LInstruction* LChunkBuilder::DoArrayLiteral(HArrayLiteral* instr) { 2527 LInstruction* LChunkBuilder::DoArrayLiteral(HArrayLiteral* instr) {
2527 LOperand* context = UseFixed(instr->context(), esi); 2528 LOperand* context = UseFixed(instr->context(), esi);
2528 return MarkAsCall( 2529 return MarkAsCall(
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
2570 2571
2571 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { 2572 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) {
2572 LParameter* result = new(zone()) LParameter; 2573 LParameter* result = new(zone()) LParameter;
2573 if (instr->kind() == HParameter::STACK_PARAMETER) { 2574 if (instr->kind() == HParameter::STACK_PARAMETER) {
2574 int spill_index = chunk()->GetParameterStackSlot(instr->index()); 2575 int spill_index = chunk()->GetParameterStackSlot(instr->index());
2575 return DefineAsSpilled(result, spill_index); 2576 return DefineAsSpilled(result, spill_index);
2576 } else { 2577 } else {
2577 ASSERT(info()->IsStub()); 2578 ASSERT(info()->IsStub());
2578 CodeStubInterfaceDescriptor* descriptor = 2579 CodeStubInterfaceDescriptor* descriptor =
2579 info()->code_stub()->GetInterfaceDescriptor(info()->isolate()); 2580 info()->code_stub()->GetInterfaceDescriptor(info()->isolate());
2580 Register reg = descriptor->register_params_[instr->index()]; 2581 int index = static_cast<int>(instr->index());
2582 Register reg = DESCRIPTOR_GET_PARAMETER_REGISTER(descriptor, index);
2581 return DefineFixed(result, reg); 2583 return DefineFixed(result, reg);
2582 } 2584 }
2583 } 2585 }
2584 2586
2585 2587
2586 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { 2588 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) {
2587 int spill_index = chunk()->GetNextSpillIndex(false); // Not double-width. 2589 int spill_index = chunk()->GetNextSpillIndex(false); // Not double-width.
2588 if (spill_index > LUnallocated::kMaxFixedIndex) { 2590 if (spill_index > LUnallocated::kMaxFixedIndex) {
2589 Abort("Too many spill slots needed for OSR"); 2591 Abort("Too many spill slots needed for OSR");
2590 spill_index = 0; 2592 spill_index = 0;
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
2772 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2774 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2773 LOperand* object = UseRegister(instr->object()); 2775 LOperand* object = UseRegister(instr->object());
2774 LOperand* index = UseTempRegister(instr->index()); 2776 LOperand* index = UseTempRegister(instr->index());
2775 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2777 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2776 } 2778 }
2777 2779
2778 2780
2779 } } // namespace v8::internal 2781 } } // namespace v8::internal
2780 2782
2781 #endif // V8_TARGET_ARCH_IA32 2783 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/code-stubs.h ('K') | « src/ia32/lithium-ia32.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698