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

Side by Side Diff: src/arm/code-stubs-arm.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 | « no previous file | src/arm/macro-assembler-arm.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_ARM 5 #if V8_TARGET_ARCH_ARM
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 4407 matching lines...) Expand 10 before | Expand all | Expand 10 after
4418 __ str(r1, FieldMemOperand(r4, JSArray::kPropertiesOffset)); 4418 __ str(r1, FieldMemOperand(r4, JSArray::kPropertiesOffset));
4419 __ str(r3, FieldMemOperand(r4, JSArray::kElementsOffset)); 4419 __ str(r3, FieldMemOperand(r4, JSArray::kElementsOffset));
4420 __ str(r0, FieldMemOperand(r4, JSArray::kLengthOffset)); 4420 __ str(r0, FieldMemOperand(r4, JSArray::kLengthOffset));
4421 STATIC_ASSERT(JSArray::kSize == 4 * kPointerSize); 4421 STATIC_ASSERT(JSArray::kSize == 4 * kPointerSize);
4422 __ mov(r0, r4); 4422 __ mov(r0, r4);
4423 __ Ret(); 4423 __ Ret();
4424 4424
4425 // Fall back to %AllocateInNewSpace (if not too big). 4425 // Fall back to %AllocateInNewSpace (if not too big).
4426 Label too_big_for_new_space; 4426 Label too_big_for_new_space;
4427 __ bind(&allocate); 4427 __ bind(&allocate);
4428 __ cmp(r6, Operand(Page::kMaxRegularHeapObjectSize)); 4428 __ cmp(r6, Operand(kMaxRegularHeapObjectSize));
4429 __ b(gt, &too_big_for_new_space); 4429 __ b(gt, &too_big_for_new_space);
4430 { 4430 {
4431 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); 4431 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
4432 __ SmiTag(r6); 4432 __ SmiTag(r6);
4433 __ Push(r0, r2, r6); 4433 __ Push(r0, r2, r6);
4434 __ CallRuntime(Runtime::kAllocateInNewSpace); 4434 __ CallRuntime(Runtime::kAllocateInNewSpace);
4435 __ mov(r3, r0); 4435 __ mov(r3, r0);
4436 __ Pop(r0, r2); 4436 __ Pop(r0, r2);
4437 } 4437 }
4438 __ jmp(&done_allocate); 4438 __ jmp(&done_allocate);
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
4756 __ str(r1, FieldMemOperand(r4, JSStrictArgumentsObject::kPropertiesOffset)); 4756 __ str(r1, FieldMemOperand(r4, JSStrictArgumentsObject::kPropertiesOffset));
4757 __ str(r3, FieldMemOperand(r4, JSStrictArgumentsObject::kElementsOffset)); 4757 __ str(r3, FieldMemOperand(r4, JSStrictArgumentsObject::kElementsOffset));
4758 __ str(r0, FieldMemOperand(r4, JSStrictArgumentsObject::kLengthOffset)); 4758 __ str(r0, FieldMemOperand(r4, JSStrictArgumentsObject::kLengthOffset));
4759 STATIC_ASSERT(JSStrictArgumentsObject::kSize == 4 * kPointerSize); 4759 STATIC_ASSERT(JSStrictArgumentsObject::kSize == 4 * kPointerSize);
4760 __ mov(r0, r4); 4760 __ mov(r0, r4);
4761 __ Ret(); 4761 __ Ret();
4762 4762
4763 // Fall back to %AllocateInNewSpace (if not too big). 4763 // Fall back to %AllocateInNewSpace (if not too big).
4764 Label too_big_for_new_space; 4764 Label too_big_for_new_space;
4765 __ bind(&allocate); 4765 __ bind(&allocate);
4766 __ cmp(r6, Operand(Page::kMaxRegularHeapObjectSize)); 4766 __ cmp(r6, Operand(kMaxRegularHeapObjectSize));
4767 __ b(gt, &too_big_for_new_space); 4767 __ b(gt, &too_big_for_new_space);
4768 { 4768 {
4769 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); 4769 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
4770 __ SmiTag(r6); 4770 __ SmiTag(r6);
4771 __ Push(r0, r2, r6); 4771 __ Push(r0, r2, r6);
4772 __ CallRuntime(Runtime::kAllocateInNewSpace); 4772 __ CallRuntime(Runtime::kAllocateInNewSpace);
4773 __ mov(r3, r0); 4773 __ mov(r3, r0);
4774 __ Pop(r0, r2); 4774 __ Pop(r0, r2);
4775 } 4775 }
4776 __ b(&done_allocate); 4776 __ b(&done_allocate);
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
5214 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, 5214 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref,
5215 kStackUnwindSpace, NULL, return_value_operand, NULL); 5215 kStackUnwindSpace, NULL, return_value_operand, NULL);
5216 } 5216 }
5217 5217
5218 #undef __ 5218 #undef __
5219 5219
5220 } // namespace internal 5220 } // namespace internal
5221 } // namespace v8 5221 } // namespace v8
5222 5222
5223 #endif // V8_TARGET_ARCH_ARM 5223 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698