refactor(tvix/eval): return a lambda from the compiler
Changes the internal compiler plumbing to not just return a chunk of code, but the same chunk wrapped inside of a lambda value. This is one more step towards compiling runtime lambdas. Change-Id: If0035f8e65a2970c5ae123fc068a2396e1d8fd72 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6240 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
This commit is contained in:
parent
4715f9a3a0
commit
6f31c895ff
5 changed files with 28 additions and 16 deletions
|
|
@ -1,7 +1,7 @@
|
|||
use crate::opcode::{CodeIdx, ConstantIdx, OpCode};
|
||||
use crate::value::Value;
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct Chunk {
|
||||
pub code: Vec<OpCode>,
|
||||
pub constants: Vec<Value>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue