Commit afabb5a9 authored by kasperl@chromium.org's avatar kasperl@chromium.org

Make the FastCloneShallowArrayStub a bit prettier.

TBR=fschneider@chromium.org
Review URL: http://codereview.chromium.org/507069

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3518 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 2409b4b7
......@@ -6662,18 +6662,14 @@ void FastCloneShallowArrayStub::Generate(MacroAssembler* masm) {
// Load boilerplate object into ecx and check if we need to create a
// boilerplate.
Label slow_case;
__ mov(ecx, Operand(esp, 3 * kPointerSize));
__ mov(eax, Operand(esp, 2 * kPointerSize));
ASSERT(kPointerSize == 4);
__ mov(ecx, FieldOperand(ecx,
eax,
times_2,
FixedArray::kHeaderSize));
ASSERT((kPointerSize == 4) && (kSmiTagSize == 1) && (kSmiTag == 0));
__ mov(ecx, FieldOperand(ecx, eax, times_2, FixedArray::kHeaderSize));
__ cmp(ecx, Factory::undefined_value());
Label slow_case;
__ j(equal, &slow_case);
// Allocate both the JS array and the elements array in one big
// allocation. This avoids multiple limit checks.
__ AllocateInNewSpace(size, eax, ebx, edx, &slow_case, TAG_OBJECT);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment