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

Fix issues with "loose free variable" lookup by dropping unneeded GetFreeAsFallback op code #1362

Merged
merged 1 commit into from
Nov 8, 2021

Conversation

ef4
Copy link
Contributor

@ef4 ef4 commented Nov 5, 2021

The GetFreeAsFallback opcode got broken by 179a388. As far as I can tell, it's never correct to call withPath by itself, it's always supposed to come after an opcode that leaves a value on the stack that needs path support.

Rather than fix it, I'm going to try to cut the rest of it out, since it exists only to support this fallback.

This still needs to get tested against Ember. I am unable to get Ember and glimmer-vm working correctly together locally, with or without these changes.

GetFreeAsFallback got broken by 179a388

As far as I can tell, it's never correct to call `withPath` by itself, it's always supposed to come after an opcode that leaves a value on the stack that needs path support.

Rather than fix it, I'm going to try to cut the rest of it out, since it exists only to support `this` fallback.
Copy link
Contributor

@snewcomer snewcomer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ha! Generic -> Strict. I'm glad you got to the bottom of this!

symbols,
head.path.tail
);
return buildVar(head.path.head, VariableResolutionContext.Strict, symbols, head.path.tail);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this @ef4!

@rwjblue rwjblue added the bug label Nov 8, 2021
@rwjblue rwjblue changed the title drop GetFreeAsFallback Fix issues with "loose free variable" lookup by dropping unneeded GetFreeAsFallback op code Nov 8, 2021
@rwjblue rwjblue merged commit c49b66d into master Nov 8, 2021
@rwjblue rwjblue deleted the drop-GetFreeAsFallback branch November 8, 2021 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants