From c6efaa6ac903c17bd85eb51e672f80e9baa0ebc4 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Mon, 13 Jul 2009 22:36:51 +0000 Subject: * interp/metalex.lisp: "break" is now a keyword. * interp/fnewmeta.lisp (PARSE-Jump): New. * interp/compiler.boot (compAtom): Dipatch compilation of "break" and "iterate" to... (compBreak): ... here (compIterate): and here. (jumpFromLoop): New. (compRepeatOrCollect): Initialize $lookKind, $iterateCount, and $breakCount. Set exit point for loop bodies with 'iterate' expressions. * interp/parse.boot (parseAtom): Remove. (parseTran): Adjust. * algebra/outform.spad.pamphlet: Tidy. * interp/c-util.boot ($loopKind): Declare. ($repeatBodyLabel): Likewise. ($iterateCount): Likewise. ($breakCount): Likewise. --- src/interp/c-util.boot | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/interp/c-util.boot') diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index 3d050c51..34c1ce25 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -49,6 +49,19 @@ module c_-util where $scanIfTrue := false +++ If within a loop, which kind? (list comprehension or plain old loop) +$loopKind := nil + +++ If within a loop, the program point for the start of the body. +$repeatBodyLabel := nil + +++ The number of occurrance of `iterate' in a (plain old) loop. +$iterateCount := nil + +++ The number of occurrance of `break' in a (plain old) loop. +$breakCount := 0 + + +++ If non nil, holds compiled value of 'Rep' of the current domain. $Representation := nil -- cgit v1.2.3