[JSC] Avoid creating ProgramExecutable in checkSyntax
authoryusukesuzuki@slowstart.org <yusukesuzuki@slowstart.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 7 Oct 2018 09:32:52 +0000 (09:32 +0000)
committeryusukesuzuki@slowstart.org <yusukesuzuki@slowstart.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 7 Oct 2018 09:32:52 +0000 (09:32 +0000)
commit9abf7bee3e1c401e02824584a37ead6f7badc9fc
tree12a53230cb145dffbe6bc16fa012f50bf50a092d
parent4722ae7085a95b3f54dc61b106dcb9067ca0d17f
[JSC] Avoid creating ProgramExecutable in checkSyntax
https://bugs.webkit.org/show_bug.cgi?id=190332

Reviewed by Mark Lam.

uglify-js in web-tooling-benchmark executes massive number of Function constructor calls.
In Function constructor code, we perform checkSyntax for body and parameters. So fast checkSyntax
is important when the performance of Function constructor matters. Current checkSyntax code
unnecessarily allocates ProgramExecutable. This patch removes this allocation and improves
the benchmark score slightly.

Before:
    uglify-js:  2.87 runs/s
After:
    uglify-js:  2.94 runs/s

* runtime/Completion.cpp:
(JSC::checkSyntaxInternal):
(JSC::checkSyntax):
* runtime/ProgramExecutable.cpp:
(JSC::ProgramExecutable::checkSyntax): Deleted.
* runtime/ProgramExecutable.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236904 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/Completion.cpp
Source/JavaScriptCore/runtime/ProgramExecutable.cpp
Source/JavaScriptCore/runtime/ProgramExecutable.h