RESOLVED FIXED 176573
`async` should be able to be used as an imported binding name
https://bugs.webkit.org/show_bug.cgi?id=176573
Summary `async` should be able to be used as an imported binding name
Keanu Lee
Reported 2017-09-07 17:39:46 PDT
According to JS spec (https://tc39.github.io/ecma262/#sec-reserved-words), `async` is not a reserved keyword and should be able to be used as an imported binding name. For example, the following should not throw: import * as async from "./client.js"; Repro: https://kindly-physician.glitch.me/ (works in Chrome) Related: https://github.com/Polymer/polymer-modulizer/issues/197
Attachments
Patch (14.54 KB, patch)
2017-10-05 19:01 PDT, Yusuke Suzuki
no flags
Patch (17.97 KB, patch)
2017-10-05 19:39 PDT, Yusuke Suzuki
no flags
Archive of layout-test-results from ews112 for mac-elcapitan (2.01 MB, application/zip)
2017-10-06 01:15 PDT, Build Bot
no flags
Patch (34.44 KB, patch)
2017-10-09 18:12 PDT, Yusuke Suzuki
saam: review+
Radar WebKit Bug Importer
Comment 1 2017-10-05 07:32:50 PDT
Yusuke Suzuki
Comment 2 2017-10-05 19:01:32 PDT
Created attachment 322964 [details] Patch WIP: checking performance
Yusuke Suzuki
Comment 3 2017-10-05 19:22:58 PDT
baseline patched closure 0.54239+-0.00583 0.54187+-0.00837 jquery 7.29268+-0.04093 ^ 7.21285+-0.03484 ^ definitely 1.0111x faster OK, performance is not a problem.
Yusuke Suzuki
Comment 4 2017-10-05 19:23:26 PDT
*** Bug 177986 has been marked as a duplicate of this bug. ***
Yusuke Suzuki
Comment 5 2017-10-05 19:39:15 PDT
Caitlin Potter (:caitp)
Comment 6 2017-10-06 00:09:37 PDT
Per `https://tc39.github.io/ecma262/#prod-ImportedBinding`, isn't "await" always an invalid binding name in import declarations? Or am I mis-reading that notation?
Caitlin Potter (:caitp)
Comment 7 2017-10-06 00:30:54 PDT
(In reply to Caitlin Potter (:caitp) from comment #6) > Per `https://tc39.github.io/ecma262/#prod-ImportedBinding`, isn't "await" > always an invalid binding name in import declarations? Or am I mis-reading > that notation? Ok, I totally misread the title of this bug. Makes perfect sense for "async", nevermind me :)
Build Bot
Comment 8 2017-10-06 01:15:43 PDT
Comment on attachment 322971 [details] Patch Attachment 322971 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/4778645 New failing tests: workers/wasm-long-compile.html
Build Bot
Comment 9 2017-10-06 01:15:44 PDT
Created attachment 322996 [details] Archive of layout-test-results from ews112 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews112 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Yusuke Suzuki
Comment 10 2017-10-06 08:20:39 PDT
(In reply to Caitlin Potter (:caitp) from comment #7) > (In reply to Caitlin Potter (:caitp) from comment #6) > > Per `https://tc39.github.io/ecma262/#prod-ImportedBinding`, isn't "await" > > always an invalid binding name in import declarations? Or am I mis-reading > > that notation? > > Ok, I totally misread the title of this bug. Makes perfect sense for > "async", nevermind me :) np ;), this is for “async”.
Yusuke Suzuki
Comment 11 2017-10-06 23:01:54 PDT
(In reply to Build Bot from comment #8) > Comment on attachment 322971 [details] > Patch > > Attachment 322971 [details] did not pass mac-debug-ews (mac): > Output: http://webkit-queues.webkit.org/results/4778645 > > New failing tests: > workers/wasm-long-compile.html This is unrelated.
WebKit Commit Bot
Comment 12 2017-10-07 14:16:27 PDT
Comment on attachment 322971 [details] Patch Clearing flags on attachment: 322971 Committed r223022: <http://trac.webkit.org/changeset/223022>
WebKit Commit Bot
Comment 13 2017-10-07 14:16:29 PDT
All reviewed patches have been landed. Closing bug.
Ryan Haddad
Comment 14 2017-10-09 09:09:14 PDT
This change introduced 18 test262 failures. Here is the output for one of the tests: test262.yaml/test262/test/language/expressions/async-arrow-function/escaped-async.js.default: Expected uncaught exception with name 'SyntaxError' but exception value is not instance of this exception class test262.yaml/test262/test/language/expressions/async-arrow-function/escaped-async.js.default: Exception: Test262: This statement should not be evaluated. test262.yaml/test262/test/language/expressions/async-arrow-function/escaped-async.js.default: ERROR: Unexpected exit code: 3 FAIL: test262.yaml/test262/test/language/expressions/async-arrow-function/escaped-async.js.default https://build.webkit.org/builders/Apple%20El%20Capitan%20Debug%20Test262%20%28Tests%29/builds/3621
Ryan Haddad
Comment 15 2017-10-09 13:02:38 PDT
Reverted r223022 for reason: This change introduced 18 test262 failures. Committed r223062: <http://trac.webkit.org/changeset/223062>
Yusuke Suzuki
Comment 16 2017-10-09 18:12:59 PDT
Yusuke Suzuki
Comment 17 2017-10-09 22:53:17 PDT
Note You need to log in before you can comment on or make changes to this bug.