From: Mark Thom Date: Sat, 27 Jan 2018 07:14:10 +0000 (-0700) Subject: cleanup notes and sloppy formatting. X-Git-Tag: v0.8.110~603 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=6894162c91eec2f6d270a1d5a6450f574c2c3412;p=scryer-prolog.git cleanup notes and sloppy formatting. --- diff --git a/src/prolog/codegen.rs b/src/prolog/codegen.rs index 12f88a3a..ec620bc1 100644 --- a/src/prolog/codegen.rs +++ b/src/prolog/codegen.rs @@ -372,8 +372,7 @@ impl<'a, TermMarker: Allocator<'a>> CodeGenerator<'a, TermMarker> Ok(()) } - fn call_arith_eval(&self, term: &'a Term, target_int: usize) - -> Result + fn call_arith_eval(&self, term: &'a Term, target_int: usize) -> Result { let mut evaluator = ArithmeticEvaluator::new(self.marker.bindings(), target_int); evaluator.eval(term) @@ -383,7 +382,8 @@ impl<'a, TermMarker: Allocator<'a>> CodeGenerator<'a, TermMarker> code: &mut Code, is_exposed: bool) -> Result<(), ParserError> { - for (chunk_num, _, terms) in iter { + for (chunk_num, _, terms) in iter + { for (i, term) in terms.iter().enumerate() { let term_loc = if i + 1 < terms.len() { @@ -475,10 +475,6 @@ impl<'a, TermMarker: Allocator<'a>> CodeGenerator<'a, TermMarker> if conjunct_info.allocates() { code.insert(dealloc_index, Line::Control(ControlInstruction::Deallocate)); } - - // mark the first uninitialized jmp command (if there is one) - // by code.len() - index. - //TODO } pub fn compile_rule<'b: 'a>(&mut self, rule: &'b Rule) -> Result