refactor(tvix/eval): rename VM::tail_call_value -> VM::call_value
The name of this was not accurate anymore after all the recent shuffling, as noted by amjoseph. Conceptual tail calls here only occur for Nix bytecode calling Nix bytecode, but things like a builtin call actually push a new native frame. Change-Id: I1dea8c9663daf86482b8c7b5a23133254b5ca321 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8256 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
This commit is contained in:
parent
5d9bfd7735
commit
cc59cbf3e2
2 changed files with 4 additions and 4 deletions
|
@ -355,7 +355,7 @@ impl<'o> VM<'o> {
|
|||
|
||||
GeneratorRequest::Call(callable) => {
|
||||
self.reenqueue_generator(name, span.clone(), generator);
|
||||
self.tail_call_value(span, None, callable)?;
|
||||
self.call_value(span, None, callable)?;
|
||||
return Ok(false);
|
||||
}
|
||||
|
||||
|
|
|
@ -699,7 +699,7 @@ impl<'o> VM<'o> {
|
|||
|
||||
OpCode::OpCall => {
|
||||
let callable = self.stack_pop();
|
||||
self.tail_call_value(frame.current_light_span(), Some(frame), callable)?;
|
||||
self.call_value(frame.current_light_span(), Some(frame), callable)?;
|
||||
|
||||
// exit this loop and let the outer loop enter the new call
|
||||
return Ok(true);
|
||||
|
@ -900,7 +900,7 @@ impl<'o> VM<'o> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn tail_call_value(
|
||||
fn call_value(
|
||||
&mut self,
|
||||
span: LightSpan,
|
||||
parent: Option<CallFrame>,
|
||||
|
@ -908,7 +908,7 @@ impl<'o> VM<'o> {
|
|||
) -> EvalResult<()> {
|
||||
match callable {
|
||||
Value::Builtin(builtin) => self.call_builtin(span, builtin),
|
||||
Value::Thunk(thunk) => self.tail_call_value(span, parent, thunk.value().clone()),
|
||||
Value::Thunk(thunk) => self.call_value(span, parent, thunk.value().clone()),
|
||||
|
||||
Value::Closure(closure) => {
|
||||
let lambda = closure.lambda();
|
||||
|
|
Loading…
Reference in a new issue