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

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

Issue 1186823003: Clean up JSConstructStub (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased Created 5 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
« no previous file with comments | « src/frames.cc ('k') | src/ia32/macro-assembler-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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 // ecx: start of next object 351 // ecx: start of next object
352 __ mov(eax, factory->fixed_array_map()); 352 __ mov(eax, factory->fixed_array_map());
353 __ mov(Operand(edi, FixedArray::kMapOffset), eax); // setup the map 353 __ mov(Operand(edi, FixedArray::kMapOffset), eax); // setup the map
354 __ SmiTag(edx); 354 __ SmiTag(edx);
355 __ mov(Operand(edi, FixedArray::kLengthOffset), edx); // and length 355 __ mov(Operand(edi, FixedArray::kLengthOffset), edx); // and length
356 356
357 // Initialize the fields to undefined. 357 // Initialize the fields to undefined.
358 // ebx: JSObject 358 // ebx: JSObject
359 // edi: FixedArray 359 // edi: FixedArray
360 // ecx: start of next object 360 // ecx: start of next object
361 { Label loop, entry; 361 __ mov(edx, factory->undefined_value());
362 __ mov(edx, factory->undefined_value()); 362 __ lea(eax, Operand(edi, FixedArray::kHeaderSize));
363 __ lea(eax, Operand(edi, FixedArray::kHeaderSize)); 363 __ InitializeFieldsWithFiller(eax, ecx, edx);
364 __ jmp(&entry);
365 __ bind(&loop);
366 __ mov(Operand(eax, 0), edx);
367 __ add(eax, Immediate(kPointerSize));
368 __ bind(&entry);
369 __ cmp(eax, ecx);
370 __ j(below, &loop);
371 }
372 364
373 // Store the initialized FixedArray into the properties field of 365 // Store the initialized FixedArray into the properties field of
374 // the JSObject 366 // the JSObject
375 // ebx: JSObject 367 // ebx: JSObject
376 // edi: FixedArray 368 // edi: FixedArray
377 __ or_(edi, Immediate(kHeapObjectTag)); // add the heap tag 369 __ or_(edi, Immediate(kHeapObjectTag)); // add the heap tag
378 __ mov(FieldOperand(ebx, JSObject::kPropertiesOffset), edi); 370 __ mov(FieldOperand(ebx, JSObject::kPropertiesOffset), edi);
379 371
380 372
381 // Continue with JSObject being successfully allocated 373 // Continue with JSObject being successfully allocated
(...skipping 1326 matching lines...) Expand 10 before | Expand all | Expand 10 after
1708 1700
1709 __ bind(&ok); 1701 __ bind(&ok);
1710 __ ret(0); 1702 __ ret(0);
1711 } 1703 }
1712 1704
1713 #undef __ 1705 #undef __
1714 } // namespace internal 1706 } // namespace internal
1715 } // namespace v8 1707 } // namespace v8
1716 1708
1717 #endif // V8_TARGET_ARCH_IA32 1709 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/frames.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698