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

Side by Side Diff: src/ppc/code-stubs-ppc.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/objects.cc ('k') | src/ppc/macro-assembler-ppc.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_PPC 5 #if V8_TARGET_ARCH_PPC
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 4563 matching lines...) Expand 10 before | Expand all | Expand 10 after
4574 __ StoreP(r4, MemOperand(r7, JSArray::kPropertiesOffset)); 4574 __ StoreP(r4, MemOperand(r7, JSArray::kPropertiesOffset));
4575 __ StoreP(r6, MemOperand(r7, JSArray::kElementsOffset)); 4575 __ StoreP(r6, MemOperand(r7, JSArray::kElementsOffset));
4576 __ StoreP(r3, MemOperand(r7, JSArray::kLengthOffset)); 4576 __ StoreP(r3, MemOperand(r7, JSArray::kLengthOffset));
4577 STATIC_ASSERT(JSArray::kSize == 4 * kPointerSize); 4577 STATIC_ASSERT(JSArray::kSize == 4 * kPointerSize);
4578 __ addi(r3, r7, Operand(kHeapObjectTag)); 4578 __ addi(r3, r7, Operand(kHeapObjectTag));
4579 __ Ret(); 4579 __ Ret();
4580 4580
4581 // Fall back to %AllocateInNewSpace (if not too big). 4581 // Fall back to %AllocateInNewSpace (if not too big).
4582 Label too_big_for_new_space; 4582 Label too_big_for_new_space;
4583 __ bind(&allocate); 4583 __ bind(&allocate);
4584 __ Cmpi(r10, Operand(Page::kMaxRegularHeapObjectSize), r0); 4584 __ Cmpi(r10, Operand(kMaxRegularHeapObjectSize), r0);
4585 __ bgt(&too_big_for_new_space); 4585 __ bgt(&too_big_for_new_space);
4586 { 4586 {
4587 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); 4587 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
4588 __ SmiTag(r10); 4588 __ SmiTag(r10);
4589 __ Push(r3, r5, r10); 4589 __ Push(r3, r5, r10);
4590 __ CallRuntime(Runtime::kAllocateInNewSpace); 4590 __ CallRuntime(Runtime::kAllocateInNewSpace);
4591 __ mr(r6, r3); 4591 __ mr(r6, r3);
4592 __ Pop(r3, r5); 4592 __ Pop(r3, r5);
4593 } 4593 }
4594 __ b(&done_allocate); 4594 __ b(&done_allocate);
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
4965 __ StoreP(r4, MemOperand(r7, JSStrictArgumentsObject::kPropertiesOffset)); 4965 __ StoreP(r4, MemOperand(r7, JSStrictArgumentsObject::kPropertiesOffset));
4966 __ StoreP(r6, MemOperand(r7, JSStrictArgumentsObject::kElementsOffset)); 4966 __ StoreP(r6, MemOperand(r7, JSStrictArgumentsObject::kElementsOffset));
4967 __ StoreP(r3, MemOperand(r7, JSStrictArgumentsObject::kLengthOffset)); 4967 __ StoreP(r3, MemOperand(r7, JSStrictArgumentsObject::kLengthOffset));
4968 STATIC_ASSERT(JSStrictArgumentsObject::kSize == 4 * kPointerSize); 4968 STATIC_ASSERT(JSStrictArgumentsObject::kSize == 4 * kPointerSize);
4969 __ addi(r3, r7, Operand(kHeapObjectTag)); 4969 __ addi(r3, r7, Operand(kHeapObjectTag));
4970 __ Ret(); 4970 __ Ret();
4971 4971
4972 // Fall back to %AllocateInNewSpace (if not too big). 4972 // Fall back to %AllocateInNewSpace (if not too big).
4973 Label too_big_for_new_space; 4973 Label too_big_for_new_space;
4974 __ bind(&allocate); 4974 __ bind(&allocate);
4975 __ Cmpi(r10, Operand(Page::kMaxRegularHeapObjectSize), r0); 4975 __ Cmpi(r10, Operand(kMaxRegularHeapObjectSize), r0);
4976 __ bgt(&too_big_for_new_space); 4976 __ bgt(&too_big_for_new_space);
4977 { 4977 {
4978 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); 4978 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
4979 __ SmiTag(r10); 4979 __ SmiTag(r10);
4980 __ Push(r3, r5, r10); 4980 __ Push(r3, r5, r10);
4981 __ CallRuntime(Runtime::kAllocateInNewSpace); 4981 __ CallRuntime(Runtime::kAllocateInNewSpace);
4982 __ mr(r6, r3); 4982 __ mr(r6, r3);
4983 __ Pop(r3, r5); 4983 __ Pop(r3, r5);
4984 } 4984 }
4985 __ b(&done_allocate); 4985 __ b(&done_allocate);
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
5472 fp, (PropertyCallbackArguments::kReturnValueOffset + 3) * kPointerSize); 5472 fp, (PropertyCallbackArguments::kReturnValueOffset + 3) * kPointerSize);
5473 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, 5473 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref,
5474 kStackUnwindSpace, NULL, return_value_operand, NULL); 5474 kStackUnwindSpace, NULL, return_value_operand, NULL);
5475 } 5475 }
5476 5476
5477 #undef __ 5477 #undef __
5478 } // namespace internal 5478 } // namespace internal
5479 } // namespace v8 5479 } // namespace v8
5480 5480
5481 #endif // V8_TARGET_ARCH_PPC 5481 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/ppc/macro-assembler-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698