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

debuginfo: Proper handling of lexical scopes and variable shadowing. #8329

Closed
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@michaelwoerister
Contributor

michaelwoerister commented Aug 6, 2013

This pull request re-implements handling of visibility scopes and source code positions in debug info. It should now be very stable and properly handle

  • variable shadowing
  • expanded code (macros and the new for-loop de-sugaring, for example)
  • variables in the middle of nested scopes
  • bindings declared in the head of match statement arms.

all of which did not work at all or did not work reliably before. Those interested in a more detailed description of the problems at hand, I kindly refer to http://michaelwoerister.github.io/2013/08/03/visibility-scopes.html

Why doesn't the populate_scope_map() function use syntax::visit?
Because it would not improve this particular AST walker (see: michaelwoerister@69dc790#commitcomment-3781426)

Cheers,
Michael

@michaelwoerister

This comment has been minimized.

Contributor

michaelwoerister commented Aug 12, 2013

This has just been rebased.

@graydon

This comment has been minimized.

graydon commented on 983cc77 Aug 13, 2013

r+

@bors

This comment has been minimized.

Contributor

bors commented on 983cc77 Aug 13, 2013

saw approval from graydon
at michaelwoerister@983cc77

This comment has been minimized.

Contributor

bors replied Aug 13, 2013

merging michaelwoerister/rust/lexical_scopes_alt = 983cc77 into auto

This comment has been minimized.

Contributor

bors replied Aug 13, 2013

michaelwoerister/rust/lexical_scopes_alt = 983cc77 merged ok, testing candidate = 433fbe8

This comment has been minimized.

This comment has been minimized.

Contributor

bors replied Aug 14, 2013

fast-forwarding master to auto = 433fbe8

bors added a commit that referenced this pull request Aug 13, 2013

auto merge of #8329 : michaelwoerister/rust/lexical_scopes_alt, r=gra…
…ydon

This pull request re-implements handling of visibility scopes and source code positions in debug info. It should now be very stable and properly handle

+ variable shadowing
+ expanded code (macros and the new for-loop de-sugaring, for example)
+ variables in the middle of nested scopes
+ bindings declared in the head of match statement arms. 

all of which did not work at all or did not work reliably before. Those interested in a more detailed description of the problems at hand, I kindly refer to http://michaelwoerister.github.io/2013/08/03/visibility-scopes.html

Why doesn't the `populate_scope_map()` function use `syntax::visit`?
Because it would not improve this particular AST walker (see: michaelwoerister@69dc790#commitcomment-3781426)

Cheers,
Michael

@bors bors closed this Aug 14, 2013

@michaelwoerister michaelwoerister deleted the michaelwoerister:lexical_scopes_alt branch Jul 9, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment