tvl-depot/tvix/eval/src
Vincent Ambo 69d8f17a26 feat(tvix/eval): compile creation of closure objects
Fully implements the instructions for compiling closure
objects (without runtime handling yet).

Closure (and thunk) objects are created at runtime by capturing all
known upvalues. To represent this, the instructions for creating them
need to have a variable number of arguments. Due to that, this commit
introduces new variants in OpCode that are not actually operations,
but data.

If the VM is implemented correctly, the instruction pointer should
never point at these. Due to this, the VM will panic if it sees a data
operand during an execution run.

Change-Id: Ic56b49b3a42736dc437751e76df0e89c8d0619c6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6291
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
2022-09-03 21:55:04 +00:00
..
builtins fix(tvix/eval): address all current clippy lints 2022-09-03 00:47:58 +00:00
compiler feat(tvix/eval): compile creation of closure objects 2022-09-03 21:55:04 +00:00
tests test(tvix/eval): add a test for float representation 2022-09-03 00:49:45 +00:00
value feat(tvix/eval): compile creation of closure objects 2022-09-03 21:55:04 +00:00
chunk.rs refactor(tvix/eval): return a lambda from the compiler 2022-09-01 21:56:17 +00:00
disassembler.rs feat(tvix/eval): implement chunk disassembler output 2022-08-30 16:53:40 +00:00
errors.rs feat(tvix/eval): implement 'throw' and 'abort' builtins 2022-09-02 12:59:23 +00:00
eval.rs chore(tvix/eval): print node representation for compiler errors 2022-09-03 21:55:04 +00:00
lib.rs feat(tvix/eval): introduce mechanism for defining builtins 2022-09-02 12:59:23 +00:00
main.rs refactor(tvix/eval): explicitly discard uninteresting results 2022-09-03 13:19:48 +00:00
opcode.rs feat(tvix/eval): compile creation of closure objects 2022-09-03 21:55:04 +00:00
vm.rs feat(tvix/eval): compile creation of closure objects 2022-09-03 21:55:04 +00:00
warnings.rs feat(tvix/eval): emit warnings when globals are being shadowed 2022-09-02 12:59:23 +00:00