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

Side by Side Diff: src/mips/code-stubs-mips.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/ia32/macro-assembler-ia32.cc ('k') | src/mips/macro-assembler-mips.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_MIPS 5 #if V8_TARGET_ARCH_MIPS
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 4606 matching lines...) Expand 10 before | Expand all | Expand 10 after
4617 __ sw(v0, FieldMemOperand(a3, JSArray::kElementsOffset)); 4617 __ sw(v0, FieldMemOperand(a3, JSArray::kElementsOffset));
4618 __ sw(a0, FieldMemOperand(a3, JSArray::kLengthOffset)); 4618 __ sw(a0, FieldMemOperand(a3, JSArray::kLengthOffset));
4619 STATIC_ASSERT(JSArray::kSize == 4 * kPointerSize); 4619 STATIC_ASSERT(JSArray::kSize == 4 * kPointerSize);
4620 __ Ret(USE_DELAY_SLOT); 4620 __ Ret(USE_DELAY_SLOT);
4621 __ mov(v0, a3); // In delay slot 4621 __ mov(v0, a3); // In delay slot
4622 4622
4623 // Fall back to %AllocateInNewSpace (if not too big). 4623 // Fall back to %AllocateInNewSpace (if not too big).
4624 Label too_big_for_new_space; 4624 Label too_big_for_new_space;
4625 __ bind(&allocate); 4625 __ bind(&allocate);
4626 __ Branch(&too_big_for_new_space, gt, t0, 4626 __ Branch(&too_big_for_new_space, gt, t0,
4627 Operand(Page::kMaxRegularHeapObjectSize)); 4627 Operand(kMaxRegularHeapObjectSize));
4628 { 4628 {
4629 FrameScope scope(masm, StackFrame::INTERNAL); 4629 FrameScope scope(masm, StackFrame::INTERNAL);
4630 __ SmiTag(t0); 4630 __ SmiTag(t0);
4631 __ Push(a0, a2, t0); 4631 __ Push(a0, a2, t0);
4632 __ CallRuntime(Runtime::kAllocateInNewSpace); 4632 __ CallRuntime(Runtime::kAllocateInNewSpace);
4633 __ Pop(a0, a2); 4633 __ Pop(a0, a2);
4634 } 4634 }
4635 __ jmp(&done_allocate); 4635 __ jmp(&done_allocate);
4636 4636
4637 // Fall back to %NewStrictArguments. 4637 // Fall back to %NewStrictArguments.
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
4961 __ sw(at, FieldMemOperand(a3, JSStrictArgumentsObject::kPropertiesOffset)); 4961 __ sw(at, FieldMemOperand(a3, JSStrictArgumentsObject::kPropertiesOffset));
4962 __ sw(v0, FieldMemOperand(a3, JSStrictArgumentsObject::kElementsOffset)); 4962 __ sw(v0, FieldMemOperand(a3, JSStrictArgumentsObject::kElementsOffset));
4963 __ sw(a0, FieldMemOperand(a3, JSStrictArgumentsObject::kLengthOffset)); 4963 __ sw(a0, FieldMemOperand(a3, JSStrictArgumentsObject::kLengthOffset));
4964 STATIC_ASSERT(JSStrictArgumentsObject::kSize == 4 * kPointerSize); 4964 STATIC_ASSERT(JSStrictArgumentsObject::kSize == 4 * kPointerSize);
4965 __ Ret(USE_DELAY_SLOT); 4965 __ Ret(USE_DELAY_SLOT);
4966 __ mov(v0, a3); // In delay slot 4966 __ mov(v0, a3); // In delay slot
4967 4967
4968 // Fall back to %AllocateInNewSpace (if not too big). 4968 // Fall back to %AllocateInNewSpace (if not too big).
4969 Label too_big_for_new_space; 4969 Label too_big_for_new_space;
4970 __ bind(&allocate); 4970 __ bind(&allocate);
4971 __ Branch(&too_big_for_new_space, gt, t0, 4971 __ Branch(&too_big_for_new_space, gt, t0, Operand(kMaxRegularHeapObjectSize));
4972 Operand(Page::kMaxRegularHeapObjectSize));
4973 { 4972 {
4974 FrameScope scope(masm, StackFrame::INTERNAL); 4973 FrameScope scope(masm, StackFrame::INTERNAL);
4975 __ SmiTag(t0); 4974 __ SmiTag(t0);
4976 __ Push(a0, a2, t0); 4975 __ Push(a0, a2, t0);
4977 __ CallRuntime(Runtime::kAllocateInNewSpace); 4976 __ CallRuntime(Runtime::kAllocateInNewSpace);
4978 __ Pop(a0, a2); 4977 __ Pop(a0, a2);
4979 } 4978 }
4980 __ jmp(&done_allocate); 4979 __ jmp(&done_allocate);
4981 4980
4982 // Fall back to %NewStrictArguments. 4981 // Fall back to %NewStrictArguments.
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
5404 kStackUnwindSpace, kInvalidStackOffset, 5403 kStackUnwindSpace, kInvalidStackOffset,
5405 return_value_operand, NULL); 5404 return_value_operand, NULL);
5406 } 5405 }
5407 5406
5408 #undef __ 5407 #undef __
5409 5408
5410 } // namespace internal 5409 } // namespace internal
5411 } // namespace v8 5410 } // namespace v8
5412 5411
5413 #endif // V8_TARGET_ARCH_MIPS 5412 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698