Index: src/mips/code-stubs-mips.cc |
diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc |
index 2c56cdbef427584c04beca3346f2d1fe83c4d742..643ce114f9d5bc1aa65c64d776312401c52681b6 100644 |
--- a/src/mips/code-stubs-mips.cc |
+++ b/src/mips/code-stubs-mips.cc |
@@ -3307,499 +3307,6 @@ void InternalArrayConstructorStub::Generate(MacroAssembler* masm) { |
GenerateCase(masm, FAST_ELEMENTS); |
} |
-void FastNewRestParameterStub::Generate(MacroAssembler* masm) { |
- // ----------- S t a t e ------------- |
- // -- a1 : function |
- // -- cp : context |
- // -- fp : frame pointer |
- // -- ra : return address |
- // ----------------------------------- |
- __ AssertFunction(a1); |
- |
- // Make a2 point to the JavaScript frame. |
- __ mov(a2, fp); |
- if (skip_stub_frame()) { |
- // For Ignition we need to skip the handler/stub frame to reach the |
- // JavaScript frame for the function. |
- __ lw(a2, MemOperand(a2, StandardFrameConstants::kCallerFPOffset)); |
- } |
- if (FLAG_debug_code) { |
- Label ok; |
- __ lw(a3, MemOperand(a2, StandardFrameConstants::kFunctionOffset)); |
- __ Branch(&ok, eq, a1, Operand(a3)); |
- __ Abort(kInvalidFrameForFastNewRestArgumentsStub); |
- __ bind(&ok); |
- } |
- |
- // Check if we have rest parameters (only possible if we have an |
- // arguments adaptor frame below the function frame). |
- Label no_rest_parameters; |
- __ lw(a2, MemOperand(a2, StandardFrameConstants::kCallerFPOffset)); |
- __ lw(a3, MemOperand(a2, CommonFrameConstants::kContextOrFrameTypeOffset)); |
- __ Branch(&no_rest_parameters, ne, a3, |
- Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
- |
- // Check if the arguments adaptor frame contains more arguments than |
- // specified by the function's internal formal parameter count. |
- Label rest_parameters; |
- __ lw(a0, MemOperand(a2, ArgumentsAdaptorFrameConstants::kLengthOffset)); |
- __ lw(a3, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); |
- __ lw(a3, |
- FieldMemOperand(a3, SharedFunctionInfo::kFormalParameterCountOffset)); |
- __ Subu(a0, a0, Operand(a3)); |
- __ Branch(&rest_parameters, gt, a0, Operand(zero_reg)); |
- |
- // Return an empty rest parameter array. |
- __ bind(&no_rest_parameters); |
- { |
- // ----------- S t a t e ------------- |
- // -- cp : context |
- // -- ra : return address |
- // ----------------------------------- |
- |
- // Allocate an empty rest parameter array. |
- Label allocate, done_allocate; |
- __ Allocate(JSArray::kSize, v0, a0, a1, &allocate, NO_ALLOCATION_FLAGS); |
- __ bind(&done_allocate); |
- |
- // Setup the rest parameter array in v0. |
- __ LoadNativeContextSlot(Context::JS_ARRAY_FAST_ELEMENTS_MAP_INDEX, a1); |
- __ sw(a1, FieldMemOperand(v0, JSArray::kMapOffset)); |
- __ LoadRoot(a1, Heap::kEmptyFixedArrayRootIndex); |
- __ sw(a1, FieldMemOperand(v0, JSArray::kPropertiesOffset)); |
- __ sw(a1, FieldMemOperand(v0, JSArray::kElementsOffset)); |
- __ Move(a1, Smi::kZero); |
- __ Ret(USE_DELAY_SLOT); |
- __ sw(a1, FieldMemOperand(v0, JSArray::kLengthOffset)); // In delay slot |
- STATIC_ASSERT(JSArray::kSize == 4 * kPointerSize); |
- |
- // Fall back to %AllocateInNewSpace. |
- __ bind(&allocate); |
- { |
- FrameScope scope(masm, StackFrame::INTERNAL); |
- __ Push(Smi::FromInt(JSArray::kSize)); |
- __ CallRuntime(Runtime::kAllocateInNewSpace); |
- } |
- __ jmp(&done_allocate); |
- } |
- |
- __ bind(&rest_parameters); |
- { |
- // Compute the pointer to the first rest parameter (skippping the receiver). |
- __ Lsa(a2, a2, a0, kPointerSizeLog2 - 1); |
- __ Addu(a2, a2, Operand(StandardFrameConstants::kCallerSPOffset - |
- 1 * kPointerSize)); |
- |
- // ----------- S t a t e ------------- |
- // -- cp : context |
- // -- a0 : number of rest parameters (tagged) |
- // -- a1 : function |
- // -- a2 : pointer to first rest parameters |
- // -- ra : return address |
- // ----------------------------------- |
- |
- // Allocate space for the rest parameter array plus the backing store. |
- Label allocate, done_allocate; |
- __ li(t0, Operand(JSArray::kSize + FixedArray::kHeaderSize)); |
- __ Lsa(t0, t0, a0, kPointerSizeLog2 - 1); |
- __ Allocate(t0, v0, a3, t1, &allocate, NO_ALLOCATION_FLAGS); |
- __ bind(&done_allocate); |
- |
- // Setup the elements array in v0. |
- __ LoadRoot(at, Heap::kFixedArrayMapRootIndex); |
- __ sw(at, FieldMemOperand(v0, FixedArray::kMapOffset)); |
- __ sw(a0, FieldMemOperand(v0, FixedArray::kLengthOffset)); |
- __ Addu(a3, v0, Operand(FixedArray::kHeaderSize)); |
- { |
- Label loop, done_loop; |
- __ sll(at, a0, kPointerSizeLog2 - 1); |
- __ Addu(a1, a3, at); |
- __ bind(&loop); |
- __ Branch(&done_loop, eq, a1, Operand(a3)); |
- __ lw(at, MemOperand(a2, 0 * kPointerSize)); |
- __ sw(at, FieldMemOperand(a3, 0 * kPointerSize)); |
- __ Subu(a2, a2, Operand(1 * kPointerSize)); |
- __ Addu(a3, a3, Operand(1 * kPointerSize)); |
- __ jmp(&loop); |
- __ bind(&done_loop); |
- } |
- |
- // Setup the rest parameter array in a3. |
- __ LoadNativeContextSlot(Context::JS_ARRAY_FAST_ELEMENTS_MAP_INDEX, at); |
- __ sw(at, FieldMemOperand(a3, JSArray::kMapOffset)); |
- __ LoadRoot(at, Heap::kEmptyFixedArrayRootIndex); |
- __ sw(at, FieldMemOperand(a3, JSArray::kPropertiesOffset)); |
- __ sw(v0, FieldMemOperand(a3, JSArray::kElementsOffset)); |
- __ sw(a0, FieldMemOperand(a3, JSArray::kLengthOffset)); |
- STATIC_ASSERT(JSArray::kSize == 4 * kPointerSize); |
- __ Ret(USE_DELAY_SLOT); |
- __ mov(v0, a3); // In delay slot |
- |
- // Fall back to %AllocateInNewSpace (if not too big). |
- Label too_big_for_new_space; |
- __ bind(&allocate); |
- __ Branch(&too_big_for_new_space, gt, t0, |
- Operand(kMaxRegularHeapObjectSize)); |
- { |
- FrameScope scope(masm, StackFrame::INTERNAL); |
- __ SmiTag(t0); |
- __ Push(a0, a2, t0); |
- __ CallRuntime(Runtime::kAllocateInNewSpace); |
- __ Pop(a0, a2); |
- } |
- __ jmp(&done_allocate); |
- |
- // Fall back to %NewStrictArguments. |
- __ bind(&too_big_for_new_space); |
- __ Push(a1); |
- __ TailCallRuntime(Runtime::kNewStrictArguments); |
- } |
-} |
- |
- |
-void FastNewSloppyArgumentsStub::Generate(MacroAssembler* masm) { |
- // ----------- S t a t e ------------- |
- // -- a1 : function |
- // -- cp : context |
- // -- fp : frame pointer |
- // -- ra : return address |
- // ----------------------------------- |
- __ AssertFunction(a1); |
- |
- // Make t0 point to the JavaScript frame. |
- __ mov(t0, fp); |
- if (skip_stub_frame()) { |
- // For Ignition we need to skip the handler/stub frame to reach the |
- // JavaScript frame for the function. |
- __ lw(t0, MemOperand(t0, StandardFrameConstants::kCallerFPOffset)); |
- } |
- if (FLAG_debug_code) { |
- Label ok; |
- __ lw(a3, MemOperand(t0, StandardFrameConstants::kFunctionOffset)); |
- __ Branch(&ok, eq, a1, Operand(a3)); |
- __ Abort(kInvalidFrameForFastNewRestArgumentsStub); |
- __ bind(&ok); |
- } |
- |
- // TODO(bmeurer): Cleanup to match the FastNewStrictArgumentsStub. |
- __ lw(a2, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); |
- __ lw(a2, |
- FieldMemOperand(a2, SharedFunctionInfo::kFormalParameterCountOffset)); |
- __ Lsa(a3, t0, a2, kPointerSizeLog2 - 1); |
- __ Addu(a3, a3, Operand(StandardFrameConstants::kCallerSPOffset)); |
- |
- // a1 : function |
- // a2 : number of parameters (tagged) |
- // a3 : parameters pointer |
- // t0 : Javascript frame pointer |
- // Registers used over whole function: |
- // t1 : arguments count (tagged) |
- // t2 : mapped parameter count (tagged) |
- |
- // Check if the calling frame is an arguments adaptor frame. |
- Label adaptor_frame, try_allocate, runtime; |
- __ lw(t0, MemOperand(t0, StandardFrameConstants::kCallerFPOffset)); |
- __ lw(a0, MemOperand(t0, CommonFrameConstants::kContextOrFrameTypeOffset)); |
- __ Branch(&adaptor_frame, eq, a0, |
- Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
- |
- // No adaptor, parameter count = argument count. |
- __ mov(t1, a2); |
- __ Branch(USE_DELAY_SLOT, &try_allocate); |
- __ mov(t2, a2); // In delay slot. |
- |
- // We have an adaptor frame. Patch the parameters pointer. |
- __ bind(&adaptor_frame); |
- __ lw(t1, MemOperand(t0, ArgumentsAdaptorFrameConstants::kLengthOffset)); |
- __ Lsa(t0, t0, t1, 1); |
- __ Addu(a3, t0, Operand(StandardFrameConstants::kCallerSPOffset)); |
- |
- // t1 = argument count (tagged) |
- // t2 = parameter count (tagged) |
- // Compute the mapped parameter count = min(t2, t1) in t2. |
- __ mov(t2, a2); |
- __ Branch(&try_allocate, le, t2, Operand(t1)); |
- __ mov(t2, t1); |
- |
- __ bind(&try_allocate); |
- |
- // Compute the sizes of backing store, parameter map, and arguments object. |
- // 1. Parameter map, has 2 extra words containing context and backing store. |
- const int kParameterMapHeaderSize = |
- FixedArray::kHeaderSize + 2 * kPointerSize; |
- // If there are no mapped parameters, we do not need the parameter_map. |
- Label param_map_size; |
- DCHECK_EQ(static_cast<Smi*>(0), Smi::kZero); |
- __ Branch(USE_DELAY_SLOT, ¶m_map_size, eq, t2, Operand(zero_reg)); |
- __ mov(t5, zero_reg); // In delay slot: param map size = 0 when t2 == 0. |
- __ sll(t5, t2, 1); |
- __ addiu(t5, t5, kParameterMapHeaderSize); |
- __ bind(¶m_map_size); |
- |
- // 2. Backing store. |
- __ Lsa(t5, t5, t1, 1); |
- __ Addu(t5, t5, Operand(FixedArray::kHeaderSize)); |
- |
- // 3. Arguments object. |
- __ Addu(t5, t5, Operand(JSSloppyArgumentsObject::kSize)); |
- |
- // Do the allocation of all three objects in one go. |
- __ Allocate(t5, v0, t5, t0, &runtime, NO_ALLOCATION_FLAGS); |
- |
- // v0 = address of new object(s) (tagged) |
- // a2 = argument count (smi-tagged) |
- // Get the arguments boilerplate from the current native context into t0. |
- const int kNormalOffset = |
- Context::SlotOffset(Context::SLOPPY_ARGUMENTS_MAP_INDEX); |
- const int kAliasedOffset = |
- Context::SlotOffset(Context::FAST_ALIASED_ARGUMENTS_MAP_INDEX); |
- |
- __ lw(t0, NativeContextMemOperand()); |
- Label skip2_ne, skip2_eq; |
- __ Branch(&skip2_ne, ne, t2, Operand(zero_reg)); |
- __ lw(t0, MemOperand(t0, kNormalOffset)); |
- __ bind(&skip2_ne); |
- |
- __ Branch(&skip2_eq, eq, t2, Operand(zero_reg)); |
- __ lw(t0, MemOperand(t0, kAliasedOffset)); |
- __ bind(&skip2_eq); |
- |
- // v0 = address of new object (tagged) |
- // a2 = argument count (smi-tagged) |
- // t0 = address of arguments map (tagged) |
- // t2 = mapped parameter count (tagged) |
- __ sw(t0, FieldMemOperand(v0, JSObject::kMapOffset)); |
- __ LoadRoot(t5, Heap::kEmptyFixedArrayRootIndex); |
- __ sw(t5, FieldMemOperand(v0, JSObject::kPropertiesOffset)); |
- __ sw(t5, FieldMemOperand(v0, JSObject::kElementsOffset)); |
- |
- // Set up the callee in-object property. |
- __ AssertNotSmi(a1); |
- __ sw(a1, FieldMemOperand(v0, JSSloppyArgumentsObject::kCalleeOffset)); |
- |
- // Use the length (smi tagged) and set that as an in-object property too. |
- __ AssertSmi(t1); |
- __ sw(t1, FieldMemOperand(v0, JSSloppyArgumentsObject::kLengthOffset)); |
- |
- // Set up the elements pointer in the allocated arguments object. |
- // If we allocated a parameter map, t0 will point there, otherwise |
- // it will point to the backing store. |
- __ Addu(t0, v0, Operand(JSSloppyArgumentsObject::kSize)); |
- __ sw(t0, FieldMemOperand(v0, JSObject::kElementsOffset)); |
- |
- // v0 = address of new object (tagged) |
- // a2 = argument count (tagged) |
- // t0 = address of parameter map or backing store (tagged) |
- // t2 = mapped parameter count (tagged) |
- // Initialize parameter map. If there are no mapped arguments, we're done. |
- Label skip_parameter_map; |
- Label skip3; |
- __ Branch(&skip3, ne, t2, Operand(Smi::kZero)); |
- // Move backing store address to a1, because it is |
- // expected there when filling in the unmapped arguments. |
- __ mov(a1, t0); |
- __ bind(&skip3); |
- |
- __ Branch(&skip_parameter_map, eq, t2, Operand(Smi::kZero)); |
- |
- __ LoadRoot(t1, Heap::kSloppyArgumentsElementsMapRootIndex); |
- __ sw(t1, FieldMemOperand(t0, FixedArray::kMapOffset)); |
- __ Addu(t1, t2, Operand(Smi::FromInt(2))); |
- __ sw(t1, FieldMemOperand(t0, FixedArray::kLengthOffset)); |
- __ sw(cp, FieldMemOperand(t0, FixedArray::kHeaderSize + 0 * kPointerSize)); |
- __ Lsa(t1, t0, t2, 1); |
- __ Addu(t1, t1, Operand(kParameterMapHeaderSize)); |
- __ sw(t1, FieldMemOperand(t0, FixedArray::kHeaderSize + 1 * kPointerSize)); |
- |
- // Copy the parameter slots and the holes in the arguments. |
- // We need to fill in mapped_parameter_count slots. They index the context, |
- // where parameters are stored in reverse order, at |
- // MIN_CONTEXT_SLOTS .. MIN_CONTEXT_SLOTS+parameter_count-1 |
- // The mapped parameter thus need to get indices |
- // MIN_CONTEXT_SLOTS+parameter_count-1 .. |
- // MIN_CONTEXT_SLOTS+parameter_count-mapped_parameter_count |
- // We loop from right to left. |
- Label parameters_loop, parameters_test; |
- __ mov(t1, t2); |
- __ Addu(t5, a2, Operand(Smi::FromInt(Context::MIN_CONTEXT_SLOTS))); |
- __ Subu(t5, t5, Operand(t2)); |
- __ LoadRoot(t3, Heap::kTheHoleValueRootIndex); |
- __ Lsa(a1, t0, t1, 1); |
- __ Addu(a1, a1, Operand(kParameterMapHeaderSize)); |
- |
- // a1 = address of backing store (tagged) |
- // t0 = address of parameter map (tagged) |
- // a0 = temporary scratch (a.o., for address calculation) |
- // t1 = loop variable (tagged) |
- // t3 = the hole value |
- __ jmp(¶meters_test); |
- |
- __ bind(¶meters_loop); |
- __ Subu(t1, t1, Operand(Smi::FromInt(1))); |
- __ sll(a0, t1, 1); |
- __ Addu(a0, a0, Operand(kParameterMapHeaderSize - kHeapObjectTag)); |
- __ Addu(t6, t0, a0); |
- __ sw(t5, MemOperand(t6)); |
- __ Subu(a0, a0, Operand(kParameterMapHeaderSize - FixedArray::kHeaderSize)); |
- __ Addu(t6, a1, a0); |
- __ sw(t3, MemOperand(t6)); |
- __ Addu(t5, t5, Operand(Smi::FromInt(1))); |
- __ bind(¶meters_test); |
- __ Branch(¶meters_loop, ne, t1, Operand(Smi::kZero)); |
- |
- // t1 = argument count (tagged). |
- __ lw(t1, FieldMemOperand(v0, JSSloppyArgumentsObject::kLengthOffset)); |
- |
- __ bind(&skip_parameter_map); |
- // v0 = address of new object (tagged) |
- // a1 = address of backing store (tagged) |
- // t1 = argument count (tagged) |
- // t2 = mapped parameter count (tagged) |
- // t5 = scratch |
- // Copy arguments header and remaining slots (if there are any). |
- __ LoadRoot(t5, Heap::kFixedArrayMapRootIndex); |
- __ sw(t5, FieldMemOperand(a1, FixedArray::kMapOffset)); |
- __ sw(t1, FieldMemOperand(a1, FixedArray::kLengthOffset)); |
- |
- Label arguments_loop, arguments_test; |
- __ sll(t6, t2, 1); |
- __ Subu(a3, a3, Operand(t6)); |
- __ jmp(&arguments_test); |
- |
- __ bind(&arguments_loop); |
- __ Subu(a3, a3, Operand(kPointerSize)); |
- __ lw(t0, MemOperand(a3, 0)); |
- __ Lsa(t5, a1, t2, 1); |
- __ sw(t0, FieldMemOperand(t5, FixedArray::kHeaderSize)); |
- __ Addu(t2, t2, Operand(Smi::FromInt(1))); |
- |
- __ bind(&arguments_test); |
- __ Branch(&arguments_loop, lt, t2, Operand(t1)); |
- |
- // Return. |
- __ Ret(); |
- |
- // Do the runtime call to allocate the arguments object. |
- // t1 = argument count (tagged) |
- __ bind(&runtime); |
- __ Push(a1, a3, t1); |
- __ TailCallRuntime(Runtime::kNewSloppyArguments); |
-} |
- |
- |
-void FastNewStrictArgumentsStub::Generate(MacroAssembler* masm) { |
- // ----------- S t a t e ------------- |
- // -- a1 : function |
- // -- cp : context |
- // -- fp : frame pointer |
- // -- ra : return address |
- // ----------------------------------- |
- __ AssertFunction(a1); |
- |
- // Make a2 point to the JavaScript frame. |
- __ mov(a2, fp); |
- if (skip_stub_frame()) { |
- // For Ignition we need to skip the handler/stub frame to reach the |
- // JavaScript frame for the function. |
- __ lw(a2, MemOperand(a2, StandardFrameConstants::kCallerFPOffset)); |
- } |
- if (FLAG_debug_code) { |
- Label ok; |
- __ lw(a3, MemOperand(a2, StandardFrameConstants::kFunctionOffset)); |
- __ Branch(&ok, eq, a1, Operand(a3)); |
- __ Abort(kInvalidFrameForFastNewRestArgumentsStub); |
- __ bind(&ok); |
- } |
- |
- // Check if we have an arguments adaptor frame below the function frame. |
- Label arguments_adaptor, arguments_done; |
- __ lw(a3, MemOperand(a2, StandardFrameConstants::kCallerFPOffset)); |
- __ lw(a0, MemOperand(a3, CommonFrameConstants::kContextOrFrameTypeOffset)); |
- __ Branch(&arguments_adaptor, eq, a0, |
- Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
- { |
- __ lw(t0, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); |
- __ lw(a0, |
- FieldMemOperand(t0, SharedFunctionInfo::kFormalParameterCountOffset)); |
- __ Lsa(a2, a2, a0, kPointerSizeLog2 - 1); |
- __ Addu(a2, a2, Operand(StandardFrameConstants::kCallerSPOffset - |
- 1 * kPointerSize)); |
- } |
- __ Branch(&arguments_done); |
- __ bind(&arguments_adaptor); |
- { |
- __ lw(a0, MemOperand(a3, ArgumentsAdaptorFrameConstants::kLengthOffset)); |
- __ Lsa(a2, a3, a0, kPointerSizeLog2 - 1); |
- __ Addu(a2, a2, Operand(StandardFrameConstants::kCallerSPOffset - |
- 1 * kPointerSize)); |
- } |
- __ bind(&arguments_done); |
- |
- // ----------- S t a t e ------------- |
- // -- cp : context |
- // -- a0 : number of rest parameters (tagged) |
- // -- a1 : function |
- // -- a2 : pointer to first rest parameters |
- // -- ra : return address |
- // ----------------------------------- |
- |
- // Allocate space for the strict arguments object plus the backing store. |
- Label allocate, done_allocate; |
- __ li(t0, Operand(JSStrictArgumentsObject::kSize + FixedArray::kHeaderSize)); |
- __ Lsa(t0, t0, a0, kPointerSizeLog2 - 1); |
- __ Allocate(t0, v0, a3, t1, &allocate, NO_ALLOCATION_FLAGS); |
- __ bind(&done_allocate); |
- |
- // Setup the elements array in v0. |
- __ LoadRoot(at, Heap::kFixedArrayMapRootIndex); |
- __ sw(at, FieldMemOperand(v0, FixedArray::kMapOffset)); |
- __ sw(a0, FieldMemOperand(v0, FixedArray::kLengthOffset)); |
- __ Addu(a3, v0, Operand(FixedArray::kHeaderSize)); |
- { |
- Label loop, done_loop; |
- __ sll(at, a0, kPointerSizeLog2 - 1); |
- __ Addu(a1, a3, at); |
- __ bind(&loop); |
- __ Branch(&done_loop, eq, a1, Operand(a3)); |
- __ lw(at, MemOperand(a2, 0 * kPointerSize)); |
- __ sw(at, FieldMemOperand(a3, 0 * kPointerSize)); |
- __ Subu(a2, a2, Operand(1 * kPointerSize)); |
- __ Addu(a3, a3, Operand(1 * kPointerSize)); |
- __ Branch(&loop); |
- __ bind(&done_loop); |
- } |
- |
- // Setup the strict arguments object in a3. |
- __ LoadNativeContextSlot(Context::STRICT_ARGUMENTS_MAP_INDEX, at); |
- __ sw(at, FieldMemOperand(a3, JSStrictArgumentsObject::kMapOffset)); |
- __ LoadRoot(at, Heap::kEmptyFixedArrayRootIndex); |
- __ sw(at, FieldMemOperand(a3, JSStrictArgumentsObject::kPropertiesOffset)); |
- __ sw(v0, FieldMemOperand(a3, JSStrictArgumentsObject::kElementsOffset)); |
- __ sw(a0, FieldMemOperand(a3, JSStrictArgumentsObject::kLengthOffset)); |
- STATIC_ASSERT(JSStrictArgumentsObject::kSize == 4 * kPointerSize); |
- __ Ret(USE_DELAY_SLOT); |
- __ mov(v0, a3); // In delay slot |
- |
- // Fall back to %AllocateInNewSpace (if not too big). |
- Label too_big_for_new_space; |
- __ bind(&allocate); |
- __ Branch(&too_big_for_new_space, gt, t0, Operand(kMaxRegularHeapObjectSize)); |
- { |
- FrameScope scope(masm, StackFrame::INTERNAL); |
- __ SmiTag(t0); |
- __ Push(a0, a2, t0); |
- __ CallRuntime(Runtime::kAllocateInNewSpace); |
- __ Pop(a0, a2); |
- } |
- __ jmp(&done_allocate); |
- |
- // Fall back to %NewStrictArguments. |
- __ bind(&too_big_for_new_space); |
- __ Push(a1); |
- __ TailCallRuntime(Runtime::kNewStrictArguments); |
-} |
- |
- |
static int AddressOffset(ExternalReference ref0, ExternalReference ref1) { |
return ref0.address() - ref1.address(); |
} |