tvl-depot/tvix/eval/src
sterni bcd7e520f0 fix(tvix/eval): thunk string interpolation
If we have multiple string parts, we need to thunk assembling the
string. If we have a single literal, it is strict (like all literals),
but a single interpolation part may compile to a thunk, depending on how
the expression inside is compiled – we can avoid forcing to early here
compared to the previous behavior.

Note that this CL retains the bug that `"${x}"` is erroneously
translated to `x`, implying e.g. `"${12}" == 12`.

The use of `parts.len()` is unproblematic, since normalized_parts()
builds a `Vec` instead of returning an iterator.

Change-Id: I3aecbfefef65cc627b1b8a65be27cbaeada3582b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6580
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2022-09-15 15:52:53 +00:00
..
builtins feat(tvix/eval): implement correct toString behavior 2022-09-15 11:47:30 +00:00
compiler fix(tvix/eval): thunk string interpolation 2022-09-15 15:52:53 +00:00
tests fix(tvix/eval): thunk string interpolation 2022-09-15 15:52:53 +00:00
value feat(tvix/eval): implement correct toString behavior 2022-09-15 11:47:30 +00:00
chunk.rs feat(tvix/eval): add Chunk::pop_op method 2022-09-11 12:26:23 +00:00
errors.rs feat(tvix/eval): implement correct toString behavior 2022-09-15 11:47:30 +00:00
eval.rs feat(tvix/eval): implement initial fancy display for warnings 2022-09-13 11:12:29 +00:00
lib.rs chore(tvix/eval): clean up remains of previous disassembler impl 2022-09-09 21:14:56 +00:00
main.rs fix(tvix/eval): always add history entries in REPL 2022-09-10 21:57:13 +00:00
observer.rs refactor(tvix/eval): use CodeIdx wrapper for instruction pointer 2022-09-13 14:41:57 +00:00
opcode.rs refactor(tvix/eval): use CodeIdx wrapper for instruction pointer 2022-09-13 14:41:57 +00:00
upvalues.rs refactor(tvix/eval): capture entire with_stack in upvalues 2022-09-11 12:26:23 +00:00
vm.rs feat(tvix/eval): implement correct toString behavior 2022-09-15 11:47:30 +00:00
warnings.rs fix(tvix/eval): address current clippy lints 2022-09-13 14:41:57 +00:00