-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add initial support for dynamic module import #3204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
See https://tc39.github.io/proposal-dynamic-import/ Supports parsing and code generation for `import('foo')` type statements.
Internal Google issue http://b/123244371 created |
@ChadKillingsworth I believe the code you're proposing is modeling Although it looks like a CALL, it is different in many significant ways that I think will be likely to trip up existing compiler code. Could you change this implementation to instead define a new Thanks. |
@brad4d Switched to using a new node type Also verified in Chrome that only a single argument is expected (not an argument list). |
imported for internal testing and review |
found the source of at least some of the test failures. I've done that in my internal version. |
had another small internal breakage, which I've fixed today |
I'm submitting this change internally now. |
Adds basic parsing support and code generation for the dynamic import call. See https://tc39.github.io/proposal-dynamic-import/
The specification severely limits usage of
import(specifier)
type calls. Aliasing,.call
,.apply
,.bind
and many other JS function semantics are not supported.At the moment, the Refastor tests are failing, but I assume that is because certain passes are being skipped now. I'll need some help in figuring out how to work around that.
First step for full support of #2770