]> Witch of Git - ivy/commit
Add the target-independent trans module
authorCassie Jones <code@witchoflight.com>
Sat, 29 Feb 2020 15:21:48 +0000 (16:21 +0100)
committerCassie Jones <code@witchoflight.com>
Sat, 29 Feb 2020 16:13:11 +0000 (17:13 +0100)
commit4359f2bcbd685b9b142dc4b1a4bf73318d9dfc32
treea845d0ca78d4dfbb892d65dc6fc52c6c7dd516d5
parent06eabd74cc60dbb7ca5cd91494f4dd85df410129
Add the target-independent trans module

This handles translation of the AST to an SSA form. Currently not doing
any control flow constructs inside a function, so functions just have a
single basic block with linear SSA. This does some basic load forwarding
and de-duplication optimizations since they're straightforward.

The most important effect here is translating the globally resolved
names into offsets into the closure record, and listing the variables
that need to be copied into constructed closures.
sixty-four.vy [new file with mode: 0644]
src/ast.rs
src/main.rs
src/trans.rs [new file with mode: 0644]