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

Side by Side Diff: src/arm64/code-stubs-arm64.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/arm/macro-assembler-arm.cc ('k') | src/arm64/macro-assembler-arm64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
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/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 4655 matching lines...) Expand 10 before | Expand all | Expand 10 after
4666 __ LoadRoot(x1, Heap::kEmptyFixedArrayRootIndex); 4666 __ LoadRoot(x1, Heap::kEmptyFixedArrayRootIndex);
4667 __ Str(x1, FieldMemOperand(x0, JSArray::kPropertiesOffset)); 4667 __ Str(x1, FieldMemOperand(x0, JSArray::kPropertiesOffset));
4668 __ Str(x3, FieldMemOperand(x0, JSArray::kElementsOffset)); 4668 __ Str(x3, FieldMemOperand(x0, JSArray::kElementsOffset));
4669 __ Str(x6, FieldMemOperand(x0, JSArray::kLengthOffset)); 4669 __ Str(x6, FieldMemOperand(x0, JSArray::kLengthOffset));
4670 STATIC_ASSERT(JSArray::kSize == 4 * kPointerSize); 4670 STATIC_ASSERT(JSArray::kSize == 4 * kPointerSize);
4671 __ Ret(); 4671 __ Ret();
4672 4672
4673 // Fall back to %AllocateInNewSpace (if not too big). 4673 // Fall back to %AllocateInNewSpace (if not too big).
4674 Label too_big_for_new_space; 4674 Label too_big_for_new_space;
4675 __ Bind(&allocate); 4675 __ Bind(&allocate);
4676 __ Cmp(x6, Operand(Page::kMaxRegularHeapObjectSize)); 4676 __ Cmp(x6, Operand(kMaxRegularHeapObjectSize));
4677 __ B(gt, &too_big_for_new_space); 4677 __ B(gt, &too_big_for_new_space);
4678 { 4678 {
4679 FrameScope scope(masm, StackFrame::INTERNAL); 4679 FrameScope scope(masm, StackFrame::INTERNAL);
4680 __ SmiTag(x0); 4680 __ SmiTag(x0);
4681 __ SmiTag(x6); 4681 __ SmiTag(x6);
4682 __ Push(x0, x2, x6); 4682 __ Push(x0, x2, x6);
4683 __ CallRuntime(Runtime::kAllocateInNewSpace); 4683 __ CallRuntime(Runtime::kAllocateInNewSpace);
4684 __ Mov(x3, x0); 4684 __ Mov(x3, x0);
4685 __ Pop(x2, x0); 4685 __ Pop(x2, x0);
4686 __ SmiUntag(x0); 4686 __ SmiUntag(x0);
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
5086 __ LoadRoot(x1, Heap::kEmptyFixedArrayRootIndex); 5086 __ LoadRoot(x1, Heap::kEmptyFixedArrayRootIndex);
5087 __ Str(x1, FieldMemOperand(x0, JSStrictArgumentsObject::kPropertiesOffset)); 5087 __ Str(x1, FieldMemOperand(x0, JSStrictArgumentsObject::kPropertiesOffset));
5088 __ Str(x3, FieldMemOperand(x0, JSStrictArgumentsObject::kElementsOffset)); 5088 __ Str(x3, FieldMemOperand(x0, JSStrictArgumentsObject::kElementsOffset));
5089 __ Str(x6, FieldMemOperand(x0, JSStrictArgumentsObject::kLengthOffset)); 5089 __ Str(x6, FieldMemOperand(x0, JSStrictArgumentsObject::kLengthOffset));
5090 STATIC_ASSERT(JSStrictArgumentsObject::kSize == 4 * kPointerSize); 5090 STATIC_ASSERT(JSStrictArgumentsObject::kSize == 4 * kPointerSize);
5091 __ Ret(); 5091 __ Ret();
5092 5092
5093 // Fall back to %AllocateInNewSpace (if not too big). 5093 // Fall back to %AllocateInNewSpace (if not too big).
5094 Label too_big_for_new_space; 5094 Label too_big_for_new_space;
5095 __ Bind(&allocate); 5095 __ Bind(&allocate);
5096 __ Cmp(x6, Operand(Page::kMaxRegularHeapObjectSize)); 5096 __ Cmp(x6, Operand(kMaxRegularHeapObjectSize));
5097 __ B(gt, &too_big_for_new_space); 5097 __ B(gt, &too_big_for_new_space);
5098 { 5098 {
5099 FrameScope scope(masm, StackFrame::INTERNAL); 5099 FrameScope scope(masm, StackFrame::INTERNAL);
5100 __ SmiTag(x0); 5100 __ SmiTag(x0);
5101 __ SmiTag(x6); 5101 __ SmiTag(x6);
5102 __ Push(x0, x2, x6); 5102 __ Push(x0, x2, x6);
5103 __ CallRuntime(Runtime::kAllocateInNewSpace); 5103 __ CallRuntime(Runtime::kAllocateInNewSpace);
5104 __ Mov(x3, x0); 5104 __ Mov(x3, x0);
5105 __ Pop(x2, x0); 5105 __ Pop(x2, x0);
5106 __ SmiUntag(x0); 5106 __ SmiUntag(x0);
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
5575 kStackUnwindSpace, NULL, spill_offset, 5575 kStackUnwindSpace, NULL, spill_offset,
5576 return_value_operand, NULL); 5576 return_value_operand, NULL);
5577 } 5577 }
5578 5578
5579 #undef __ 5579 #undef __
5580 5580
5581 } // namespace internal 5581 } // namespace internal
5582 } // namespace v8 5582 } // namespace v8
5583 5583
5584 #endif // V8_TARGET_ARCH_ARM64 5584 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/arm64/macro-assembler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698