-
Notifications
You must be signed in to change notification settings - Fork 29
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
Don't save setter for const exports. #134
Labels
Comments
Specifically, we can discard the setter after the first time it is called, if |
benjamn
added a commit
that referenced
this issue
May 18, 2017
This allows us to simplify the module.export API significantly, since it no longer sometimes takes a string as its first argument. Now `getters` is always an object of methods that get the values of local variables, and `constant` is an optional boolean to indicate that the getter functions always return the same values, which helps with #134.
benjamn
added a commit
that referenced
this issue
May 18, 2017
These changes let the runtime know that the values returned by the getter functions for export const a = 1, b = 2; will never change. Unfortunately, it's more difficult to detect that the same is true for const a = 1, b = 2; export { a, b }; though that's an area for future improvement. Part of #134.
benjamn
added a commit
that referenced
this issue
May 19, 2017
Simplify module.export in order to implement #134
benjamn
added a commit
that referenced
this issue
May 26, 2017
This allows us to simplify the module.export API significantly, since it no longer sometimes takes a string as its first argument. Now `getters` is always an object of methods that get the values of local variables, and `constant` is an optional boolean to indicate that the getter functions always return the same values, which helps with #134.
benjamn
added a commit
that referenced
this issue
May 26, 2017
These changes let the runtime know that the values returned by the getter functions for export const a = 1, b = 2; will never change. Unfortunately, it's more difficult to detect that the same is true for const a = 1, b = 2; export { a, b }; though that's an area for future improvement. Part of #134.
benjamn
added a commit
that referenced
this issue
May 26, 2017
taylorzane
pushed a commit
to taylorzane/reify
that referenced
this issue
Feb 26, 2019
This allows us to simplify the module.export API significantly, since it no longer sometimes takes a string as its first argument. Now `getters` is always an object of methods that get the values of local variables, and `constant` is an optional boolean to indicate that the getter functions always return the same values, which helps with benjamn#134.
taylorzane
pushed a commit
to taylorzane/reify
that referenced
this issue
Feb 26, 2019
These changes let the runtime know that the values returned by the getter functions for export const a = 1, b = 2; will never change. Unfortunately, it's more difficult to detect that the same is true for const a = 1, b = 2; export { a, b }; though that's an area for future improvement. Part of benjamn#134.
taylorzane
pushed a commit
to taylorzane/reify
that referenced
this issue
Feb 26, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This would address a line item on #90. It would also be a good time to think about the parser optimization to do a top-level only parse if there are only const exports and nested imports is disabled.
The text was updated successfully, but these errors were encountered: