-
Notifications
You must be signed in to change notification settings - Fork 385
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
Ensure FunctionEmitter synthetic vars don't name clash #2971
Labels
enhancement
Feature request (that does not concern language semantics, see "language")
internal
Not visible to users of Scala.js (only by devs in this repo)
Milestone
Comments
gzm0
added
enhancement
Feature request (that does not concern language semantics, see "language")
internal
Not visible to users of Scala.js (only by devs in this repo)
labels
May 28, 2017
This will be easier to deal with after some "cosmetic" changes in the IR data structures, that I plan for M2, so I'll delay this issue until then. |
exoego
pushed a commit
to exoego/scala-js
that referenced
this issue
Jul 17, 2019
exoego
pushed a commit
to exoego/scala-js
that referenced
this issue
Jul 17, 2019
sjrd
added a commit
to sjrd/scala-js
that referenced
this issue
Oct 28, 2019
…ash. First, we refactor `newSyntheticVar()` to return an already transformed `js.Ident` rather than a `LocalIdent`. This has several consequences, notably the fact that we need to temporarily manipulate IR `Tree`s that contain refereces to `js.Ident` variables. We do this with a `Transient` node. The refactoring also simplifies the handling of records in the emitter. Once that is done, we trivially change `newSyntheticVar()` to use variable names that start with a `$`, as they cannot conflict with `JSGen`-generated identifiers for `LocalIdent`s.
sjrd
added a commit
to sjrd/scala-js
that referenced
this issue
Oct 29, 2019
…ash. First, we refactor `newSyntheticVar()` to return an already transformed `js.Ident` rather than a `LocalIdent`. This has several consequences, notably the fact that we need to temporarily manipulate IR `Tree`s that contain refereces to `js.Ident` variables. We do this with a `Transient` node. The refactoring also simplifies the handling of records in the emitter. Once that is done, we trivially change `newSyntheticVar()` to use "envFields" for temporary vars, as they already have the necessary mechanisms not to clash with `LocalIdent`s nor with global refs.
sjrd
added a commit
to sjrd/scala-js
that referenced
this issue
Oct 31, 2019
…ash. First, we refactor `newSyntheticVar()` to return an already transformed `js.Ident` rather than a `LocalIdent`. This has several consequences, notably the fact that we need to temporarily manipulate IR `Tree`s that contain refereces to `js.Ident` variables. We do this with a `Transient` node. The refactoring also simplifies the handling of records in the emitter. Once that is done, we trivially change `newSyntheticVar()` to use "envFields" for temporary vars, as they already have the necessary mechanisms not to clash with `LocalIdent`s nor with global refs.
sjrd
added a commit
to sjrd/scala-js
that referenced
this issue
Nov 4, 2019
…ash. First, we refactor `newSyntheticVar()` to return an already transformed `js.Ident` rather than a `LocalIdent`. This has several consequences, notably the fact that we need to temporarily manipulate IR `Tree`s that contain refereces to `js.Ident` variables. We do this with a `Transient` node. The refactoring also simplifies the handling of records in the emitter. Once that is done, we trivially change `newSyntheticVar()` to use "envFields" for temporary vars, as they already have the necessary mechanisms not to clash with `LocalIdent`s nor with global refs.
sjrd
added a commit
to sjrd/scala-js
that referenced
this issue
Nov 4, 2019
…ash. First, we refactor `newSyntheticVar()` to return an already transformed `js.Ident` rather than a `LocalIdent`. This has several consequences, notably the fact that we need to temporarily manipulate IR `Tree`s that contain refereces to `js.Ident` variables. We do this with a `Transient` node. The refactoring also simplifies the handling of records in the emitter. Once that is done, we trivially change `newSyntheticVar()` to use "envFields" for temporary vars, as they already have the necessary mechanisms not to clash with `LocalIdent`s nor with global refs.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
Feature request (that does not concern language semantics, see "language")
internal
Not visible to users of Scala.js (only by devs in this repo)
This is a follow-up from #2800.
The text was updated successfully, but these errors were encountered: