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

Side by Side Diff: src/s390/code-stubs-s390.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/runtime/runtime-internal.cc ('k') | src/s390/macro-assembler-s390.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_S390 5 #if V8_TARGET_ARCH_S390
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 4503 matching lines...) Expand 10 before | Expand all | Expand 10 after
4514 __ StoreP(r3, MemOperand(r6, JSArray::kPropertiesOffset)); 4514 __ StoreP(r3, MemOperand(r6, JSArray::kPropertiesOffset));
4515 __ StoreP(r5, MemOperand(r6, JSArray::kElementsOffset)); 4515 __ StoreP(r5, MemOperand(r6, JSArray::kElementsOffset));
4516 __ StoreP(r2, MemOperand(r6, JSArray::kLengthOffset)); 4516 __ StoreP(r2, MemOperand(r6, JSArray::kLengthOffset));
4517 STATIC_ASSERT(JSArray::kSize == 4 * kPointerSize); 4517 STATIC_ASSERT(JSArray::kSize == 4 * kPointerSize);
4518 __ AddP(r2, r6, Operand(kHeapObjectTag)); 4518 __ AddP(r2, r6, Operand(kHeapObjectTag));
4519 __ Ret(); 4519 __ Ret();
4520 4520
4521 // Fall back to %AllocateInNewSpace (if not too big). 4521 // Fall back to %AllocateInNewSpace (if not too big).
4522 Label too_big_for_new_space; 4522 Label too_big_for_new_space;
4523 __ bind(&allocate); 4523 __ bind(&allocate);
4524 __ CmpP(r9, Operand(Page::kMaxRegularHeapObjectSize)); 4524 __ CmpP(r9, Operand(kMaxRegularHeapObjectSize));
4525 __ bgt(&too_big_for_new_space); 4525 __ bgt(&too_big_for_new_space);
4526 { 4526 {
4527 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); 4527 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
4528 __ SmiTag(r9); 4528 __ SmiTag(r9);
4529 __ Push(r2, r4, r9); 4529 __ Push(r2, r4, r9);
4530 __ CallRuntime(Runtime::kAllocateInNewSpace); 4530 __ CallRuntime(Runtime::kAllocateInNewSpace);
4531 __ LoadRR(r5, r2); 4531 __ LoadRR(r5, r2);
4532 __ Pop(r2, r4); 4532 __ Pop(r2, r4);
4533 } 4533 }
4534 __ b(&done_allocate); 4534 __ b(&done_allocate);
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
4889 __ StoreP(r3, MemOperand(r6, JSStrictArgumentsObject::kPropertiesOffset)); 4889 __ StoreP(r3, MemOperand(r6, JSStrictArgumentsObject::kPropertiesOffset));
4890 __ StoreP(r5, MemOperand(r6, JSStrictArgumentsObject::kElementsOffset)); 4890 __ StoreP(r5, MemOperand(r6, JSStrictArgumentsObject::kElementsOffset));
4891 __ StoreP(r2, MemOperand(r6, JSStrictArgumentsObject::kLengthOffset)); 4891 __ StoreP(r2, MemOperand(r6, JSStrictArgumentsObject::kLengthOffset));
4892 STATIC_ASSERT(JSStrictArgumentsObject::kSize == 4 * kPointerSize); 4892 STATIC_ASSERT(JSStrictArgumentsObject::kSize == 4 * kPointerSize);
4893 __ AddP(r2, r6, Operand(kHeapObjectTag)); 4893 __ AddP(r2, r6, Operand(kHeapObjectTag));
4894 __ Ret(); 4894 __ Ret();
4895 4895
4896 // Fall back to %AllocateInNewSpace (if not too big). 4896 // Fall back to %AllocateInNewSpace (if not too big).
4897 Label too_big_for_new_space; 4897 Label too_big_for_new_space;
4898 __ bind(&allocate); 4898 __ bind(&allocate);
4899 __ CmpP(r9, Operand(Page::kMaxRegularHeapObjectSize)); 4899 __ CmpP(r9, Operand(kMaxRegularHeapObjectSize));
4900 __ bgt(&too_big_for_new_space); 4900 __ bgt(&too_big_for_new_space);
4901 { 4901 {
4902 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); 4902 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
4903 __ SmiTag(r9); 4903 __ SmiTag(r9);
4904 __ Push(r2, r4, r9); 4904 __ Push(r2, r4, r9);
4905 __ CallRuntime(Runtime::kAllocateInNewSpace); 4905 __ CallRuntime(Runtime::kAllocateInNewSpace);
4906 __ LoadRR(r5, r2); 4906 __ LoadRR(r5, r2);
4907 __ Pop(r2, r4); 4907 __ Pop(r2, r4);
4908 } 4908 }
4909 __ b(&done_allocate); 4909 __ b(&done_allocate);
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
5387 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, 5387 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref,
5388 kStackUnwindSpace, NULL, return_value_operand, NULL); 5388 kStackUnwindSpace, NULL, return_value_operand, NULL);
5389 } 5389 }
5390 5390
5391 #undef __ 5391 #undef __
5392 5392
5393 } // namespace internal 5393 } // namespace internal
5394 } // namespace v8 5394 } // namespace v8
5395 5395
5396 #endif // V8_TARGET_ARCH_S390 5396 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/runtime/runtime-internal.cc ('k') | src/s390/macro-assembler-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698