tvl-depot/tvix/eval/src
Adam Joseph c91d86ee5c feat(tvix/eval): NixList::concat(): avoid an unnecessary move
In `a++b`, the previous implementation would move `b` (i.e. memcpy
its elements) twice.  Let's do that only once.

We sure do call NixList.clone() a whole lot.  At some point in the
future we probably want to do a SmolStr-type split for NixList into
a two-variant enum where one side is an Rc<Vec<Value>> for lists
longer than a certain length.

Signed-off-by: Adam Joseph <adam@westernsemico.com>
Change-Id: I32154d18785a1f663454a8b9d4afd3e78bffdf9c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7040
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2022-10-19 10:37:30 +00:00
..
builtins feat(nix/eval): Implement builtins.functionArgs 2022-10-17 11:29:49 +00:00
compiler fix(tvix/eval): wrap dynamic resolution in an extra thunk 2022-10-18 09:15:13 +00:00
tests fix(tvix/eval): wrap dynamic resolution in an extra thunk 2022-10-18 09:15:13 +00:00
value feat(tvix/eval): NixList::concat(): avoid an unnecessary move 2022-10-19 10:37:30 +00:00
chunk.rs feat(tvix/eval): remove Clone instance from Chunk and Lambda 2022-10-16 09:23:03 +00:00
errors.rs feat(tvix/eval): Validate closed formals 2022-10-17 11:29:49 +00:00
eval.rs feat(tvix/eval): add an AST pretty-printing module 2022-10-16 12:26:56 +00:00
lib.rs feat(tvix/eval): add an AST pretty-printing module 2022-10-16 12:26:56 +00:00
main.rs feat(tvix/eval): Allow directly evaluating an expr via main 2022-10-11 00:33:49 +00:00
nix_search_path.rs fix(tvix/eval): nix_search_path.rs: use /etc instead of /bin 2022-10-13 09:07:30 +00:00
observer.rs feat(tvix/eval): observe stack after exiting call frames/builtins 2022-10-11 00:07:39 +00:00
opcode.rs feat(tvix/eval): Validate closed formals 2022-10-17 11:29:49 +00:00
pretty_ast.rs fix(tvix/eval): more faithfully serialise ast::Literal 2022-10-16 23:35:59 +00:00
properties.rs refactor(tvix/eval): Don't (ab)use PartialEq for Nix equality 2022-09-18 22:03:41 +00:00
source.rs feat(tvix/eval): fancy-format parse errors returned by rnix 2022-10-08 17:27:57 +00:00
spans.rs refactor(tvix/eval): implement ToSpan directly for rnix::TextRange 2022-10-08 10:58:42 +00:00
test_utils.rs test(tvix/eval): Add proof-of-concept test for Chunk 2022-09-18 17:55:06 +00:00
upvalues.rs docs(tvix/eval): upvalues.rs: define "upvalue", comment with_stack 2022-10-18 09:38:16 +00:00
vm.rs feat(tvix/eval): Validate closed formals 2022-10-17 11:29:49 +00:00
warnings.rs refactor(tvix/eval): introduce source::SourceCode type 2022-10-05 10:29:47 +00:00