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

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

Issue 10105026: Version 3.10.3 (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 8 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
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ia32/full-codegen-ia32.cc » ('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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 __ j(equal, &only_change_map); 390 __ j(equal, &only_change_map);
391 391
392 __ push(eax); 392 __ push(eax);
393 __ push(ebx); 393 __ push(ebx);
394 394
395 __ mov(edi, FieldOperand(edi, FixedArray::kLengthOffset)); 395 __ mov(edi, FieldOperand(edi, FixedArray::kLengthOffset));
396 396
397 // Allocate new FixedDoubleArray. 397 // Allocate new FixedDoubleArray.
398 // edx: receiver 398 // edx: receiver
399 // edi: length of source FixedArray (smi-tagged) 399 // edi: length of source FixedArray (smi-tagged)
400 __ lea(esi, Operand(edi, times_4, FixedDoubleArray::kHeaderSize)); 400 __ lea(esi, Operand(edi,
401 times_4,
402 FixedDoubleArray::kHeaderSize + kPointerSize));
401 __ AllocateInNewSpace(esi, eax, ebx, no_reg, &gc_required, TAG_OBJECT); 403 __ AllocateInNewSpace(esi, eax, ebx, no_reg, &gc_required, TAG_OBJECT);
402 404
405 Label aligned, aligned_done;
406 __ test(eax, Immediate(kDoubleAlignmentMask - kHeapObjectTag));
407 __ j(zero, &aligned, Label::kNear);
408 __ mov(FieldOperand(eax, 0),
409 Immediate(masm->isolate()->factory()->one_pointer_filler_map()));
410 __ add(eax, Immediate(kPointerSize));
411 __ jmp(&aligned_done);
412
413 __ bind(&aligned);
414 __ mov(Operand(eax, esi, times_1, -kPointerSize-1),
415 Immediate(masm->isolate()->factory()->one_pointer_filler_map()));
416
417 __ bind(&aligned_done);
418
403 // eax: destination FixedDoubleArray 419 // eax: destination FixedDoubleArray
404 // edi: number of elements 420 // edi: number of elements
405 // edx: receiver 421 // edx: receiver
406 __ mov(FieldOperand(eax, HeapObject::kMapOffset), 422 __ mov(FieldOperand(eax, HeapObject::kMapOffset),
407 Immediate(masm->isolate()->factory()->fixed_double_array_map())); 423 Immediate(masm->isolate()->factory()->fixed_double_array_map()));
408 __ mov(FieldOperand(eax, FixedDoubleArray::kLengthOffset), edi); 424 __ mov(FieldOperand(eax, FixedDoubleArray::kLengthOffset), edi);
409 __ mov(esi, FieldOperand(edx, JSObject::kElementsOffset)); 425 __ mov(esi, FieldOperand(edx, JSObject::kElementsOffset));
410 // Replace receiver's backing store with newly created FixedDoubleArray. 426 // Replace receiver's backing store with newly created FixedDoubleArray.
411 __ mov(FieldOperand(edx, JSObject::kElementsOffset), eax); 427 __ mov(FieldOperand(edx, JSObject::kElementsOffset), eax);
412 __ mov(ebx, eax); 428 __ mov(ebx, eax);
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 times_1, 753 times_1,
738 SeqAsciiString::kHeaderSize)); 754 SeqAsciiString::kHeaderSize));
739 __ bind(&done); 755 __ bind(&done);
740 } 756 }
741 757
742 #undef __ 758 #undef __
743 759
744 } } // namespace v8::internal 760 } } // namespace v8::internal
745 761
746 #endif // V8_TARGET_ARCH_IA32 762 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698