diff options
author | Adam Joseph <adam@westernsemico.com> | 2023-12-13T04·47-0800 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2023-12-29T21·34+0000 |
commit | 11e35a77a671b3d85ea161e1799ef3f6d98201f1 (patch) | |
tree | eac3d46a2c164445914430f9adbaf2996fe963b7 /tvix/eval/src/vm | |
parent | 0c22454bb93648155b8be4b45fb5d5c8f0389673 (diff) |
refactor(tvix/eval): let OpCoerceToString select the CoercionKind r/7272
Change-Id: I92d58ef216d7e0766af70f019b3dcd445284a95d Reviewed-on: https://cl.tvl.fyi/c/depot/+/10344 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/vm')
-rw-r--r-- | tvix/eval/src/vm/mod.rs | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/tvix/eval/src/vm/mod.rs b/tvix/eval/src/vm/mod.rs index c3c0b259bc77..6c11997db1f5 100644 --- a/tvix/eval/src/vm/mod.rs +++ b/tvix/eval/src/vm/mod.rs @@ -777,20 +777,13 @@ impl<'o> VM<'o> { _ => panic!("attempted to finalise a non-thunk"), }, - OpCode::OpCoerceToString => { + OpCode::OpCoerceToString(kind) => { let value = self.stack_pop(); let gen_span = frame.current_light_span(); self.push_call_frame(span, frame); self.enqueue_generator("coerce_to_string", gen_span.clone(), |co| { - value.coerce_to_string( - co, - CoercionKind { - strong: false, - import_paths: true, - }, - gen_span, - ) + value.coerce_to_string(co, kind, gen_span) }); return Ok(false); |