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

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

Issue 1210153007: X87: Clean up JSConstructStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | 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 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_X87 7 #if V8_TARGET_ARCH_X87
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 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after
1716 1708
1717 __ bind(&ok); 1709 __ bind(&ok);
1718 __ ret(0); 1710 __ ret(0);
1719 } 1711 }
1720 1712
1721 #undef __ 1713 #undef __
1722 } // namespace internal 1714 } // namespace internal
1723 } // namespace v8 1715 } // namespace v8
1724 1716
1725 #endif // V8_TARGET_ARCH_X87 1717 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698