Commit a399958
dnolen
CLJS-2093: inline ^:const var values
first cut. Store init expr in the compiler environment. When returning
var AST if we are not def'ing a var then analyze :const-init if it
exists and add as :const-expr to var AST.
During emission of var if :const-expr key exists emit that instead.1 parent b9d957f commit a399958
2 files changed
Lines changed: 27 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1299 | 1299 | | |
1300 | 1300 | | |
1301 | 1301 | | |
| 1302 | + | |
1302 | 1303 | | |
1303 | 1304 | | |
1304 | 1305 | | |
| |||
1381 | 1382 | | |
1382 | 1383 | | |
1383 | 1384 | | |
| 1385 | + | |
| 1386 | + | |
1384 | 1387 | | |
1385 | 1388 | | |
1386 | 1389 | | |
| |||
2914 | 2917 | | |
2915 | 2918 | | |
2916 | 2919 | | |
2917 | | - | |
| 2920 | + | |
| 2921 | + | |
| 2922 | + | |
| 2923 | + | |
2918 | 2924 | | |
2919 | 2925 | | |
2920 | 2926 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
351 | 353 | | |
352 | 354 | | |
353 | 355 | | |
| |||
0 commit comments