top | item 16444025

(no title)

gsg | 8 years ago

Mutually recursive functions can be closure converted without cycles by deriving closure values from each other rather than storing them in each other.

discuss

order

kazinator|8 years ago

Environment copying ruses are revealed when something mutates a lexical variable, and the mutation doesn't appear everywhere as it should. (So you have to ban that.)

gsg|8 years ago

First, deriving is just pointer arithmetic and doesn't copy anything. Second, standard flat closure representations already involve copying parts of environments, with any sharing problems addressed by assignment conversion (turning variables that are assigned to into mutable cells, a reference to which can be copied into however many environments is necessary).