aboutsummaryrefslogtreecommitdiff
path: root/src/interp/i-spec1.boot
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp/i-spec1.boot')
-rw-r--r--src/interp/i-spec1.boot33
1 files changed, 3 insertions, 30 deletions
diff --git a/src/interp/i-spec1.boot b/src/interp/i-spec1.boot
index 5cf7b7d6..6b80b41c 100644
--- a/src/interp/i-spec1.boot
+++ b/src/interp/i-spec1.boot
@@ -436,35 +436,6 @@ evalCOERCE(op,tree,m) ==
--% Handlers for COLLECT
-transformCollect [:itrl,body] ==
- -- syntactic transformation for COLLECT form, called from mkAtree1
- iterList:=[:iterTran1 for it in itrl] where iterTran1() ==
- it is ["STEP",index,lower,step,:upperList] =>
- [["STEP",index,mkAtree1 lower,mkAtree1 step,:[mkAtree1 upper
- for upper in upperList]]]
- it is ["IN",index,s] =>
- [["IN",index,mkAtree1 s]]
- it is ["ON",index,s] =>
- [['IN,index,mkAtree1 ['tails,s]]]
- it is ["WHILE",b] =>
- [["WHILE",mkAtree1 b]]
- it is ["|",pred] =>
- [["SUCHTHAT",mkAtree1 pred]]
- it is [op,:.] and (op in '(VALUE UNTIL)) => nil
- bodyTree:=mkAtree1 body
- iterList:=NCONC(iterList,[:iterTran2 for it in itrl]) where
- iterTran2() ==
- it is ["STEP",:.] => nil
- it is ["IN",:.] => nil
- it is ["ON",:.] => nil
- it is ["WHILE",:.] => nil
- it is [op,b] and (op in '(UNTIL)) =>
- [[op,mkAtree1 b]]
- it is ["|",pred] => nil
- keyedSystemError("S2GE0016",
- ['"transformCollect",'"Unknown type of iterator"])
- [:iterList,bodyTree]
-
upCOLLECT t ==
-- $compilingLoop variable insures that throw to interp-only mode
-- goes to the outermost loop.
@@ -511,7 +482,9 @@ upLoopIters itrl ==
-- following is an optimization
typeIsASmallInteger(get(index,'mode,$env)) =>
RPLACA(iter,'ISTEP)
- NIL -- should have error msg here?
+ -- at this point, the AST may already be badly corrupted,
+ -- but better late than never.
+ throwKeyedMsg("S2IS0061",nil)
upLoopIterIN(iter,index,s) ==
iterMs := bottomUp s