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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 16099004: Added old data space allocation infrastructure for pretenuring. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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
« no previous file with comments | « no previous file | src/ia32/lithium-codegen-ia32.cc » ('j') | src/runtime.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5491 matching lines...) Expand 10 before | Expand all | Expand 10 after
5502 Register result = ToRegister(instr->result()); 5502 Register result = ToRegister(instr->result());
5503 Register scratch = ToRegister(instr->temp1()); 5503 Register scratch = ToRegister(instr->temp1());
5504 Register scratch2 = ToRegister(instr->temp2()); 5504 Register scratch2 = ToRegister(instr->temp2());
5505 5505
5506 // Allocate memory for the object. 5506 // Allocate memory for the object.
5507 AllocationFlags flags = TAG_OBJECT; 5507 AllocationFlags flags = TAG_OBJECT;
5508 if (instr->hydrogen()->MustAllocateDoubleAligned()) { 5508 if (instr->hydrogen()->MustAllocateDoubleAligned()) {
5509 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); 5509 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
5510 } 5510 }
5511 if (instr->hydrogen()->CanAllocateInOldPointerSpace()) { 5511 if (instr->hydrogen()->CanAllocateInOldPointerSpace()) {
5512 ASSERT(!instr->hydrogen()->CanAllocateInOldDataSpace());
5512 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); 5513 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE);
5514 } else if (instr->hydrogen()->CanAllocateInOldDataSpace()) {
5515 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE);
5513 } 5516 }
5517
5514 if (instr->size()->IsConstantOperand()) { 5518 if (instr->size()->IsConstantOperand()) {
5515 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5519 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5516 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); 5520 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags);
5517 } else { 5521 } else {
5518 Register size = ToRegister(instr->size()); 5522 Register size = ToRegister(instr->size());
5519 __ Allocate(size, 5523 __ Allocate(size,
5520 result, 5524 result,
5521 scratch, 5525 scratch,
5522 scratch2, 5526 scratch2,
5523 deferred->entry(), 5527 deferred->entry(),
(...skipping 17 matching lines...) Expand all
5541 Register size = ToRegister(instr->size()); 5545 Register size = ToRegister(instr->size());
5542 ASSERT(!size.is(result)); 5546 ASSERT(!size.is(result));
5543 __ SmiTag(size); 5547 __ SmiTag(size);
5544 __ push(size); 5548 __ push(size);
5545 } else { 5549 } else {
5546 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5550 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5547 __ Push(Smi::FromInt(size)); 5551 __ Push(Smi::FromInt(size));
5548 } 5552 }
5549 5553
5550 if (instr->hydrogen()->CanAllocateInOldPointerSpace()) { 5554 if (instr->hydrogen()->CanAllocateInOldPointerSpace()) {
5551 CallRuntimeFromDeferred( 5555 ASSERT(!instr->hydrogen()->CanAllocateInOldDataSpace());
5552 Runtime::kAllocateInOldPointerSpace, 1, instr); 5556 CallRuntimeFromDeferred(Runtime::kAllocateInOldPointerSpace, 1, instr);
5557 } else if (instr->hydrogen()->CanAllocateInOldDataSpace()) {
5558 CallRuntimeFromDeferred(Runtime::kAllocateInOldDataSpace, 1, instr);
5553 } else { 5559 } else {
5554 CallRuntimeFromDeferred( 5560 CallRuntimeFromDeferred(Runtime::kAllocateInNewSpace, 1, instr);
5555 Runtime::kAllocateInNewSpace, 1, instr);
5556 } 5561 }
5557 __ StoreToSafepointRegisterSlot(r0, result); 5562 __ StoreToSafepointRegisterSlot(r0, result);
5558 } 5563 }
5559 5564
5560 5565
5561 void LCodeGen::DoToFastProperties(LToFastProperties* instr) { 5566 void LCodeGen::DoToFastProperties(LToFastProperties* instr) {
5562 ASSERT(ToRegister(instr->value()).is(r0)); 5567 ASSERT(ToRegister(instr->value()).is(r0));
5563 __ push(r0); 5568 __ push(r0);
5564 CallRuntime(Runtime::kToFastProperties, 1, instr); 5569 CallRuntime(Runtime::kToFastProperties, 1, instr);
5565 } 5570 }
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
5995 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 6000 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5996 __ ldr(result, FieldMemOperand(scratch, 6001 __ ldr(result, FieldMemOperand(scratch,
5997 FixedArray::kHeaderSize - kPointerSize)); 6002 FixedArray::kHeaderSize - kPointerSize));
5998 __ bind(&done); 6003 __ bind(&done);
5999 } 6004 }
6000 6005
6001 6006
6002 #undef __ 6007 #undef __
6003 6008
6004 } } // namespace v8::internal 6009 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/ia32/lithium-codegen-ia32.cc » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698