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

Side by Side Diff: src/x64/lithium-codegen-x64.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/serialize.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 5213 matching lines...) Expand 10 before | Expand all | Expand 10 after
5224 if (instr->size()->IsRegister()) { 5224 if (instr->size()->IsRegister()) {
5225 Register size = ToRegister(instr->size()); 5225 Register size = ToRegister(instr->size());
5226 ASSERT(!size.is(result)); 5226 ASSERT(!size.is(result));
5227 __ Integer32ToSmi(size, size); 5227 __ Integer32ToSmi(size, size);
5228 __ push(size); 5228 __ push(size);
5229 } else { 5229 } else {
5230 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5230 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5231 __ Push(Smi::FromInt(size)); 5231 __ Push(Smi::FromInt(size));
5232 } 5232 }
5233 5233
5234 int flags = 0;
5234 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) { 5235 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) {
5235 ASSERT(!instr->hydrogen()->IsOldDataSpaceAllocation()); 5236 ASSERT(!instr->hydrogen()->IsOldDataSpaceAllocation());
5236 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); 5237 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation());
5237 CallRuntimeFromDeferred( 5238 flags = AllocateTargetSpace::update(flags, OLD_POINTER_SPACE);
5238 Runtime::kAllocateInOldPointerSpace, 1, instr, instr->context());
5239 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { 5239 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) {
5240 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); 5240 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation());
5241 CallRuntimeFromDeferred( 5241 flags = AllocateTargetSpace::update(flags, OLD_DATA_SPACE);
5242 Runtime::kAllocateInOldDataSpace, 1, instr, instr->context());
5243 } else { 5242 } else {
5244 CallRuntimeFromDeferred( 5243 flags = AllocateTargetSpace::update(flags, NEW_SPACE);
5245 Runtime::kAllocateInNewSpace, 1, instr, instr->context());
5246 } 5244 }
5245 __ Push(Smi::FromInt(flags));
5246
5247 CallRuntimeFromDeferred(
5248 Runtime::kAllocateInTargetSpace, 2, instr, instr->context());
5247 __ StoreToSafepointRegisterSlot(result, rax); 5249 __ StoreToSafepointRegisterSlot(result, rax);
5248 } 5250 }
5249 5251
5250 5252
5251 void LCodeGen::DoToFastProperties(LToFastProperties* instr) { 5253 void LCodeGen::DoToFastProperties(LToFastProperties* instr) {
5252 ASSERT(ToRegister(instr->value()).is(rax)); 5254 ASSERT(ToRegister(instr->value()).is(rax));
5253 __ push(rax); 5255 __ push(rax);
5254 CallRuntime(Runtime::kToFastProperties, 1, instr); 5256 CallRuntime(Runtime::kToFastProperties, 1, instr);
5255 } 5257 }
5256 5258
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
5673 FixedArray::kHeaderSize - kPointerSize)); 5675 FixedArray::kHeaderSize - kPointerSize));
5674 __ bind(&done); 5676 __ bind(&done);
5675 } 5677 }
5676 5678
5677 5679
5678 #undef __ 5680 #undef __
5679 5681
5680 } } // namespace v8::internal 5682 } } // namespace v8::internal
5681 5683
5682 #endif // V8_TARGET_ARCH_X64 5684 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/serialize.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698