Skip to content

Commit

Permalink
fix(vm): Don't 'restore' the current_line in Compiler::compile
Browse files Browse the repository at this point in the history
Not sure why this was done but it messes up the line for the `Slide` instruction in `Expr::Block`
  • Loading branch information
Marwes committed Jan 22, 2017
1 parent 2aea009 commit d0ca451
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions vm/src/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,6 @@ impl<'a> Compiler<'a> {
// Store a stack of expressions which need to be cleaned up after this "tailcall" loop is
// done
function.stack.enter_scope();
let saved_line = function.current_line;
function.current_line = self.source
.line_number_at_byte(expr.span.start);
while let Some(next) = self.compile_(expr, function, tail_position)? {
Expand All @@ -467,7 +466,6 @@ impl<'a> Compiler<'a> {
}
let count = function.exit_scope(self);
function.emit(Slide(count));
function.current_line = saved_line;
Ok(())
}

Expand Down

0 comments on commit d0ca451

Please sign in to comment.