Add first-class support for .mjs files in jsc binary
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Nov 2018 21:55:12 +0000 (21:55 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Nov 2018 21:55:12 +0000 (21:55 +0000)
commit6ba16719131e64a8c0649fa91cc3b9ec0a18cfba
treedacdf8896862f550d775dcd8ecdd47afdf22b10b
parent6650460b02ff050e2cdde8b24e5eef6a78205ea8
Add first-class support for .mjs files in jsc binary
https://bugs.webkit.org/show_bug.cgi?id=192190
<rdar://problem/46375715>

Reviewed by Keith Miller.

JSTests:

* stress/simple-module.mjs: Added.
* stress/simple-script.js: Added.

Source/JavaScriptCore:

Treat files with a .mjs extension as a module, regardless
of whether or not the --module-file argument was given.

* jsc.cpp:
(printUsageStatement): Update usage.
(isMJSFile): Helper to look for .mjs extensions.
(CommandLine::parseArguments): Pick the appropriate script type.

Tools:

Add .mjs files to the regexp looking for all JS files.

* Scripts/run-jsc-stress-tests:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/stress/simple-module.mjs [new file with mode: 0644]
JSTests/stress/simple-script.js [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/jsc.cpp
Tools/ChangeLog
Tools/Scripts/run-jsc-stress-tests