Ignore:
Timestamp:
Oct 17, 2018, 4:56:56 PM (7 years ago)
Author:
[email protected]
Message:

The parser should not emit a ApplyFunctionCallDotNode for Reflect.apply.
https://bugs.webkit.org/show_bug.cgi?id=190671
<rdar://problem/45201145>

Reviewed by Saam Barati.

The bytecode generator does not currently know how to inline Reflect.apply (see
https://bugs.webkit.org/show_bug.cgi?id=190668). Hence, it's a waste of time to
emit the ApplyFunctionCallDotNode since the function check against Function.apply
that it will generate will always fail.

Also fixed CallVariant::dump() to be able to handle dumping a non-executable
callee. Reflect.apply used to trip this up. Any object with an apply property
invoked as a function could also trip this up. This is now fixed.

  • bytecode/CallVariant.cpp:

(JSC::CallVariant::dump const):

  • bytecompiler/NodesCodegen.cpp:

(JSC::ApplyFunctionCallDotNode::emitBytecode):

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::makeFunctionCallNode):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/CallVariant.cpp

    r234086 r237241  
    8989    }
    9090   
    91     out.print("Executable: ", *executable());
     91    if (ExecutableBase* executable = this->executable()) {
     92        out.print("(Executable: ", *executable, ")");
     93        return;
     94    }
     95
     96    out.print("Non-executable callee: ", *nonExecutableCallee());
    9297}
    9398
Note: See TracChangeset for help on using the changeset viewer.