use existing bindings in compile_is (#1545)

This commit is contained in:
Mark Thom
2022-11-13 22:58:00 -07:00
parent d19a8d6b98
commit d16312a314
2 changed files with 16 additions and 26 deletions

View File

@@ -747,7 +747,7 @@ impl<'b> CodeGenerator<'b> {
) -> Result<(), CompilationError> {
macro_rules! compile_expr {
($self:expr, $terms:expr, $term_loc:expr, $code:expr) => ({
let (acode, at) = $self.compile_arith_expr(&$terms[1], 1, $term_loc, 2)?;
let (acode, at) = $self.compile_arith_expr($terms, 1, $term_loc, 2)?;
$code.extend(acode.into_iter());
at
});
@@ -765,7 +765,7 @@ impl<'b> CodeGenerator<'b> {
code,
);
compile_expr!(self, terms, term_loc, code)
compile_expr!(self, &terms[1], term_loc, code)
}
&Term::Literal(_, c @ Literal::Integer(_) |
c @ Literal::Float(_) |
@@ -775,7 +775,7 @@ impl<'b> CodeGenerator<'b> {
code.push(instr!("put_constant", Level::Shallow, v, temp_v!(1)));
self.marker.advance_arg();
compile_expr!(self, terms, term_loc, code)
compile_expr!(self, &terms[1], term_loc, code)
}
_ => {
code.push(instr!("$fail", 0));