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

Closed
wants to merge 3 commits into
from

Projects

None yet

3 participants

@michaelwoerister
Contributor

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
Contributor

This has just been rebased.

@graydon

r+

Contributor
bors replied Aug 13, 2013

saw approval from graydon
at michaelwoerister@983cc77

Contributor
bors replied Aug 13, 2013

merging michaelwoerister/rust/lexical_scopes_alt = 983cc77 into auto

Contributor
bors replied Aug 13, 2013

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

Contributor
bors replied Aug 14, 2013

fast-forwarding master to auto = 433fbe8

@bors bors added a commit that referenced this pull request Aug 13, 2013
@bors bors 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
433fbe8
@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