__ bind(&count_incremented);
}
+ __ pop(r1); // Constructor function.
+
__ push(r4);
__ push(r4);
- // Reload the number of arguments and the constructor from the stack.
+ // Reload the number of arguments from the stack.
// sp[0]: receiver
// sp[1]: receiver
- // sp[2]: constructor function
- // sp[3]: number of arguments (smi-tagged)
- __ ldr(r1, MemOperand(sp, 2 * kPointerSize));
- __ ldr(r3, MemOperand(sp, 3 * kPointerSize));
+ // sp[2]: number of arguments (smi-tagged)
+ __ ldr(r3, MemOperand(sp, 2 * kPointerSize));
// Set up pointer to last argument.
__ add(r2, fp, Operand(StandardFrameConstants::kCallerSPOffset));
// r3: number of arguments (smi-tagged)
// sp[0]: receiver
// sp[1]: receiver
- // sp[2]: constructor function
- // sp[3]: number of arguments (smi-tagged)
+ // sp[2]: number of arguments (smi-tagged)
Label loop, entry;
__ b(&entry);
__ bind(&loop);
// Restore context from the frame.
// r0: result
// sp[0]: receiver
- // sp[1]: constructor function
- // sp[2]: number of arguments (smi-tagged)
+ // sp[1]: number of arguments (smi-tagged)
__ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
// If the result is an object (in the ECMA sense), we should get rid
// If the result is a smi, it is *not* an object in the ECMA sense.
// r0: result
// sp[0]: receiver (newly allocated object)
- // sp[1]: constructor function
- // sp[2]: number of arguments (smi-tagged)
+ // sp[1]: number of arguments (smi-tagged)
__ JumpIfSmi(r0, &use_receiver);
// If the type of the result (stored in its map) is less than
__ bind(&exit);
// r0: result
// sp[0]: receiver (newly allocated object)
- // sp[1]: constructor function
- // sp[2]: number of arguments (smi-tagged)
- __ ldr(r1, MemOperand(sp, 2 * kPointerSize));
+ // sp[1]: number of arguments (smi-tagged)
+ __ ldr(r1, MemOperand(sp, kPointerSize));
// Leave construct frame.
}
class ConstructFrameConstants : public AllStatic {
public:
// FP-relative.
- static const int kImplicitReceiverOffset = -6 * kPointerSize;
- static const int kConstructorOffset = -5 * kPointerSize;
+ static const int kImplicitReceiverOffset = -5 * kPointerSize;
static const int kLengthOffset = -4 * kPointerSize;
static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;
static const int kFrameSize =
- StandardFrameConstants::kFixedFrameSize + 4 * kPointerSize;
+ StandardFrameConstants::kFixedFrameSize + 3 * kPointerSize;
};
__ bind(&count_incremented);
}
+ __ Pop(constructor);
+
__ Push(x4, x4);
// Reload the number of arguments from the stack.
// Set it up in x0 for the function call below.
// jssp[0]: receiver
// jssp[1]: receiver
- // jssp[2]: constructor function
- // jssp[3]: number of arguments (smi-tagged)
- __ Peek(constructor, 2 * kXRegSize); // Load constructor.
- __ Peek(argc, 3 * kXRegSize); // Load number of arguments.
+ // jssp[2]: number of arguments (smi-tagged)
+ __ Peek(argc, 2 * kXRegSize); // Load number of arguments.
__ SmiUntag(argc);
// Set up pointer to last argument.
// x2: address of last argument (caller sp)
// jssp[0]: receiver
// jssp[1]: receiver
- // jssp[2]: constructor function
- // jssp[3]: number of arguments (smi-tagged)
+ // jssp[2]: number of arguments (smi-tagged)
// Compute the start address of the copy in x3.
__ Add(x3, x2, Operand(argc, LSL, kPointerSizeLog2));
Label loop, entry, done_copying_arguments;
// Restore the context from the frame.
// x0: result
// jssp[0]: receiver
- // jssp[1]: constructor function
- // jssp[2]: number of arguments (smi-tagged)
+ // jssp[1]: number of arguments (smi-tagged)
__ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
// If the result is an object (in the ECMA sense), we should get rid
// If the result is a smi, it is *not* an object in the ECMA sense.
// x0: result
// jssp[0]: receiver (newly allocated object)
- // jssp[1]: constructor function
- // jssp[2]: number of arguments (smi-tagged)
+ // jssp[1]: number of arguments (smi-tagged)
__ JumpIfSmi(x0, &use_receiver);
// If the type of the result (stored in its map) is less than
__ Bind(&exit);
// x0: result
// jssp[0]: receiver (newly allocated object)
- // jssp[1]: constructor function
- // jssp[2]: number of arguments (smi-tagged)
- __ Peek(x1, 2 * kXRegSize);
+ // jssp[1]: number of arguments (smi-tagged)
+ __ Peek(x1, kXRegSize);
// Leave construct frame.
}
// FP-relative.
static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;
static const int kLengthOffset = -4 * kPointerSize;
- static const int kConstructorOffset = -5 * kPointerSize;
- static const int kImplicitReceiverOffset = -6 * kPointerSize;
+ static const int kImplicitReceiverOffset = -5 * kPointerSize;
static const int kFrameSize =
- StandardFrameConstants::kFixedFrameSize + 4 * kPointerSize;
+ StandardFrameConstants::kFixedFrameSize + 3 * kPointerSize;
};
PrintF(trace_scope_->file(), "(%d)\n", height - 1);
}
- // Constructor function being invoked by the stub (only present on some
- // architectures, indicated by kConstructorOffset).
- if (ConstructFrameConstants::kConstructorOffset != kMinInt) {
- output_offset -= kPointerSize;
- WriteValueToOutput(function, 0, frame_index, output_offset,
- "constructor function ");
- }
-
// The newly allocated object was passed as receiver in the artificial
// constructor stub environment created by HEnvironment::CopyForInlining().
output_offset -= kPointerSize;
public:
// FP-relative.
static const int kImplicitReceiverOffset = -5 * kPointerSize;
- static const int kConstructorOffset = kMinInt;
static const int kLengthOffset = -4 * kPointerSize;
static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;
__ bind(&count_incremented);
}
+ __ Pop(a1);
+
__ Push(t4, t4);
// Reload the number of arguments from the stack.
// sp[0]: receiver
// sp[1]: receiver
- // sp[2]: constructor function
- // sp[3]: number of arguments (smi-tagged)
- __ lw(a1, MemOperand(sp, 2 * kPointerSize));
- __ lw(a3, MemOperand(sp, 3 * kPointerSize));
+ // sp[2]: number of arguments (smi-tagged)
+ __ lw(a3, MemOperand(sp, 2 * kPointerSize));
// Set up pointer to last argument.
__ Addu(a2, fp, Operand(StandardFrameConstants::kCallerSPOffset));
// a3: number of arguments (smi-tagged)
// sp[0]: receiver
// sp[1]: receiver
- // sp[2]: constructor function
- // sp[3]: number of arguments (smi-tagged)
+ // sp[2]: number of arguments (smi-tagged)
Label loop, entry;
__ jmp(&entry);
__ bind(&loop);
// If the result is a smi, it is *not* an object in the ECMA sense.
// v0: result
// sp[0]: receiver (newly allocated object)
- // sp[1]: constructor function
- // sp[2]: number of arguments (smi-tagged)
+ // sp[1]: number of arguments (smi-tagged)
__ JumpIfSmi(v0, &use_receiver);
// If the type of the result (stored in its map) is less than
__ bind(&exit);
// v0: result
// sp[0]: receiver (newly allocated object)
- // sp[1]: constructor function
- // sp[2]: number of arguments (smi-tagged)
- __ lw(a1, MemOperand(sp, 2 * kPointerSize));
+ // sp[1]: number of arguments (smi-tagged)
+ __ lw(a1, MemOperand(sp, kPointerSize));
// Leave construct frame.
}
class ConstructFrameConstants : public AllStatic {
public:
// FP-relative.
- static const int kImplicitReceiverOffset = -6 * kPointerSize;
- static const int kConstructorOffset = -5 * kPointerSize;
+ static const int kImplicitReceiverOffset = -5 * kPointerSize;
static const int kLengthOffset = -4 * kPointerSize;
static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;
static const int kFrameSize =
- StandardFrameConstants::kFixedFrameSize + 4 * kPointerSize;
+ StandardFrameConstants::kFixedFrameSize + 3 * kPointerSize;
};
__ bind(&count_incremented);
}
+ __ Pop(a1);
+
__ Push(t0, t0);
// Reload the number of arguments from the stack.
// sp[0]: receiver
// sp[1]: receiver
- // sp[2]: constructor function
- // sp[3]: number of arguments (smi-tagged)
- __ ld(a1, MemOperand(sp, 2 * kPointerSize));
- __ ld(a3, MemOperand(sp, 3 * kPointerSize));
+ // sp[2]: number of arguments (smi-tagged)
+ __ ld(a3, MemOperand(sp, 2 * kPointerSize));
// Set up pointer to last argument.
__ Daddu(a2, fp, Operand(StandardFrameConstants::kCallerSPOffset));
// a3: number of arguments (smi-tagged)
// sp[0]: receiver
// sp[1]: receiver
- // sp[2]: constructor function
- // sp[3]: number of arguments (smi-tagged)
+ // sp[2]: number of arguments (smi-tagged)
Label loop, entry;
__ SmiUntag(a3);
__ jmp(&entry);
// If the result is a smi, it is *not* an object in the ECMA sense.
// v0: result
// sp[0]: receiver (newly allocated object)
- // sp[1]: constructor function
- // sp[2]: number of arguments (smi-tagged)
+ // sp[1]: number of arguments (smi-tagged)
__ JumpIfSmi(v0, &use_receiver);
// If the type of the result (stored in its map) is less than
__ bind(&exit);
// v0: result
// sp[0]: receiver (newly allocated object)
- // sp[1]: constructor function
- // sp[2]: number of arguments (smi-tagged)
- __ ld(a1, MemOperand(sp, 2 * kPointerSize));
+ // sp[1]: number of arguments (smi-tagged)
+ __ ld(a1, MemOperand(sp, kPointerSize));
// Leave construct frame.
}
class ConstructFrameConstants : public AllStatic {
public:
// FP-relative.
- static const int kImplicitReceiverOffset = -6 * kPointerSize;
- static const int kConstructorOffset = -5 * kPointerSize;
+ static const int kImplicitReceiverOffset = -5 * kPointerSize;
static const int kLengthOffset = -4 * kPointerSize;
static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;
static const int kFrameSize =
- StandardFrameConstants::kFixedFrameSize + 4 * kPointerSize;
+ StandardFrameConstants::kFixedFrameSize + 3 * kPointerSize;
};
__ bind(&count_incremented);
}
+ __ Pop(r4);
+
__ Push(r7, r7);
// Reload the number of arguments and the constructor from the stack.
// sp[0]: receiver
// sp[1]: receiver
- // sp[2]: constructor function
- // sp[3]: number of arguments (smi-tagged)
- __ LoadP(r4, MemOperand(sp, 2 * kPointerSize));
- __ LoadP(r6, MemOperand(sp, 3 * kPointerSize));
+ // sp[2]: number of arguments (smi-tagged)
+ __ LoadP(r6, MemOperand(sp, 2 * kPointerSize));
// Set up pointer to last argument.
__ addi(r5, fp, Operand(StandardFrameConstants::kCallerSPOffset));
// r6: number of arguments (smi-tagged)
// sp[0]: receiver
// sp[1]: receiver
- // sp[2]: constructor function
- // sp[3]: number of arguments (smi-tagged)
+ // sp[2]: number of arguments (smi-tagged)
Label loop, no_args;
__ cmpi(r3, Operand::Zero());
__ beq(&no_args);
// Restore context from the frame.
// r3: result
// sp[0]: receiver
- // sp[1]: constructor function
- // sp[2]: number of arguments (smi-tagged)
+ // sp[1]: number of arguments (smi-tagged)
__ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
// If the result is an object (in the ECMA sense), we should get rid
// If the result is a smi, it is *not* an object in the ECMA sense.
// r3: result
// sp[0]: receiver (newly allocated object)
- // sp[1]: constructor function
- // sp[2]: number of arguments (smi-tagged)
+ // sp[1]: number of arguments (smi-tagged)
__ JumpIfSmi(r3, &use_receiver);
// If the type of the result (stored in its map) is less than
__ bind(&exit);
// r3: result
// sp[0]: receiver (newly allocated object)
- // sp[1]: constructor function
- // sp[2]: number of arguments (smi-tagged)
- __ LoadP(r4, MemOperand(sp, 2 * kPointerSize));
+ // sp[1]: number of arguments (smi-tagged)
+ __ LoadP(r4, MemOperand(sp, kPointerSize));
// Leave construct frame.
}
class ConstructFrameConstants : public AllStatic {
public:
// FP-relative.
- static const int kImplicitReceiverOffset = -6 * kPointerSize;
- static const int kConstructorOffset = -5 * kPointerSize;
+ static const int kImplicitReceiverOffset = -5 * kPointerSize;
static const int kLengthOffset = -4 * kPointerSize;
static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;
static const int kFrameSize =
- StandardFrameConstants::kFixedFrameSize + 4 * kPointerSize;
+ StandardFrameConstants::kFixedFrameSize + 3 * kPointerSize;
};
public:
// FP-relative.
static const int kImplicitReceiverOffset = -5 * kPointerSize;
- static const int kConstructorOffset = kMinInt;
static const int kLengthOffset = -4 * kPointerSize;
static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;