You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lambdalifting: fix capturing macro parameters not working
Summary
=======
Fix macro parameters used in an inner procedure being reset to their
type's default value upon entering the macro.
Details
=======
Macros have an external and an internal signature. All parameter
symbols in the body refer to parameters belonging to the internal
signature, but when generating the env construction,
`rawClosureCreation` only considered the external signature. The
consequence was that lifted parameters were not initialized.
`rawClosureCreation` now uses the internal signature when generating
the env setup, fixing the issue.
In addition `rawClosureCreation` creation is refactored:
* the doc comment is changed to match reality
* the `isIterator` case is removed, since `rawClosureCreation` is never
called for iterators
* all env fields are initialized directly by the constructor
expression, instead of via separate assignments
* the procedure only returns a `var` statement AST now
0 commit comments