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

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 2035413003: Revert of Provide a tagged allocation top pointer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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/heap/spaces.h ('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 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/api-arguments.h" 8 #include "src/api-arguments.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 4554 matching lines...) Expand 10 before | Expand all | Expand 10 after
4565 // Fall back to runtime if the target differs from the new target's 4565 // Fall back to runtime if the target differs from the new target's
4566 // initial map constructor. 4566 // initial map constructor.
4567 __ cmp(edi, FieldOperand(ecx, Map::kConstructorOrBackPointerOffset)); 4567 __ cmp(edi, FieldOperand(ecx, Map::kConstructorOrBackPointerOffset));
4568 __ j(not_equal, &new_object); 4568 __ j(not_equal, &new_object);
4569 4569
4570 // Allocate the JSObject on the heap. 4570 // Allocate the JSObject on the heap.
4571 Label allocate, done_allocate; 4571 Label allocate, done_allocate;
4572 __ movzx_b(ebx, FieldOperand(ecx, Map::kInstanceSizeOffset)); 4572 __ movzx_b(ebx, FieldOperand(ecx, Map::kInstanceSizeOffset));
4573 __ lea(ebx, Operand(ebx, times_pointer_size, 0)); 4573 __ lea(ebx, Operand(ebx, times_pointer_size, 0));
4574 __ Allocate(ebx, eax, edi, no_reg, &allocate, NO_ALLOCATION_FLAGS); 4574 __ Allocate(ebx, eax, edi, no_reg, &allocate, NO_ALLOCATION_FLAGS);
4575 __ dec(edi); // Untag result end.
4576 __ bind(&done_allocate); 4575 __ bind(&done_allocate);
4577 4576
4578 // Initialize the JSObject fields. 4577 // Initialize the JSObject fields.
4579 __ mov(FieldOperand(eax, JSObject::kMapOffset), ecx); 4578 __ mov(FieldOperand(eax, JSObject::kMapOffset), ecx);
4580 __ mov(FieldOperand(eax, JSObject::kPropertiesOffset), 4579 __ mov(FieldOperand(eax, JSObject::kPropertiesOffset),
4581 masm->isolate()->factory()->empty_fixed_array()); 4580 masm->isolate()->factory()->empty_fixed_array());
4582 __ mov(FieldOperand(eax, JSObject::kElementsOffset), 4581 __ mov(FieldOperand(eax, JSObject::kElementsOffset),
4583 masm->isolate()->factory()->empty_fixed_array()); 4582 masm->isolate()->factory()->empty_fixed_array());
4584 STATIC_ASSERT(JSObject::kHeaderSize == 3 * kPointerSize); 4583 STATIC_ASSERT(JSObject::kHeaderSize == 3 * kPointerSize);
4585 __ lea(ebx, FieldOperand(eax, JSObject::kHeaderSize)); 4584 __ lea(ebx, FieldOperand(eax, JSObject::kHeaderSize));
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
4716 __ bind(&no_rest_parameters); 4715 __ bind(&no_rest_parameters);
4717 { 4716 {
4718 // ----------- S t a t e ------------- 4717 // ----------- S t a t e -------------
4719 // -- esi : context 4718 // -- esi : context
4720 // -- esp[0] : return address 4719 // -- esp[0] : return address
4721 // ----------------------------------- 4720 // -----------------------------------
4722 4721
4723 // Allocate an empty rest parameter array. 4722 // Allocate an empty rest parameter array.
4724 Label allocate, done_allocate; 4723 Label allocate, done_allocate;
4725 __ Allocate(JSArray::kSize, eax, edx, ecx, &allocate, NO_ALLOCATION_FLAGS); 4724 __ Allocate(JSArray::kSize, eax, edx, ecx, &allocate, NO_ALLOCATION_FLAGS);
4726 __ dec(edx); // Untag result end.
4727 __ bind(&done_allocate); 4725 __ bind(&done_allocate);
4728 4726
4729 // Setup the rest parameter array in rax. 4727 // Setup the rest parameter array in rax.
4730 __ LoadGlobalFunction(Context::JS_ARRAY_FAST_ELEMENTS_MAP_INDEX, ecx); 4728 __ LoadGlobalFunction(Context::JS_ARRAY_FAST_ELEMENTS_MAP_INDEX, ecx);
4731 __ mov(FieldOperand(eax, JSArray::kMapOffset), ecx); 4729 __ mov(FieldOperand(eax, JSArray::kMapOffset), ecx);
4732 __ mov(ecx, isolate()->factory()->empty_fixed_array()); 4730 __ mov(ecx, isolate()->factory()->empty_fixed_array());
4733 __ mov(FieldOperand(eax, JSArray::kPropertiesOffset), ecx); 4731 __ mov(FieldOperand(eax, JSArray::kPropertiesOffset), ecx);
4734 __ mov(FieldOperand(eax, JSArray::kElementsOffset), ecx); 4732 __ mov(FieldOperand(eax, JSArray::kElementsOffset), ecx);
4735 __ mov(FieldOperand(eax, JSArray::kLengthOffset), 4733 __ mov(FieldOperand(eax, JSArray::kLengthOffset),
4736 Immediate(Smi::FromInt(0))); 4734 Immediate(Smi::FromInt(0)));
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after
5719 kStackUnwindSpace, nullptr, return_value_operand, 5717 kStackUnwindSpace, nullptr, return_value_operand,
5720 NULL); 5718 NULL);
5721 } 5719 }
5722 5720
5723 #undef __ 5721 #undef __
5724 5722
5725 } // namespace internal 5723 } // namespace internal
5726 } // namespace v8 5724 } // namespace v8
5727 5725
5728 #endif // V8_TARGET_ARCH_IA32 5726 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/heap/spaces.h ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698