Ignore:
Timestamp:
Jul 20, 2020, 4:28:28 PM (5 years ago)
Author:
Ross Kirsling
Message:

[JSC] eval?.() should be indirect eval
https://bugs.webkit.org/show_bug.cgi?id=214568

Reviewed by Keith Miller.

JSTests:

  • test262/expectations.yaml:

Mark two test cases as passing.

Source/JavaScriptCore:

eval?.() is specified as indirect eval, but (virtually) all implementations assumed it should be direct eval.
I raised this topic in today's TC39 meeting and we've decided to keep the spec as it is.

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::makeFunctionCallNode):
Don't use EvalFunctionCallNode for optional call of eval.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/parser/ASTBuilder.h

    r264397 r264633  
    14281428        ResolveNode* resolve = static_cast<ResolveNode*>(func);
    14291429        const Identifier& identifier = resolve->identifier();
    1430         if (identifier == m_vm.propertyNames->eval) {
     1430        if (identifier == m_vm.propertyNames->eval && !isOptionalCall) {
    14311431            usesEval();
    14321432            return new (m_parserArena) EvalFunctionCallNode(location, args, divot, divotStart, divotEnd);
Note: See TracChangeset for help on using the changeset viewer.