Skip to content
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

Closed
gzm0 opened this issue May 28, 2017 · 1 comment
Closed

Ensure FunctionEmitter synthetic vars don't name clash #2971

gzm0 opened this issue May 28, 2017 · 1 comment
Assignees
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
Copy link
Contributor

gzm0 commented May 28, 2017

This is a follow-up from #2800.

@gzm0 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
@gzm0 gzm0 added this to the v1.0.0 milestone May 28, 2017
@sjrd
Copy link
Member

sjrd commented Jun 16, 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.

@sjrd sjrd modified the milestones: v1.0.0, v1.0.0-M1 Jun 16, 2017
@sjrd sjrd modified the milestones: v1.0.0-M2, v1.0.0-M3 Oct 11, 2017
@sjrd sjrd modified the milestones: v1.0.0-M3, v1.0.0-M4 Jan 26, 2018
@sjrd sjrd modified the milestones: v1.0.0-M4, v1.0.0-M5 Jun 29, 2018
@gzm0 gzm0 modified the milestones: v1.0.0-M5, v1.0.0-M6 Jul 21, 2018
@sjrd sjrd modified the milestones: v1.0.0-M6, v1.0.0-M7 Oct 17, 2018
@gzm0 gzm0 modified the milestones: v1.0.0-M7, v1.0.0-M8 Apr 7, 2019
@sjrd sjrd modified the milestones: v1.0.0-M8, v1.0.0-M9 May 31, 2019
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 sjrd added the has-pr label Oct 28, 2019
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.
@sjrd sjrd closed this as completed in 00b3729 Nov 10, 2019
@sjrd sjrd removed the has-pr label Nov 15, 2019
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)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants