Commit c3bd741
Fix "this" value in lazily-parsed module functions.
When preparsing top-level functions in a module, we didn't track
unresolved variables. Consequently, "this" ended up referencing
the global "this", which has the wrong value (in a module "this"
is supposed to be the undefined value).
This patch fixes that. This also lets us stop forcing context
allocation of all variables in module scopes, which the patch
takes care of as well.
Bug: chromium:791334
Change-Id: Ifac1f1adc033f3facfb3d29dd4bca32ee27bffcf
Reviewed-on: https://chromium-review.googlesource.com/808938
Reviewed-by: Marja Hölttä <[email protected]>
Reviewed-by: Adam Klein <[email protected]>
Reviewed-by: Aleksey Kozyatinskiy <[email protected]>
Commit-Queue: Georg Neis <[email protected]>
Cr-Commit-Position: refs/heads/master@{#50025}1 parent ccd15ea commit c3bd741
File tree
10 files changed
+475
-520
lines changed- src
- ast
- parsing
- test
- cctest
- interpreter/bytecode_expectations
- debugger/debug
- harmony
- inspector/debugger
- mjsunit/regress
10 files changed
+475
-520
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
151 | | - | |
152 | 150 | | |
153 | 151 | | |
154 | 152 | | |
| |||
1370 | 1368 | | |
1371 | 1369 | | |
1372 | 1370 | | |
1373 | | - | |
1374 | | - | |
1375 | | - | |
1376 | | - | |
1377 | | - | |
1378 | | - | |
| 1371 | + | |
| 1372 | + | |
1379 | 1373 | | |
1380 | 1374 | | |
1381 | 1375 | | |
| |||
1734 | 1728 | | |
1735 | 1729 | | |
1736 | 1730 | | |
1737 | | - | |
1738 | | - | |
1739 | | - | |
1740 | 1731 | | |
1741 | 1732 | | |
1742 | 1733 | | |
| |||
2111 | 2102 | | |
2112 | 2103 | | |
2113 | 2104 | | |
2114 | | - | |
2115 | | - | |
2116 | | - | |
| 2105 | + | |
2117 | 2106 | | |
2118 | | - | |
2119 | 2107 | | |
2120 | 2108 | | |
2121 | 2109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | 337 | | |
346 | 338 | | |
347 | 339 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
690 | 690 | | |
691 | 691 | | |
692 | 692 | | |
693 | | - | |
694 | 693 | | |
695 | 694 | | |
696 | 695 | | |
| |||
0 commit comments