Ignore:
Timestamp:
Aug 15, 2017, 6:10:01 PM (8 years ago)
Author:
[email protected]
Message:

JSTests:
Support the 'with' keyword in FTL.
https://bugs.webkit.org/show_bug.cgi?id=175585

Patch by Robin Morisset <[email protected]> on 2017-08-15
Reviewed by Saam Barati.

Also improve the JSTest/stress/with.js file to test
what happens when non-objects are passed to with.

  • stress/with.js:

(foo):
(i.catch):
(i.with): Deleted.

Source/JavaScriptCore:
Support the 'with' keyword in FTL
https://bugs.webkit.org/show_bug.cgi?id=175585

Patch by Robin Morisset <[email protected]> on 2017-08-15
Reviewed by Saam Barati.

Also makes sure that the order of arguments of PushWithScope, op_push_with_scope, JSWithScope::create()
and so on is consistent (always parentScope first, the new scopeObject second). We used to go from one
to the other at different step which was quite confusing. I picked this order for consistency with CreateActivation
that takes its parentScope argument first.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitPushWithScope):

  • debugger/DebuggerCallFrame.cpp:

(JSC::DebuggerCallFrame::evaluateWithScopeExtension):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compilePushWithScope):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compilePushWithScope):

  • jit/JITOperations.cpp:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/Completion.cpp:

(JSC::evaluateWithScopeExtension):

  • runtime/JSWithScope.cpp:

(JSC::JSWithScope::create):

  • runtime/JSWithScope.h:

Source/WebCore:
Change the order of arguments of JSWithScope::create() for consistency
https://bugs.webkit.org/show_bug.cgi?id=175585

Patch by Robin Morisset <[email protected]> on 2017-08-15
Reviewed by Saam Barati.

No change of behavior.

  • bindings/js/JSHTMLElementCustom.cpp:

(WebCore::JSHTMLElement::pushEventHandlerScope const):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp

    r218794 r220778  
    256256    if (scopeExtensionObject) {
    257257        JSScope* ignoredPreviousScope = globalObject->globalScope();
    258         globalObject->setGlobalScopeExtension(JSWithScope::create(vm, globalObject, scopeExtensionObject, ignoredPreviousScope));
     258        globalObject->setGlobalScopeExtension(JSWithScope::create(vm, globalObject, ignoredPreviousScope, scopeExtensionObject));
    259259    }
    260260
Note: See TracChangeset for help on using the changeset viewer.