]> Witch of Git - ivy/commit
Add support for globals which don't get captured
authorCassie Jones <code@witchoflight.com>
Thu, 27 Feb 2020 17:27:37 +0000 (18:27 +0100)
committerCassie Jones <code@witchoflight.com>
Thu, 27 Feb 2020 17:27:37 +0000 (18:27 +0100)
commit76b17b4eeb180550d8dd36177253a780d5ed8634
tree92823fd877db9d06a0d829ccfe3668b1da6626d7
parent80f4d7a54a81655c0df7e534e988ef11205a7035
Add support for globals which don't get captured

Lots of top-level definitions don't need to be copied into every
closure, because they're constant for the whole program. Global
variables are never inserted into the upvars entry, so they won't be
copied into closures.

This also adds "builtin" names that are inserted into the initial
context for arithmetic and comparisons. Booleans have to be builtin due
to being returned by the comparisons, but they're still intended to be
implemented via church encoding.
src/ast.rs
src/main.rs