Skip to content

Commit

Permalink
Avoid reconstructing the scope in anonymous expressions too, which sp…
Browse files Browse the repository at this point in the history
…eeds it up a lot.
  • Loading branch information
Ivorforce committed Jul 19, 2024
1 parent 3a90b21 commit 73cdb6e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/interpreter/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,8 @@ impl Runtime {
// It doesn't make sense to evaluate something that isn't supposed to return anything.
assert!(!interface.return_type.unit.is_void());

let scope = self.make_scope()?;

let implementation = resolve_anonymous_expression(
&interface, &expression, &scope, self
&interface, &expression, &Rc::clone(&self.base_scope), self
)?;

// TODO We shouldn't need a function head for this, I think.
Expand Down

0 comments on commit 73cdb6e

Please sign in to comment.