Support recursive tail call optimization for polymorphic calls
authorrmorisset@apple.com <rmorisset@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Nov 2017 13:11:32 +0000 (13:11 +0000)
committerrmorisset@apple.com <rmorisset@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Nov 2017 13:11:32 +0000 (13:11 +0000)
commit9efe502ef004b16807bc61a6c23a4d112aa7bb83
treefe9773d4707916eb6c78c72a298318c88f4080c2
parentf98576d70868b9fb45b44f495a249c2ef704fb54
Support recursive tail call optimization for polymorphic calls
https://bugs.webkit.org/show_bug.cgi?id=178390

Reviewed by Saam Barati.

Comes with a large but fairly simple refactoring: the inlining path for varargs and non-varargs calls now converge a lot later,
eliminating some redundant checks, and simplifying a few parts of the inlining pipeline.

Also removes some dead code from inlineCall(): there was a special path for when m_continuationBlock is null, but it should never be (now checked with RELEASE_ASSERT).

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::handleVarargsCall):
(JSC::DFG::ByteCodeParser::handleRecursiveTailCall):
(JSC::DFG::ByteCodeParser::inlineCall):
(JSC::DFG::ByteCodeParser::handleCallVariant):
(JSC::DFG::ByteCodeParser::handleVarargsInlining):
(JSC::DFG::ByteCodeParser::getInliningBalance):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::attemptToInlineCall): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225212 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp