refactor(tvix/eval): box PathBuf

This shaves another 8 bytes off Value. How did that type get so big?!

Change-Id: I65e9b59a1636bd57e3cc4aec5fea16887070b832
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8153
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
This commit is contained in:
Vincent Ambo 2023-02-27 13:50:16 +03:00 committed by tazjin
parent 52b7a76268
commit 43d04d9b98
5 changed files with 16 additions and 13 deletions

View file

@ -557,7 +557,7 @@ impl<'o> VM<'o> {
OpCode::OpFindFile => match self.stack_pop() {
Value::UnresolvedPath(path) => {
let resolved = self.nix_search_path.resolve(path).with_span(&frame)?;
let resolved = self.nix_search_path.resolve(*path).with_span(&frame)?;
self.stack.push(resolved.into());
}
@ -573,7 +573,7 @@ impl<'o> VM<'o> {
)));
}
Some(mut buf) => {
buf.push(path);
buf.push(*path);
self.stack.push(buf.into());
}
};