Move ThunkBranch struct impl into Thunk::Branch
ThunkBranch standalone struct was not as useful as I was expecting it would be. Its logic is now directly stored in Thunk::Branch variant Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use crate::{
|
||||
compile::{Compile, thunk::{Thunk, ThunkBranch}},
|
||||
compile::{Compile, thunk::Thunk},
|
||||
obj::{prelude::*, reserved::*},
|
||||
syn::{ast::*, visit::*},
|
||||
vm::inst::Inst,
|
||||
@@ -89,11 +89,11 @@ impl List {
|
||||
]);
|
||||
let thunk_true = body.thunkify(compile).into();
|
||||
let thunk_false = el.thunkify(compile).into();
|
||||
Thunk::Branch(ThunkBranch {
|
||||
Thunk::Branch {
|
||||
preamble: preamble.into(),
|
||||
thunk_true,
|
||||
thunk_false,
|
||||
})
|
||||
}
|
||||
}
|
||||
List::Lambda { params, expr } => {
|
||||
// TODO(fun) : need captures for functions, built dynamically (or statically?)
|
||||
|
||||
Reference in New Issue
Block a user