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

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

Issue 73973002: Allow passing flags to Runtime_AllocateInTargetSpace. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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 | « src/ia32/lithium-codegen-ia32.cc ('k') | src/runtime.h » ('j') | no next file with comments »
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 5393 matching lines...) Expand 10 before | Expand all | Expand 10 after
5404 if (instr->size()->IsRegister()) { 5404 if (instr->size()->IsRegister()) {
5405 Register size = ToRegister(instr->size()); 5405 Register size = ToRegister(instr->size());
5406 ASSERT(!size.is(result)); 5406 ASSERT(!size.is(result));
5407 __ SmiTag(size); 5407 __ SmiTag(size);
5408 __ push(size); 5408 __ push(size);
5409 } else { 5409 } else {
5410 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5410 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5411 __ Push(Smi::FromInt(size)); 5411 __ Push(Smi::FromInt(size));
5412 } 5412 }
5413 5413
5414 int flags = AllocateDoubleAlignFlag::encode(
5415 instr->hydrogen()->MustAllocateDoubleAligned());
5414 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) { 5416 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) {
5415 ASSERT(!instr->hydrogen()->IsOldDataSpaceAllocation()); 5417 ASSERT(!instr->hydrogen()->IsOldDataSpaceAllocation());
5416 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); 5418 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation());
5417 CallRuntimeFromDeferred(Runtime::kAllocateInOldPointerSpace, 1, instr, 5419 flags = AllocateTargetSpace::update(flags, OLD_POINTER_SPACE);
5418 instr->context());
5419 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { 5420 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) {
5420 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); 5421 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation());
5421 CallRuntimeFromDeferred(Runtime::kAllocateInOldDataSpace, 1, instr, 5422 flags = AllocateTargetSpace::update(flags, OLD_DATA_SPACE);
5422 instr->context());
5423 } else { 5423 } else {
5424 CallRuntimeFromDeferred(Runtime::kAllocateInNewSpace, 1, instr, 5424 flags = AllocateTargetSpace::update(flags, NEW_SPACE);
5425 instr->context());
5426 } 5425 }
5426 __ Push(Smi::FromInt(flags));
5427
5428 CallRuntimeFromDeferred(
5429 Runtime::kAllocateInTargetSpace, 2, instr, instr->context());
5427 __ StoreToSafepointRegisterSlot(v0, result); 5430 __ StoreToSafepointRegisterSlot(v0, result);
5428 } 5431 }
5429 5432
5430 5433
5431 void LCodeGen::DoToFastProperties(LToFastProperties* instr) { 5434 void LCodeGen::DoToFastProperties(LToFastProperties* instr) {
5432 ASSERT(ToRegister(instr->value()).is(a0)); 5435 ASSERT(ToRegister(instr->value()).is(a0));
5433 ASSERT(ToRegister(instr->result()).is(v0)); 5436 ASSERT(ToRegister(instr->result()).is(v0));
5434 __ push(a0); 5437 __ push(a0);
5435 CallRuntime(Runtime::kToFastProperties, 1, instr); 5438 CallRuntime(Runtime::kToFastProperties, 1, instr);
5436 } 5439 }
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
5890 __ Subu(scratch, result, scratch); 5893 __ Subu(scratch, result, scratch);
5891 __ lw(result, FieldMemOperand(scratch, 5894 __ lw(result, FieldMemOperand(scratch,
5892 FixedArray::kHeaderSize - kPointerSize)); 5895 FixedArray::kHeaderSize - kPointerSize));
5893 __ bind(&done); 5896 __ bind(&done);
5894 } 5897 }
5895 5898
5896 5899
5897 #undef __ 5900 #undef __
5898 5901
5899 } } // namespace v8::internal 5902 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698