dead code elimination for JS backend; JS improvements (but doesn't work yet)
This commit is contained in:
parent
2900ceae35
commit
ee1bcb6414
7 changed files with 213 additions and 104 deletions
|
|
@ -510,6 +510,6 @@ proc liftLambdas(fn: PSym, body: PNode): PNode =
|
|||
|
||||
proc liftLambdas*(n: PNode): PNode =
|
||||
assert n.kind in procDefs
|
||||
if gCmd == cmdCompileToEcmaScript: return n
|
||||
var s = n.sons[namePos].sym
|
||||
if gCmd == cmdCompileToEcmaScript: return s.getBody
|
||||
result = liftLambdas(s, s.getBody)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue