Commit graph

3 commits

Author SHA1 Message Date
Vincent Ambo
72be759e1e feat(tvix/eval): implement unary negation operator
Change-Id: I5d012cc073e55d79d7b34b88283aab3164864293
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6075
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
2022-08-12 13:24:10 +00:00
Vincent Ambo
d35ecc0caf feat(tvix/eval): implement simple arithmetic binary operations
Implements simple arithmetic operations (+, -, *, /).

There is some scaffolding included to pop and coerce pairs of numbers,
as the Nix language will let arithmetic operators apply to arbitrary
pairs of number types (always resulting in floats if the types are
mixed).

Change-Id: I5f62c363bdea8baa6ef812cc64c5406759d257cf
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6074
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
2022-08-12 13:24:10 +00:00
Vincent Ambo
48a7449834 feat(tvix/eval): add initial opcode representation
Change-Id: Ibc7685a6b0b92e08f0b6c82cf7d9b04fbb593a4e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6068
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
2022-08-12 13:05:16 +00:00