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

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

Issue 2311203002: Move kMaxRegularHeapObjectSize into globals (Closed)
Patch Set: Saving the file helps... Created 4 years, 3 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 4546 matching lines...) Expand 10 before | Expand all | Expand 10 after
4557 isolate()->factory()->empty_fixed_array()); 4557 isolate()->factory()->empty_fixed_array());
4558 __ mov(FieldOperand(edi, JSArray::kElementsOffset), edx); 4558 __ mov(FieldOperand(edi, JSArray::kElementsOffset), edx);
4559 __ mov(FieldOperand(edi, JSArray::kLengthOffset), eax); 4559 __ mov(FieldOperand(edi, JSArray::kLengthOffset), eax);
4560 STATIC_ASSERT(JSArray::kSize == 4 * kPointerSize); 4560 STATIC_ASSERT(JSArray::kSize == 4 * kPointerSize);
4561 __ mov(eax, edi); 4561 __ mov(eax, edi);
4562 __ Ret(); 4562 __ Ret();
4563 4563
4564 // Fall back to %AllocateInNewSpace (if not too big). 4564 // Fall back to %AllocateInNewSpace (if not too big).
4565 Label too_big_for_new_space; 4565 Label too_big_for_new_space;
4566 __ bind(&allocate); 4566 __ bind(&allocate);
4567 __ cmp(ecx, Immediate(Page::kMaxRegularHeapObjectSize)); 4567 __ cmp(ecx, Immediate(kMaxRegularHeapObjectSize));
4568 __ j(greater, &too_big_for_new_space); 4568 __ j(greater, &too_big_for_new_space);
4569 { 4569 {
4570 FrameScope scope(masm, StackFrame::INTERNAL); 4570 FrameScope scope(masm, StackFrame::INTERNAL);
4571 __ SmiTag(ecx); 4571 __ SmiTag(ecx);
4572 __ Push(eax); 4572 __ Push(eax);
4573 __ Push(ebx); 4573 __ Push(ebx);
4574 __ Push(ecx); 4574 __ Push(ecx);
4575 __ CallRuntime(Runtime::kAllocateInNewSpace); 4575 __ CallRuntime(Runtime::kAllocateInNewSpace);
4576 __ mov(edx, eax); 4576 __ mov(edx, eax);
4577 __ Pop(ebx); 4577 __ Pop(ebx);
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
4946 isolate()->factory()->empty_fixed_array()); 4946 isolate()->factory()->empty_fixed_array());
4947 __ mov(FieldOperand(edi, JSStrictArgumentsObject::kElementsOffset), edx); 4947 __ mov(FieldOperand(edi, JSStrictArgumentsObject::kElementsOffset), edx);
4948 __ mov(FieldOperand(edi, JSStrictArgumentsObject::kLengthOffset), eax); 4948 __ mov(FieldOperand(edi, JSStrictArgumentsObject::kLengthOffset), eax);
4949 STATIC_ASSERT(JSStrictArgumentsObject::kSize == 4 * kPointerSize); 4949 STATIC_ASSERT(JSStrictArgumentsObject::kSize == 4 * kPointerSize);
4950 __ mov(eax, edi); 4950 __ mov(eax, edi);
4951 __ Ret(); 4951 __ Ret();
4952 4952
4953 // Fall back to %AllocateInNewSpace (if not too big). 4953 // Fall back to %AllocateInNewSpace (if not too big).
4954 Label too_big_for_new_space; 4954 Label too_big_for_new_space;
4955 __ bind(&allocate); 4955 __ bind(&allocate);
4956 __ cmp(ecx, Immediate(Page::kMaxRegularHeapObjectSize)); 4956 __ cmp(ecx, Immediate(kMaxRegularHeapObjectSize));
4957 __ j(greater, &too_big_for_new_space); 4957 __ j(greater, &too_big_for_new_space);
4958 { 4958 {
4959 FrameScope scope(masm, StackFrame::INTERNAL); 4959 FrameScope scope(masm, StackFrame::INTERNAL);
4960 __ SmiTag(ecx); 4960 __ SmiTag(ecx);
4961 __ Push(eax); 4961 __ Push(eax);
4962 __ Push(ebx); 4962 __ Push(ebx);
4963 __ Push(ecx); 4963 __ Push(ecx);
4964 __ CallRuntime(Runtime::kAllocateInNewSpace); 4964 __ CallRuntime(Runtime::kAllocateInNewSpace);
4965 __ mov(edx, eax); 4965 __ mov(edx, eax);
4966 __ Pop(ebx); 4966 __ Pop(ebx);
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
5486 kStackUnwindSpace, nullptr, return_value_operand, 5486 kStackUnwindSpace, nullptr, return_value_operand,
5487 NULL); 5487 NULL);
5488 } 5488 }
5489 5489
5490 #undef __ 5490 #undef __
5491 5491
5492 } // namespace internal 5492 } // namespace internal
5493 } // namespace v8 5493 } // namespace v8
5494 5494
5495 #endif // V8_TARGET_ARCH_IA32 5495 #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