-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Tmp array cleanup #311
Merged
Merged
Tmp array cleanup #311
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
While every use of normalizeTuple overwrites the previous use, the last use will leak, making it a red herring for profiling memory leaks.
This seems good to me. I'll run tests soon to verify. |
chancancode
added a commit
that referenced
this pull request
Oct 19, 2018
```hbs {{#let this.foo as |foo|}} {{foo 1 2 3}} ~~~ local variable invocation! {{/let}} ``` Previously, this would have tried to resolve and invoke the helper `foo`, ignoring the presence of the `foo` local variable. This is inconsistent with our general lexical lookup rules. This will now invoke `foo` local variable as a contextual component. (In other words, this removes the remaining "dot rule" exceptions for contextual components, as per [RFC #311](https://github.com/emberjs/rfcs/blob/master/text/0311-angle-bracket-invocation.md).) This commit also fixed another related issue: ```hbs {{#let (hash foo="foo-bar") as |h|}} {{h.foo 1 2 3}} ~~~~~ this is a string, not a component! {{/let}} ``` Previously, this would have tried to resolve and invoke the `foo-bar` component. This is an unintended consequence (i.e. a bug) of the "dot rule" implementation. This will now raise a `TypeError` in development mode and result in undefined behavior in production builds (probably some other runtime error deep inside the Glimmer VM internals). Fixes #17121.
chancancode
added a commit
that referenced
this pull request
Oct 19, 2018
```hbs {{#let this.foo as |foo|}} {{foo 1 2 3}} ~~~ local variable invocation! {{/let}} ``` Previously, this would have tried to resolve and invoke the helper `foo`, ignoring the presence of the `foo` local variable. This is inconsistent with our general lexical lookup rules. This will now invoke `foo` local variable as a contextual component. (In other words, this removes the remaining "dot rule" exceptions for contextual components, as per [RFC #311](https://github.com/emberjs/rfcs/blob/master/text/0311-angle-bracket-invocation.md).) This commit also fixed another related issue: ```hbs {{#let (hash foo="foo-bar") as |h|}} {{h.foo 1 2 3}} ~~~~~ this is a string, not a component! {{/let}} ``` Previously, this would have tried to resolve and invoke the `foo-bar` component. This is an unintended consequence (i.e. a bug) of the "dot rule" implementation. This will now raise a `TypeError` in development mode and result in undefined behavior in production builds (probably some other runtime error deep inside the Glimmer VM internals). Fixes #17121.
chancancode
added a commit
that referenced
this pull request
Oct 19, 2018
```hbs {{#let this.foo as |foo|}} {{foo 1 2 3}} ~~~ local variable invocation! {{/let}} ``` Previously, this would have tried to resolve and invoke the helper `foo`, ignoring the presence of the `foo` local variable. This is inconsistent with our general lexical lookup rules. This will now invoke `foo` local variable as a contextual component. In other words, this removes the remaining "dot rule" exceptions for contextual components, as per [RFC #311](https://github.com/emberjs/rfcs/blob/master/text/0311-angle-bracket-invocation.md): > We propose to relax that rule to match the proposed angle bracket > invocation semantics (i.e. allowing local variables without a dot, as > well as `@names`, but disallowing implicit `this` lookup). This commit also fixed another related issue: ```hbs {{#let (hash foo="foo-bar") as |h|}} {{h.foo 1 2 3}} ~~~~~ this is a string, not a component! {{/let}} ``` Previously, this would have tried to resolve and invoke the `foo-bar` component. This is an unintended consequence (i.e. a bug) of the "dot rule" implementation. This will now raise a `TypeError` in development mode and result in undefined behavior in production builds (probably some other runtime error deep inside the Glimmer VM internals). Fixes #17121.
chancancode
added a commit
that referenced
this pull request
Oct 19, 2018
```hbs {{#let this.foo as |foo|}} {{foo 1 2 3}} ~~~ local variable invocation! {{/let}} ``` Previously, this would have tried to resolve and invoke the helper `foo`, ignoring the presence of the `foo` local variable. This is inconsistent with our general lexical lookup rules. This will now invoke `foo` local variable as a contextual component. In other words, this removes the remaining "dot rule" exceptions for contextual components, as per [RFC #311](https://github.com/emberjs/rfcs/blob/master/text/0311-angle-bracket-invocation.md): > We propose to relax that rule to match the proposed angle bracket > invocation semantics (i.e. allowing local variables without a dot, as > well as `@names`, but disallowing implicit `this` lookup). This commit also fixed another related issue: ```hbs {{#let (hash foo="foo-bar") as |h|}} {{h.foo 1 2 3}} ~~~~~ this is a string, not a component! {{/let}} ``` Previously, this would have tried to resolve and invoke the `foo-bar` component. This is an unintended consequence (i.e. a bug) of the "dot rule" implementation. This will now raise a `TypeError` in development mode and result in undefined behavior in production builds (probably some other runtime error deep inside the Glimmer VM internals). Fixes #17121, #16510.
chancancode
added a commit
that referenced
this pull request
Oct 19, 2018
```hbs {{#let this.foo as |foo|}} {{foo 1 2 3}} ~~~ local variable invocation! {{/let}} ``` Previously, this would have tried to resolve and invoke the helper `foo`, ignoring the presence of the `foo` local variable. This is inconsistent with our general lexical lookup rules. This will now invoke `foo` local variable as a contextual component. In other words, this removes the remaining "dot rule" exceptions for contextual components, as per [RFC #311](https://github.com/emberjs/rfcs/blob/master/text/0311-angle-bracket-invocation.md): > We propose to relax that rule to match the proposed angle bracket > invocation semantics (i.e. allowing local variables without a dot, as > well as `@names`, but disallowing implicit `this` lookup). This commit also fixed another related issue: ```hbs {{#let (hash foo="foo-bar") as |h|}} {{h.foo 1 2 3}} ~~~~~ this is a string, not a component! {{/let}} ``` Previously, this would have tried to resolve and invoke the `foo-bar` component. This is an unintended consequence (i.e. a bug) of the "dot rule" implementation. This will now raise a `TypeError` in development mode and result in undefined behavior in production builds (probably some other runtime error deep inside the Glimmer VM internals). Fixes #17121, #16510.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While every use of normalizeTuple and apply overwrites the previous use, the last use will leak, making it a red herring for profiling memory leaks.
It is not uncommon for normalizeTuple to hold onto references to destroyed objects.