};
-class ArgumentsAdaptorFrameConstants : public AllStatic {
- public:
- // FP-relative.
- static const int kLengthOffset = StandardFrameConstants::kExpressionsOffset;
-
- static const int kFrameSize =
- StandardFrameConstants::kFixedFrameSize + kPointerSize;
-};
-
-
-class ConstructFrameConstants : public AllStatic {
- public:
- // FP-relative.
- static const int kImplicitReceiverOffset = -5 * kPointerSize;
- static const int kLengthOffset = -4 * kPointerSize;
- static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;
-
- static const int kFrameSize =
- StandardFrameConstants::kFixedFrameSize + 3 * kPointerSize;
-};
-
-
-class InternalFrameConstants : public AllStatic {
- public:
- // FP-relative.
- static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;
-};
-
-
inline Object* JavaScriptFrame::function_slot_object() const {
const int offset = JavaScriptFrameConstants::kFunctionOffset;
return Memory::Object_at(fp() + offset);
Label non_construct_frame, done;
__ b(ne, &non_construct_frame);
- __ ldr(r0, MemOperand(r2, StandardFrameConstants::kExpressionsOffset -
- 2 * kPointerSize));
+ __ ldr(r0,
+ MemOperand(r2, ConstructFrameConstants::kOriginalConstructorOffset));
__ b(&done);
__ bind(&non_construct_frame);
};
-class ArgumentsAdaptorFrameConstants : public AllStatic {
- public:
- // FP-relative.
- static const int kLengthOffset = StandardFrameConstants::kExpressionsOffset;
-
- static const int kFrameSize =
- StandardFrameConstants::kFixedFrameSize + kPointerSize;
-};
-
-
-class ConstructFrameConstants : public AllStatic {
- public:
- // FP-relative.
- static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;
- static const int kLengthOffset = -4 * kPointerSize;
- static const int kImplicitReceiverOffset = -5 * kPointerSize;
-
- static const int kFrameSize =
- StandardFrameConstants::kFixedFrameSize + 3 * kPointerSize;
-};
-
-
-class InternalFrameConstants : public AllStatic {
- public:
- // FP-relative.
- static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;
-};
-
-
inline Object* JavaScriptFrame::function_slot_object() const {
const int offset = JavaScriptFrameConstants::kFunctionOffset;
return Memory::Object_at(fp() + offset);
Label non_construct_frame, done;
__ B(ne, &non_construct_frame);
- __ Ldr(x0, MemOperand(x2, StandardFrameConstants::kExpressionsOffset -
- 2 * kPointerSize));
+ __ Ldr(x0,
+ MemOperand(x2, ConstructFrameConstants::kOriginalConstructorOffset));
__ B(&done);
__ Bind(&non_construct_frame);
fp = Memory::Address_at(fp + StandardFrameConstants::kCallerFPOffset);
}
DCHECK(IsConstructFrame(fp));
+ STATIC_ASSERT(ConstructFrameConstants::kOriginalConstructorOffset ==
+ StandardFrameConstants::kExpressionsOffset - 2 * kPointerSize);
return GetExpression(fp, 2);
}
int JavaScriptFrame::GetArgumentsLength() const {
// If there is an arguments adaptor frame get the arguments length from it.
if (has_adapted_arguments()) {
+ STATIC_ASSERT(ArgumentsAdaptorFrameConstants::kLengthOffset ==
+ StandardFrameConstants::kExpressionsOffset);
return Smi::cast(GetExpression(caller_fp(), 0))->value();
} else {
return GetNumberOfIncomingArguments();
};
+class ArgumentsAdaptorFrameConstants : public AllStatic {
+ public:
+ // FP-relative.
+ static const int kLengthOffset = StandardFrameConstants::kExpressionsOffset;
+
+ static const int kFrameSize =
+ StandardFrameConstants::kFixedFrameSize + kPointerSize;
+};
+
+
+class InternalFrameConstants : public AllStatic {
+ public:
+ // FP-relative.
+ static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;
+};
+
+
+class ConstructFrameConstants : public AllStatic {
+ public:
+ // FP-relative.
+ static const int kImplicitReceiverOffset =
+ StandardFrameConstants::kExpressionsOffset - 2 * kPointerSize;
+ static const int kOriginalConstructorOffset =
+ StandardFrameConstants::kExpressionsOffset - 2 * kPointerSize;
+ static const int kLengthOffset =
+ StandardFrameConstants::kExpressionsOffset - 1 * kPointerSize;
+ static const int kCodeOffset =
+ StandardFrameConstants::kExpressionsOffset - 0 * kPointerSize;
+
+ static const int kFrameSize =
+ StandardFrameConstants::kFixedFrameSize + 3 * kPointerSize;
+};
+
+
// Abstract base class for all stack frames.
class StackFrame BASE_EMBEDDED {
public:
};
-class ArgumentsAdaptorFrameConstants : public AllStatic {
- public:
- // FP-relative.
- static const int kLengthOffset = StandardFrameConstants::kExpressionsOffset;
-
- static const int kFrameSize =
- StandardFrameConstants::kFixedFrameSize + kPointerSize;
-};
-
-
-class ConstructFrameConstants : public AllStatic {
- public:
- // FP-relative.
- static const int kImplicitReceiverOffset = -5 * kPointerSize;
- static const int kLengthOffset = -4 * kPointerSize;
- static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;
-
- static const int kFrameSize =
- StandardFrameConstants::kFixedFrameSize + 3 * kPointerSize;
-};
-
-
-class InternalFrameConstants : public AllStatic {
- public:
- // FP-relative.
- static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;
-};
-
-
inline Object* JavaScriptFrame::function_slot_object() const {
const int offset = JavaScriptFrameConstants::kFunctionOffset;
return Memory::Object_at(fp() + offset);
__ j(not_equal, &non_construct_frame);
// Construct frame
- __ mov(eax, Operand(eax, StandardFrameConstants::kExpressionsOffset -
- 2 * kPointerSize));
+ __ mov(eax,
+ Operand(eax, ConstructFrameConstants::kOriginalConstructorOffset));
__ jmp(&done);
// Non-construct frame
};
-class ArgumentsAdaptorFrameConstants : public AllStatic {
- public:
- // FP-relative.
- static const int kLengthOffset = StandardFrameConstants::kExpressionsOffset;
-
- static const int kFrameSize =
- StandardFrameConstants::kFixedFrameSize + kPointerSize;
-};
-
-
-class ConstructFrameConstants : public AllStatic {
- public:
- // FP-relative.
- static const int kImplicitReceiverOffset = -5 * kPointerSize;
- static const int kLengthOffset = -4 * kPointerSize;
- static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;
-
- static const int kFrameSize =
- StandardFrameConstants::kFixedFrameSize + 3 * kPointerSize;
-};
-
-
-class InternalFrameConstants : public AllStatic {
- public:
- // FP-relative.
- static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;
-};
-
-
inline Object* JavaScriptFrame::function_slot_object() const {
const int offset = JavaScriptFrameConstants::kFunctionOffset;
return Memory::Object_at(fp() + offset);
__ Branch(&non_construct_frame, ne, a1,
Operand(Smi::FromInt(StackFrame::CONSTRUCT)));
- __ lw(v0, MemOperand(a2, StandardFrameConstants::kExpressionsOffset -
- 2 * kPointerSize));
+ __ lw(v0,
+ MemOperand(a2, ConstructFrameConstants::kOriginalConstructorOffset));
__ Branch(&done);
__ bind(&non_construct_frame);
};
-class ArgumentsAdaptorFrameConstants : public AllStatic {
- public:
- // FP-relative.
- static const int kLengthOffset = StandardFrameConstants::kExpressionsOffset;
-
- static const int kFrameSize =
- StandardFrameConstants::kFixedFrameSize + kPointerSize;
-};
-
-
-class ConstructFrameConstants : public AllStatic {
- public:
- // FP-relative.
- static const int kImplicitReceiverOffset = -5 * kPointerSize;
- static const int kLengthOffset = -4 * kPointerSize;
- static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;
-
- static const int kFrameSize =
- StandardFrameConstants::kFixedFrameSize + 3 * kPointerSize;
-};
-
-
-class InternalFrameConstants : public AllStatic {
- public:
- // FP-relative.
- static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;
-};
-
-
inline Object* JavaScriptFrame::function_slot_object() const {
const int offset = JavaScriptFrameConstants::kFunctionOffset;
return Memory::Object_at(fp() + offset);
__ Branch(&non_construct_frame, ne, a1,
Operand(Smi::FromInt(StackFrame::CONSTRUCT)));
- __ ld(v0, MemOperand(a2, StandardFrameConstants::kExpressionsOffset -
- 2 * kPointerSize));
+ __ ld(v0,
+ MemOperand(a2, ConstructFrameConstants::kOriginalConstructorOffset));
__ Branch(&done);
__ bind(&non_construct_frame);
};
-class ArgumentsAdaptorFrameConstants : public AllStatic {
- public:
- // FP-relative.
- static const int kLengthOffset = StandardFrameConstants::kExpressionsOffset;
-
- static const int kFrameSize =
- StandardFrameConstants::kFixedFrameSize + kPointerSize;
-};
-
-
-class ConstructFrameConstants : public AllStatic {
- public:
- // FP-relative.
- static const int kImplicitReceiverOffset = -5 * kPointerSize;
- static const int kLengthOffset = -4 * kPointerSize;
- static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;
-
- static const int kFrameSize =
- StandardFrameConstants::kFixedFrameSize + 3 * kPointerSize;
-};
-
-
-class InternalFrameConstants : public AllStatic {
- public:
- // FP-relative.
- static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;
-};
-
-
inline Object* JavaScriptFrame::function_slot_object() const {
const int offset = JavaScriptFrameConstants::kFunctionOffset;
return Memory::Object_at(fp() + offset);
Label non_construct_frame, done;
__ bne(&non_construct_frame);
- __ LoadP(r3, MemOperand(r5, StandardFrameConstants::kExpressionsOffset -
- 2 * kPointerSize));
+ __ LoadP(r3, MemOperand(
+ r5, ConstructFrameConstants::kOriginalConstructorOffset));
__ b(&done);
__ bind(&non_construct_frame);
};
-class ArgumentsAdaptorFrameConstants : public AllStatic {
- public:
- // FP-relative.
- static const int kLengthOffset = StandardFrameConstants::kExpressionsOffset;
-
- static const int kFrameSize =
- StandardFrameConstants::kFixedFrameSize + kPointerSize;
-};
-
-
-class ConstructFrameConstants : public AllStatic {
- public:
- // FP-relative.
- static const int kImplicitReceiverOffset = -5 * kPointerSize;
- static const int kLengthOffset = -4 * kPointerSize;
- static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;
-
- static const int kFrameSize =
- StandardFrameConstants::kFixedFrameSize + 3 * kPointerSize;
-};
-
-
-class InternalFrameConstants : public AllStatic {
- public:
- // FP-relative.
- static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;
-};
-
-
inline Object* JavaScriptFrame::function_slot_object() const {
const int offset = JavaScriptFrameConstants::kFunctionOffset;
return Memory::Object_at(fp() + offset);
__ j(not_equal, &non_construct_frame);
// Construct frame
- __ movp(rax, Operand(rax, StandardFrameConstants::kExpressionsOffset -
- 2 * kPointerSize));
+ __ movp(rax,
+ Operand(rax, ConstructFrameConstants::kOriginalConstructorOffset));
__ jmp(&done);
// Non-construct frame
};
-class ArgumentsAdaptorFrameConstants : public AllStatic {
- public:
- // FP-relative.
- static const int kLengthOffset = StandardFrameConstants::kExpressionsOffset;
-
- static const int kFrameSize =
- StandardFrameConstants::kFixedFrameSize + kPointerSize;
-};
-
-
-class ConstructFrameConstants : public AllStatic {
- public:
- // FP-relative.
- static const int kImplicitReceiverOffset = -5 * kPointerSize;
- static const int kLengthOffset = -4 * kPointerSize;
- static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;
-
- static const int kFrameSize =
- StandardFrameConstants::kFixedFrameSize + 3 * kPointerSize;
-};
-
-
-class InternalFrameConstants : public AllStatic {
- public:
- // FP-relative.
- static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset;
-};
-
-
inline Object* JavaScriptFrame::function_slot_object() const {
const int offset = JavaScriptFrameConstants::kFunctionOffset;
return Memory::Object_at(fp() + offset);
__ j(not_equal, &non_construct_frame);
// Construct frame
- __ mov(eax, Operand(eax, StandardFrameConstants::kExpressionsOffset -
- 2 * kPointerSize));
+ __ mov(eax,
+ Operand(eax, ConstructFrameConstants::kOriginalConstructorOffset));
__ jmp(&done);
// Non-construct frame