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

Lexical "this" capture #1673

Merged
merged 1 commit into from
Jan 14, 2025
Merged

Lexical "this" capture #1673

merged 1 commit into from
Jan 14, 2025

Conversation

ef4
Copy link
Contributor

@ef4 ef4 commented Jan 9, 2025

Opening for discussion on whether this is a good direction to solve emberjs/babel-plugin-ember-template-compilation#61

You can see the other half of the changes in:

emberjs/babel-plugin-ember-template-compilation#67

which patches this PR's changes into ember-template-compiler.js.

The idea here is that @glimmer/syntax continues to just trust the outer layer (babel-plugin-ember-template-compilation) to manage all aspects of JS scope, including whether or not this should be considered to in local scope. If it's in scope, it compiles to a normal variable reference.

@ef4 ef4 force-pushed the lexical-this-capture branch from c9a01af to 1dc9739 Compare January 10, 2025 16:24
@ef4 ef4 marked this pull request as ready for review January 10, 2025 16:24
Copy link

github-actions bot commented Jan 10, 2025

DevProd
This PR
676K └─┬ .
191K   ├── runtime
162K   ├── syntax
124K   ├── compiler
 81K   ├── opcode-compiler
 49K   ├── manager
 19K   ├── validator
 11K   ├── program
9.0K   ├── reference
7.0K   ├── destroyable
6.1K   ├── util
4.2K   ├── node
3.8K   ├── global-context
2.6K   ├── wire-format
1.0K   ├── vm
966B   ├── encoder
844B   ├── vm-babel-plugins
565B   └── owner
262K └─┬ .
 71K   ├── runtime
 69K   ├── syntax
 56K   ├── compiler
 26K   ├── opcode-compiler
 15K   ├── manager
5.0K   ├── program
4.1K   ├── validator
3.7K   ├── reference
2.4K   ├── util
2.1K   ├── node
1.6K   ├── wire-format
1.5K   ├── destroyable
737B   ├── vm
563B   ├── global-context
511B   ├── encoder
469B   ├── vm-babel-plugins
155B   └── owner

@ef4
Copy link
Contributor Author

ef4 commented Jan 14, 2025

Was discussed and approved during last week's spec meeting.

@ef4 ef4 merged commit 07c5863 into main Jan 14, 2025
6 checks passed
@ef4 ef4 deleted the lexical-this-capture branch January 14, 2025 14:35
@github-actions github-actions bot mentioned this pull request Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant