Commit 433fbe8
committed
auto merge of rust-lang#8329 : michaelwoerister/rust/lexical_scopes_alt, r=graydon
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,
MichaelFile tree
20 files changed
+2195
-156
lines changed- src
- librustc/middle/trans
- test/debug-info
20 files changed
+2195
-156
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| 217 | + | |
217 | 218 | | |
218 | 219 | | |
219 | 220 | | |
| |||
385 | 386 | | |
386 | 387 | | |
387 | 388 | | |
| 389 | + | |
388 | 390 | | |
389 | 391 | | |
390 | 392 | | |
| |||
1305 | 1307 | | |
1306 | 1308 | | |
1307 | 1309 | | |
1308 | | - | |
| 1310 | + | |
1309 | 1311 | | |
1310 | 1312 | | |
1311 | 1313 | | |
| |||
1325 | 1327 | | |
1326 | 1328 | | |
1327 | 1329 | | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
1328 | 1338 | | |
1329 | 1339 | | |
1330 | 1340 | | |
| |||
1771 | 1781 | | |
1772 | 1782 | | |
1773 | 1783 | | |
1774 | | - | |
| 1784 | + | |
1775 | 1785 | | |
1776 | 1786 | | |
1777 | 1787 | | |
| |||
1793 | 1803 | | |
1794 | 1804 | | |
1795 | 1805 | | |
1796 | | - | |
1797 | | - | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
1798 | 1811 | | |
1799 | 1812 | | |
1800 | 1813 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1103 | 1103 | | |
1104 | 1104 | | |
1105 | 1105 | | |
1106 | | - | |
1107 | 1106 | | |
1108 | 1107 | | |
1109 | 1108 | | |
| |||
1634 | 1633 | | |
1635 | 1634 | | |
1636 | 1635 | | |
1637 | | - | |
| 1636 | + | |
| 1637 | + | |
1638 | 1638 | | |
1639 | 1639 | | |
1640 | 1640 | | |
| |||
1933 | 1933 | | |
1934 | 1934 | | |
1935 | 1935 | | |
1936 | | - | |
| 1936 | + | |
1937 | 1937 | | |
1938 | 1938 | | |
1939 | 1939 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
226 | 227 | | |
227 | 228 | | |
228 | 229 | | |
229 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
230 | 234 | | |
231 | 235 | | |
232 | 236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
41 | | - | |
42 | 40 | | |
43 | 41 | | |
44 | 42 | | |
45 | 43 | | |
46 | | - | |
47 | 44 | | |
48 | 45 | | |
49 | 46 | | |
| |||
0 commit comments