JSTests:
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Aug 2017 01:10:01 +0000 (01:10 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Aug 2017 01:10:01 +0000 (01:10 +0000)
commitb9ef63734906e23a0282e5bc1def12226f20e897
treef4d2944ba60ec0ecf536216ab7cb927cff238a7d
parentb8a2a48087b1d2a8da0a9ef99177f3c4712a8c44
JSTests:
Support the 'with' keyword in FTL.
https://bugs.webkit.org/show_bug.cgi?id=175585

Patch by Robin Morisset <rmorisset@apple.com> 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 <rmorisset@apple.com> 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 <rmorisset@apple.com> on 2017-08-15
Reviewed by Saam Barati.

No change of behavior.

* bindings/js/JSHTMLElementCustom.cpp:
(WebCore::JSHTMLElement::pushEventHandlerScope const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220778 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
JSTests/ChangeLog
JSTests/stress/with.js
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp
Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
Source/JavaScriptCore/ftl/FTLCapabilities.cpp
Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
Source/JavaScriptCore/jit/JITOperations.cpp
Source/JavaScriptCore/jit/JITOperations.h
Source/JavaScriptCore/runtime/CommonSlowPaths.cpp
Source/JavaScriptCore/runtime/Completion.cpp
Source/JavaScriptCore/runtime/JSWithScope.cpp
Source/JavaScriptCore/runtime/JSWithScope.h
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSHTMLElementCustom.cpp