Commit 40f34541 authored by rmcilroy's avatar rmcilroy Committed by Commit bot

[Interpreter] Fix incorrect frame walking in arguments create stubs

The previous approach taken by FastNew[Sloppy,Strict,Rest]ArgumentsStub
looked at the function slot in order to skip stub frames
and find the JS frame. However, stub frames do not have a
function slot (in fact their fixed frame ends one slot
before the JS frame's function slot). Therefore, if this
location in the stub frame happens to have the function
object the create arguments stubs won't skip this frame
correctly.

Replace this approach with one where the stub is
specialized to either skip a frame if required (since
there will only ever be one extra frame on Ignition
the loop approach isn't necessary).

BUG=v8:4928
LOG=N
CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_nosnap_dbg

Review-Url: https://codereview.chromium.org/1949023003
Cr-Commit-Position: refs/heads/master@{#36181}
parent 0bc5bf3a
......@@ -4639,20 +4639,20 @@ void FastNewRestParameterStub::Generate(MacroAssembler* masm) {
// -----------------------------------
__ AssertFunction(r1);
// For Ignition we need to skip all possible handler/stub frames until
// we reach the JavaScript frame for the function (similar to what the
// runtime fallback implementation does). So make r2 point to that
// JavaScript frame.
{
Label loop, loop_entry;
__ mov(r2, fp);
__ b(&loop_entry);
__ bind(&loop);
// Make r2 point to the JavaScript frame.
__ mov(r2, fp);
if (skip_stub_frame()) {
// For Ignition we need to skip the handler/stub frame to reach the
// JavaScript frame for the function.
__ ldr(r2, MemOperand(r2, StandardFrameConstants::kCallerFPOffset));
__ bind(&loop_entry);
}
if (FLAG_debug_code) {
Label ok;
__ ldr(ip, MemOperand(r2, StandardFrameConstants::kFunctionOffset));
__ cmp(ip, r1);
__ b(ne, &loop);
__ b(eq, &ok);
__ Abort(kInvalidFrameForFastNewRestArgumentsStub);
__ bind(&ok);
}
// Check if we have rest parameters (only possible if we have an
......@@ -4781,20 +4781,20 @@ void FastNewSloppyArgumentsStub::Generate(MacroAssembler* masm) {
// -----------------------------------
__ AssertFunction(r1);
// For Ignition we need to skip all possible handler/stub frames until
// we reach the JavaScript frame for the function (similar to what the
// runtime fallback implementation does). So make r9 point to that
// JavaScript frame.
{
Label loop, loop_entry;
__ mov(r9, fp);
__ b(&loop_entry);
__ bind(&loop);
// Make r9 point to the JavaScript frame.
__ mov(r9, fp);
if (skip_stub_frame()) {
// For Ignition we need to skip the handler/stub frame to reach the
// JavaScript frame for the function.
__ ldr(r9, MemOperand(r9, StandardFrameConstants::kCallerFPOffset));
__ bind(&loop_entry);
}
if (FLAG_debug_code) {
Label ok;
__ ldr(ip, MemOperand(r9, StandardFrameConstants::kFunctionOffset));
__ cmp(ip, r1);
__ b(ne, &loop);
__ b(eq, &ok);
__ Abort(kInvalidFrameForFastNewRestArgumentsStub);
__ bind(&ok);
}
// TODO(bmeurer): Cleanup to match the FastNewStrictArgumentsStub.
......@@ -5003,20 +5003,20 @@ void FastNewStrictArgumentsStub::Generate(MacroAssembler* masm) {
// -----------------------------------
__ AssertFunction(r1);
// For Ignition we need to skip all possible handler/stub frames until
// we reach the JavaScript frame for the function (similar to what the
// runtime fallback implementation does). So make r2 point to that
// JavaScript frame.
{
Label loop, loop_entry;
__ mov(r2, fp);
__ b(&loop_entry);
__ bind(&loop);
// Make r2 point to the JavaScript frame.
__ mov(r2, fp);
if (skip_stub_frame()) {
// For Ignition we need to skip the handler/stub frame to reach the
// JavaScript frame for the function.
__ ldr(r2, MemOperand(r2, StandardFrameConstants::kCallerFPOffset));
__ bind(&loop_entry);
}
if (FLAG_debug_code) {
Label ok;
__ ldr(ip, MemOperand(r2, StandardFrameConstants::kFunctionOffset));
__ cmp(ip, r1);
__ b(ne, &loop);
__ b(eq, &ok);
__ Abort(kInvalidFrameForFastNewRestArgumentsStub);
__ bind(&ok);
}
// Check if we have an arguments adaptor frame below the function frame.
......
......@@ -4911,20 +4911,20 @@ void FastNewRestParameterStub::Generate(MacroAssembler* masm) {
// -----------------------------------
__ AssertFunction(x1);
// For Ignition we need to skip all possible handler/stub frames until
// we reach the JavaScript frame for the function (similar to what the
// runtime fallback implementation does). So make x2 point to that
// JavaScript frame.
{
Label loop, loop_entry;
__ Mov(x2, fp);
__ B(&loop_entry);
__ Bind(&loop);
// Make x2 point to the JavaScript frame.
__ Mov(x2, fp);
if (skip_stub_frame()) {
// For Ignition we need to skip the handler/stub frame to reach the
// JavaScript frame for the function.
__ Ldr(x2, MemOperand(x2, StandardFrameConstants::kCallerFPOffset));
__ Bind(&loop_entry);
}
if (FLAG_debug_code) {
Label ok;
__ Ldr(x3, MemOperand(x2, StandardFrameConstants::kFunctionOffset));
__ Cmp(x3, x1);
__ B(ne, &loop);
__ B(eq, &ok);
__ Abort(kInvalidFrameForFastNewRestArgumentsStub);
__ Bind(&ok);
}
// Check if we have rest parameters (only possible if we have an
......@@ -5058,20 +5058,20 @@ void FastNewSloppyArgumentsStub::Generate(MacroAssembler* masm) {
// -----------------------------------
__ AssertFunction(x1);
// For Ignition we need to skip all possible handler/stub frames until
// we reach the JavaScript frame for the function (similar to what the
// runtime fallback implementation does). So make x6 point to that
// JavaScript frame.
{
Label loop, loop_entry;
__ Mov(x6, fp);
__ B(&loop_entry);
__ Bind(&loop);
// Make x6 point to the JavaScript frame.
__ Mov(x6, fp);
if (skip_stub_frame()) {
// For Ignition we need to skip the handler/stub frame to reach the
// JavaScript frame for the function.
__ Ldr(x6, MemOperand(x6, StandardFrameConstants::kCallerFPOffset));
__ Bind(&loop_entry);
}
if (FLAG_debug_code) {
Label ok;
__ Ldr(x3, MemOperand(x6, StandardFrameConstants::kFunctionOffset));
__ Cmp(x3, x1);
__ B(ne, &loop);
__ B(eq, &ok);
__ Abort(kInvalidFrameForFastNewRestArgumentsStub);
__ Bind(&ok);
}
// TODO(bmeurer): Cleanup to match the FastNewStrictArgumentsStub.
......@@ -5358,20 +5358,20 @@ void FastNewStrictArgumentsStub::Generate(MacroAssembler* masm) {
// -----------------------------------
__ AssertFunction(x1);
// For Ignition we need to skip all possible handler/stub frames until
// we reach the JavaScript frame for the function (similar to what the
// runtime fallback implementation does). So make x2 point to that
// JavaScript frame.
{
Label loop, loop_entry;
__ Mov(x2, fp);
__ B(&loop_entry);
__ Bind(&loop);
// Make x2 point to the JavaScript frame.
__ Mov(x2, fp);
if (skip_stub_frame()) {
// For Ignition we need to skip the handler/stub frame to reach the
// JavaScript frame for the function.
__ Ldr(x2, MemOperand(x2, StandardFrameConstants::kCallerFPOffset));
__ Bind(&loop_entry);
}
if (FLAG_debug_code) {
Label ok;
__ Ldr(x3, MemOperand(x2, StandardFrameConstants::kFunctionOffset));
__ Cmp(x3, x1);
__ B(ne, &loop);
__ B(eq, &ok);
__ Abort(kInvalidFrameForFastNewRestArgumentsStub);
__ Bind(&ok);
}
// Check if we have an arguments adaptor frame below the function frame.
......
......@@ -105,6 +105,12 @@ namespace internal {
V(kInvalidCaptureReferenced, "Invalid capture referenced") \
V(kInvalidElementsKindForInternalArrayOrInternalPackedArray, \
"Invalid ElementsKind for InternalArray or InternalPackedArray") \
V(kInvalidFrameForFastNewRestArgumentsStub, \
"Invalid frame for FastNewRestArgumentsStub") \
V(kInvalidFrameForFastNewSloppyArgumentsStub, \
"Invalid frame for FastNewSloppyArgumentsStub") \
V(kInvalidFrameForFastNewStrictArgumentsStub, \
"Invalid frame for FastNewStrictArgumentsStub") \
V(kInvalidFullCodegenState, "invalid full-codegen state") \
V(kInvalidHandleScopeLevel, "Invalid HandleScope level") \
V(kInvalidLeftHandSideInAssignment, "Invalid left-hand side in assignment") \
......
......@@ -473,22 +473,25 @@ Callable CodeFactory::FastNewObject(Isolate* isolate) {
// static
Callable CodeFactory::FastNewRestParameter(Isolate* isolate) {
FastNewRestParameterStub stub(isolate);
Callable CodeFactory::FastNewRestParameter(Isolate* isolate,
bool skip_stub_frame) {
FastNewRestParameterStub stub(isolate, skip_stub_frame);
return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor());
}
// static
Callable CodeFactory::FastNewSloppyArguments(Isolate* isolate) {
FastNewSloppyArgumentsStub stub(isolate);
Callable CodeFactory::FastNewSloppyArguments(Isolate* isolate,
bool skip_stub_frame) {
FastNewSloppyArgumentsStub stub(isolate, skip_stub_frame);
return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor());
}
// static
Callable CodeFactory::FastNewStrictArguments(Isolate* isolate) {
FastNewStrictArgumentsStub stub(isolate);
Callable CodeFactory::FastNewStrictArguments(Isolate* isolate,
bool skip_stub_frame) {
FastNewStrictArgumentsStub stub(isolate, skip_stub_frame);
return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor());
}
......
......@@ -125,9 +125,12 @@ class CodeFactory final {
static Callable FastNewClosure(Isolate* isolate, LanguageMode language_mode,
FunctionKind kind);
static Callable FastNewObject(Isolate* isolate);
static Callable FastNewRestParameter(Isolate* isolate);
static Callable FastNewSloppyArguments(Isolate* isolate);
static Callable FastNewStrictArguments(Isolate* isolate);
static Callable FastNewRestParameter(Isolate* isolate,
bool skip_stub_frame = false);
static Callable FastNewSloppyArguments(Isolate* isolate,
bool skip_stub_frame = false);
static Callable FastNewStrictArguments(Isolate* isolate,
bool skip_stub_frame = false);
static Callable AllocateHeapNumber(Isolate* isolate);
#define SIMD128_ALLOC(TYPE, Type, type, lane_count, lane_type) \
......
......@@ -1067,11 +1067,19 @@ class FastNewObjectStub final : public PlatformCodeStub {
// of the strict arguments object materialization code.
class FastNewRestParameterStub final : public PlatformCodeStub {
public:
explicit FastNewRestParameterStub(Isolate* isolate)
: PlatformCodeStub(isolate) {}
explicit FastNewRestParameterStub(Isolate* isolate,
bool skip_stub_frame = false)
: PlatformCodeStub(isolate) {
minor_key_ = SkipStubFrameBits::encode(skip_stub_frame);
}
DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewRestParameter);
DEFINE_PLATFORM_CODE_STUB(FastNewRestParameter, PlatformCodeStub);
int skip_stub_frame() const { return SkipStubFrameBits::decode(minor_key_); }
private:
class SkipStubFrameBits : public BitField<bool, 0, 1> {};
};
......@@ -1080,11 +1088,19 @@ class FastNewRestParameterStub final : public PlatformCodeStub {
// and easy as the current handwritten version.
class FastNewSloppyArgumentsStub final : public PlatformCodeStub {
public:
explicit FastNewSloppyArgumentsStub(Isolate* isolate)
: PlatformCodeStub(isolate) {}
explicit FastNewSloppyArgumentsStub(Isolate* isolate,
bool skip_stub_frame = false)
: PlatformCodeStub(isolate) {
minor_key_ = SkipStubFrameBits::encode(skip_stub_frame);
}
int skip_stub_frame() const { return SkipStubFrameBits::decode(minor_key_); }
DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewSloppyArguments);
DEFINE_PLATFORM_CODE_STUB(FastNewSloppyArguments, PlatformCodeStub);
private:
class SkipStubFrameBits : public BitField<bool, 0, 1> {};
};
......@@ -1093,11 +1109,19 @@ class FastNewSloppyArgumentsStub final : public PlatformCodeStub {
// and easy as the current handwritten version.
class FastNewStrictArgumentsStub final : public PlatformCodeStub {
public:
explicit FastNewStrictArgumentsStub(Isolate* isolate)
: PlatformCodeStub(isolate) {}
explicit FastNewStrictArgumentsStub(Isolate* isolate,
bool skip_stub_frame = false)
: PlatformCodeStub(isolate) {
minor_key_ = SkipStubFrameBits::encode(skip_stub_frame);
}
DEFINE_CALL_INTERFACE_DESCRIPTOR(FastNewStrictArguments);
DEFINE_PLATFORM_CODE_STUB(FastNewStrictArguments, PlatformCodeStub);
int skip_stub_frame() const { return SkipStubFrameBits::decode(minor_key_); }
private:
class SkipStubFrameBits : public BitField<bool, 0, 1> {};
};
......
......@@ -4807,19 +4807,19 @@ void FastNewRestParameterStub::Generate(MacroAssembler* masm) {
// -----------------------------------
__ AssertFunction(edi);
// For Ignition we need to skip all possible handler/stub frames until
// we reach the JavaScript frame for the function (similar to what the
// runtime fallback implementation does). So make edx point to that
// JavaScript frame.
{
Label loop, loop_entry;
__ mov(edx, ebp);
__ jmp(&loop_entry, Label::kNear);
__ bind(&loop);
// Make edx point to the JavaScript frame.
__ mov(edx, ebp);
if (skip_stub_frame()) {
// For Ignition we need to skip the handler/stub frame to reach the
// JavaScript frame for the function.
__ mov(edx, Operand(edx, StandardFrameConstants::kCallerFPOffset));
__ bind(&loop_entry);
}
if (FLAG_debug_code) {
Label ok;
__ cmp(edi, Operand(edx, StandardFrameConstants::kFunctionOffset));
__ j(not_equal, &loop);
__ j(equal, &ok);
__ Abort(kInvalidFrameForFastNewRestArgumentsStub);
__ bind(&ok);
}
// Check if we have rest parameters (only possible if we have an
......@@ -4954,19 +4954,19 @@ void FastNewSloppyArgumentsStub::Generate(MacroAssembler* masm) {
// -----------------------------------
__ AssertFunction(edi);
// For Ignition we need to skip all possible handler/stub frames until
// we reach the JavaScript frame for the function (similar to what the
// runtime fallback implementation does). So make ebx point to that
// JavaScript frame.
{
Label loop, loop_entry;
__ mov(ecx, ebp);
__ jmp(&loop_entry, Label::kNear);
__ bind(&loop);
// Make ecx point to the JavaScript frame.
__ mov(ecx, ebp);
if (skip_stub_frame()) {
// For Ignition we need to skip the handler/stub frame to reach the
// JavaScript frame for the function.
__ mov(ecx, Operand(ecx, StandardFrameConstants::kCallerFPOffset));
__ bind(&loop_entry);
}
if (FLAG_debug_code) {
Label ok;
__ cmp(edi, Operand(ecx, StandardFrameConstants::kFunctionOffset));
__ j(not_equal, &loop);
__ j(equal, &ok);
__ Abort(kInvalidFrameForFastNewSloppyArgumentsStub);
__ bind(&ok);
}
// TODO(bmeurer): Cleanup to match the FastNewStrictArgumentsStub.
......@@ -5210,19 +5210,19 @@ void FastNewStrictArgumentsStub::Generate(MacroAssembler* masm) {
// -----------------------------------
__ AssertFunction(edi);
// For Ignition we need to skip all possible handler/stub frames until
// we reach the JavaScript frame for the function (similar to what the
// runtime fallback implementation does). So make edx point to that
// JavaScript frame.
{
Label loop, loop_entry;
__ mov(edx, ebp);
__ jmp(&loop_entry, Label::kNear);
__ bind(&loop);
// Make edx point to the JavaScript frame.
__ mov(edx, ebp);
if (skip_stub_frame()) {
// For Ignition we need to skip the handler/stub frame to reach the
// JavaScript frame for the function.
__ mov(edx, Operand(edx, StandardFrameConstants::kCallerFPOffset));
__ bind(&loop_entry);
}
if (FLAG_debug_code) {
Label ok;
__ cmp(edi, Operand(edx, StandardFrameConstants::kFunctionOffset));
__ j(not_equal, &loop);
__ j(equal, &ok);
__ Abort(kInvalidFrameForFastNewStrictArgumentsStub);
__ bind(&ok);
}
// Check if we have an arguments adaptor frame below the function frame.
......
......@@ -1514,7 +1514,7 @@ void Interpreter::DoCreateMappedArguments(InterpreterAssembler* assembler) {
Node* context = __ GetContext();
Variable result(assembler, MachineRepresentation::kTagged);
Label end(assembler), if_duplicate_parameters(assembler),
Label end(assembler), if_duplicate_parameters(assembler, Label::kDeferred),
if_not_duplicate_parameters(assembler);
// Check if function has duplicate parameters.
......@@ -1539,7 +1539,7 @@ void Interpreter::DoCreateMappedArguments(InterpreterAssembler* assembler) {
__ Bind(&if_not_duplicate_parameters);
{
Callable callable = CodeFactory::FastNewSloppyArguments(isolate_);
Callable callable = CodeFactory::FastNewSloppyArguments(isolate_, true);
Node* target = __ HeapConstant(callable.code());
result.Bind(__ CallStub(callable.descriptor(), target, context, closure));
__ Goto(&end);
......@@ -1554,7 +1554,7 @@ void Interpreter::DoCreateMappedArguments(InterpreterAssembler* assembler) {
//
// Creates a new unmapped arguments object.
void Interpreter::DoCreateUnmappedArguments(InterpreterAssembler* assembler) {
Callable callable = CodeFactory::FastNewStrictArguments(isolate_);
Callable callable = CodeFactory::FastNewStrictArguments(isolate_, true);
Node* target = __ HeapConstant(callable.code());
Node* context = __ GetContext();
Node* closure = __ LoadRegister(Register::function_closure());
......@@ -1567,7 +1567,7 @@ void Interpreter::DoCreateUnmappedArguments(InterpreterAssembler* assembler) {
//
// Creates a new rest parameter array.
void Interpreter::DoCreateRestParameter(InterpreterAssembler* assembler) {
Callable callable = CodeFactory::FastNewRestParameter(isolate_);
Callable callable = CodeFactory::FastNewRestParameter(isolate_, true);
Node* target = __ HeapConstant(callable.code());
Node* closure = __ LoadRegister(Register::function_closure());
Node* context = __ GetContext();
......
......@@ -4833,19 +4833,19 @@ void FastNewRestParameterStub::Generate(MacroAssembler* masm) {
// -----------------------------------
__ AssertFunction(a1);
// For Ignition we need to skip all possible handler/stub frames until
// we reach the JavaScript frame for the function (similar to what the
// runtime fallback implementation does). So make a2 point to that
// JavaScript frame.
{
Label loop, loop_entry;
__ Branch(USE_DELAY_SLOT, &loop_entry);
__ mov(a2, fp); // In delay slot.
__ bind(&loop);
// 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));
__ bind(&loop_entry);
}
if (FLAG_debug_code) {
Label ok;
__ lw(a3, MemOperand(a2, StandardFrameConstants::kFunctionOffset));
__ Branch(&loop, ne, a1, Operand(a3));
__ Branch(&ok, eq, a1, Operand(a3));
__ Abort(kInvalidFrameForFastNewRestArgumentsStub);
__ bind(&ok);
}
// Check if we have rest parameters (only possible if we have an
......@@ -4974,19 +4974,19 @@ void FastNewSloppyArgumentsStub::Generate(MacroAssembler* masm) {
// -----------------------------------
__ AssertFunction(a1);
// For Ignition we need to skip all possible handler/stub frames until
// we reach the JavaScript frame for the function (similar to what the
// runtime fallback implementation does). So make t0 point to that
// JavaScript frame.
{
Label loop, loop_entry;
__ Branch(USE_DELAY_SLOT, &loop_entry);
__ mov(t0, fp); // In delay slot.
__ bind(&loop);
// 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));
__ bind(&loop_entry);
}
if (FLAG_debug_code) {
Label ok;
__ lw(a3, MemOperand(t0, StandardFrameConstants::kFunctionOffset));
__ Branch(&loop, ne, a1, Operand(a3));
__ Branch(&ok, eq, a1, Operand(a3));
__ Abort(kInvalidFrameForFastNewRestArgumentsStub);
__ bind(&ok);
}
// TODO(bmeurer): Cleanup to match the FastNewStrictArgumentsStub.
......@@ -5204,19 +5204,19 @@ void FastNewStrictArgumentsStub::Generate(MacroAssembler* masm) {
// -----------------------------------
__ AssertFunction(a1);
// For Ignition we need to skip all possible handler/stub frames until
// we reach the JavaScript frame for the function (similar to what the
// runtime fallback implementation does). So make a2 point to that
// JavaScript frame.
{
Label loop, loop_entry;
__ Branch(USE_DELAY_SLOT, &loop_entry);
__ mov(a2, fp); // In delay slot.
__ bind(&loop);
// 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));
__ bind(&loop_entry);
}
if (FLAG_debug_code) {
Label ok;
__ lw(a3, MemOperand(a2, StandardFrameConstants::kFunctionOffset));
__ Branch(&loop, ne, a1, Operand(a3));
__ Branch(&ok, eq, a1, Operand(a3));
__ Abort(kInvalidFrameForFastNewRestArgumentsStub);
__ bind(&ok);
}
// Check if we have an arguments adaptor frame below the function frame.
......
......@@ -4844,19 +4844,19 @@ void FastNewRestParameterStub::Generate(MacroAssembler* masm) {
// -----------------------------------
__ AssertFunction(a1);
// For Ignition we need to skip all possible handler/stub frames until
// we reach the JavaScript frame for the function (similar to what the
// runtime fallback implementation does). So make a2 point to that
// JavaScript frame.
{
Label loop, loop_entry;
__ Branch(USE_DELAY_SLOT, &loop_entry);
__ mov(a2, fp); // In delay slot.
__ bind(&loop);
// 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.
__ ld(a2, MemOperand(a2, StandardFrameConstants::kCallerFPOffset));
__ bind(&loop_entry);
}
if (FLAG_debug_code) {
Label ok;
__ ld(a3, MemOperand(a2, StandardFrameConstants::kFunctionOffset));
__ Branch(&loop, ne, a1, Operand(a3));
__ Branch(&ok, eq, a1, Operand(a3));
__ Abort(kInvalidFrameForFastNewRestArgumentsStub);
__ bind(&ok);
}
// Check if we have rest parameters (only possible if we have an
......@@ -4990,19 +4990,19 @@ void FastNewSloppyArgumentsStub::Generate(MacroAssembler* masm) {
// -----------------------------------
__ AssertFunction(a1);
// For Ignition we need to skip all possible handler/stub frames until
// we reach the JavaScript frame for the function (similar to what the
// runtime fallback implementation does). So make t0 point to that
// JavaScript frame.
{
Label loop, loop_entry;
__ Branch(USE_DELAY_SLOT, &loop_entry);
__ mov(t0, fp); // In delay slot.
__ bind(&loop);
// 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.
__ ld(t0, MemOperand(t0, StandardFrameConstants::kCallerFPOffset));
__ bind(&loop_entry);
}
if (FLAG_debug_code) {
Label ok;
__ ld(a3, MemOperand(t0, StandardFrameConstants::kFunctionOffset));
__ Branch(&loop, ne, a1, Operand(a3));
__ Branch(&ok, eq, a1, Operand(a3));
__ Abort(kInvalidFrameForFastNewRestArgumentsStub);
__ bind(&ok);
}
// TODO(bmeurer): Cleanup to match the FastNewStrictArgumentsStub.
......@@ -5226,19 +5226,19 @@ void FastNewStrictArgumentsStub::Generate(MacroAssembler* masm) {
// -----------------------------------
__ AssertFunction(a1);
// For Ignition we need to skip all possible handler/stub frames until
// we reach the JavaScript frame for the function (similar to what the
// runtime fallback implementation does). So make a2 point to that
// JavaScript frame.
{
Label loop, loop_entry;
__ Branch(USE_DELAY_SLOT, &loop_entry);
__ mov(a2, fp); // In delay slot.
__ bind(&loop);
// 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.
__ ld(a2, MemOperand(a2, StandardFrameConstants::kCallerFPOffset));
__ bind(&loop_entry);
}
if (FLAG_debug_code) {
Label ok;
__ ld(a3, MemOperand(a2, StandardFrameConstants::kFunctionOffset));
__ Branch(&loop, ne, a1, Operand(a3));
__ Branch(&ok, eq, a1, Operand(a3));
__ Abort(kInvalidFrameForFastNewRestArgumentsStub);
__ bind(&ok);
}
// Check if we have an arguments adaptor frame below the function frame.
......
......@@ -4538,19 +4538,19 @@ void FastNewRestParameterStub::Generate(MacroAssembler* masm) {
// -----------------------------------
__ AssertFunction(rdi);
// For Ignition we need to skip all possible handler/stub frames until
// we reach the JavaScript frame for the function (similar to what the
// runtime fallback implementation does). So make rdx point to that
// JavaScript frame.
{
Label loop, loop_entry;
__ movp(rdx, rbp);
__ jmp(&loop_entry, Label::kNear);
__ bind(&loop);
// Make rdx point to the JavaScript frame.
__ movp(rdx, rbp);
if (skip_stub_frame()) {
// For Ignition we need to skip the handler/stub frame to reach the
// JavaScript frame for the function.
__ movp(rdx, Operand(rdx, StandardFrameConstants::kCallerFPOffset));
__ bind(&loop_entry);
}
if (FLAG_debug_code) {
Label ok;
__ cmpp(rdi, Operand(rdx, StandardFrameConstants::kFunctionOffset));
__ j(not_equal, &loop);
__ j(equal, &ok);
__ Abort(kInvalidFrameForFastNewRestArgumentsStub);
__ bind(&ok);
}
// Check if we have rest parameters (only possible if we have an
......@@ -4690,19 +4690,19 @@ void FastNewSloppyArgumentsStub::Generate(MacroAssembler* masm) {
// -----------------------------------
__ AssertFunction(rdi);
// For Ignition we need to skip all possible handler/stub frames until
// we reach the JavaScript frame for the function (similar to what the
// runtime fallback implementation does). So make r9 point to that
// JavaScript frame.
{
Label loop, loop_entry;
__ movp(r9, rbp);
__ jmp(&loop_entry, Label::kNear);
__ bind(&loop);
// Make r9 point to the JavaScript frame.
__ movp(r9, rbp);
if (skip_stub_frame()) {
// For Ignition we need to skip the handler/stub frame to reach the
// JavaScript frame for the function.
__ movp(r9, Operand(r9, StandardFrameConstants::kCallerFPOffset));
__ bind(&loop_entry);
}
if (FLAG_debug_code) {
Label ok;
__ cmpp(rdi, Operand(r9, StandardFrameConstants::kFunctionOffset));
__ j(not_equal, &loop);
__ j(equal, &ok);
__ Abort(kInvalidFrameForFastNewRestArgumentsStub);
__ bind(&ok);
}
// TODO(bmeurer): Cleanup to match the FastNewStrictArgumentsStub.
......@@ -4924,19 +4924,19 @@ void FastNewStrictArgumentsStub::Generate(MacroAssembler* masm) {
// -----------------------------------
__ AssertFunction(rdi);
// For Ignition we need to skip all possible handler/stub frames until
// we reach the JavaScript frame for the function (similar to what the
// runtime fallback implementation does). So make rdx point to that
// JavaScript frame.
{
Label loop, loop_entry;
__ movp(rdx, rbp);
__ jmp(&loop_entry, Label::kNear);
__ bind(&loop);
// Make rdx point to the JavaScript frame.
__ movp(rdx, rbp);
if (skip_stub_frame()) {
// For Ignition we need to skip the handler/stub frame to reach the
// JavaScript frame for the function.
__ movp(rdx, Operand(rdx, StandardFrameConstants::kCallerFPOffset));
__ bind(&loop_entry);
}
if (FLAG_debug_code) {
Label ok;
__ cmpp(rdi, Operand(rdx, StandardFrameConstants::kFunctionOffset));
__ j(not_equal, &loop);
__ j(equal, &ok);
__ Abort(kInvalidFrameForFastNewRestArgumentsStub);
__ bind(&ok);
}
// Check if we have an arguments adaptor frame below the function frame.
......
......@@ -264,12 +264,6 @@
'test-decls/CrossScriptReferences_Simple2': [PASS, SLOW],
}], # 'no_snap == True'
##############################################################################
['no_snap == True and mode == debug', {
# TODO(rmcilroy,4928): Issue with --mstackalign.
'test-interpreter/InterpreterCreateArguments': [SKIP],
}], # 'no_snap == True and mode == debug'
##############################################################################
# TODO(machenbach): Fix application of '*'. Nosnap windows needs a separate
# section to not overwrite the expectations for TestThatAlwaysFails.
......
......@@ -364,12 +364,6 @@
'asm/embenchen/lua_binarytrees': [SKIP],
}], # novfp3 == True
##############################################################################
['no_snap == True and mode == debug', {
# TODO(rmcilroy,4928): Issue with --mstackalign.
'es6/new-target': [PASS, NO_IGNITION],
}], # 'no_snap == True and mode == debug'
##############################################################################
['gc_stress == True', {
# Skip tests not suitable for GC stress.
......
......@@ -46,10 +46,6 @@
'sort-large-array': [SKIP],
# Too slow with --enable-slow-asserts.
'array-iterate-backwards': [SKIP],
# Ignition TODO(rmcilroy).
'array-reduce': [PASS, ['no_snap', NO_IGNITION]],
'array-reduceRight': [PASS, ['no_snap', NO_IGNITION]],
}], # 'mode == debug'
['simulator', {
# Skip tests that timeout with turbofan.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment