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

ivy: fix multi-frame variable lookup bug #81

Merged
merged 1 commit into from
Dec 23, 2021
Merged

Conversation

rsc
Copy link
Contributor

@rsc rsc commented Dec 22, 2021

If g is calling f, f should never read or write g's variables.
But that's what Lookup was doing: reading g's variables
instead of globals of the same name. Assignment was correct.
This change factors out the lookup to share it between both.

exec/context.go Outdated Show resolved Hide resolved
If g is calling f, f should never read or write g's variables.
But that's what Lookup was doing: reading g's variables
instead of globals of the same name. Assignment was correct.
This change factors out the lookup to share it between both.
@rsc
Copy link
Contributor Author

rsc commented Dec 22, 2021

Fixed comment.

@robpike
Copy link
Owner

robpike commented Dec 23, 2021

Good catch.

@robpike robpike merged commit c308c3a into robpike:master Dec 23, 2021
@rsc rsc deleted the varlookup branch January 13, 2022 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants