Commit ffadecc
committed
find_var_htab: skip entries with scope_level != 0
When a `var` shadows a block-scoped `let` of the same name,
find_var_htab returned the block-scoped entry. find_var rejected it
(scope_level != 0) and fell through to an O(n) linear scan.
Add scope_level == 0 check to the htab probe loop so non-scope-0
entries are skipped. This lets find_var treat htab miss as definitive.1 parent a653771 commit ffadecc
1 file changed
Lines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23378 | 23378 | | |
23379 | 23379 | | |
23380 | 23380 | | |
23381 | | - | |
| 23381 | + | |
| 23382 | + | |
23382 | 23383 | | |
23383 | 23384 | | |
23384 | 23385 | | |
| |||
23405 | 23406 | | |
23406 | 23407 | | |
23407 | 23408 | | |
23408 | | - | |
23409 | | - | |
23410 | | - | |
23411 | | - | |
| 23409 | + | |
23412 | 23410 | | |
| 23411 | + | |
23413 | 23412 | | |
23414 | 23413 | | |
23415 | 23414 | | |
| |||
0 commit comments