Commit f2416b5
committed
Few destructuring fixes
The IsArgument optimization code did not handle the pattern nodes. Added
'cases' for those nop. This happens when we try to find out the
'arguments' usage from a parse node. Here in this case we have an empty pattern and this leads to the assert.
We have place holder slots for destructuring patterns - however when we
generate the scopeinfo for deferred function we didn't account that piece
of information. Fixed that by using the same counter (earlier used for same name args place holder) and increment that for destructuring patterns.
Added unittest for those.1 parent 9ac8d41 commit f2416b5
6 files changed
Lines changed: 37 additions & 6 deletions
File tree
- lib/Runtime/ByteCode
- test/es6
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
190 | 193 | | |
191 | 194 | | |
192 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2711 | 2711 | | |
2712 | 2712 | | |
2713 | 2713 | | |
2714 | | - | |
| 2714 | + | |
2715 | 2715 | | |
2716 | 2716 | | |
2717 | 2717 | | |
| |||
2721 | 2721 | | |
2722 | 2722 | | |
2723 | 2723 | | |
2724 | | - | |
| 2724 | + | |
2725 | 2725 | | |
2726 | 2726 | | |
2727 | 2727 | | |
| 2728 | + | |
| 2729 | + | |
| 2730 | + | |
| 2731 | + | |
2728 | 2732 | | |
2729 | 2733 | | |
2730 | 2734 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
| 57 | + | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
291 | 315 | | |
292 | 316 | | |
293 | 317 | | |
| |||
0 commit comments