diff options
Diffstat (limited to 'src/interp/compiler.boot')
-rw-r--r-- | src/interp/compiler.boot | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot index 5022d5dc..28a4cbf3 100644 --- a/src/interp/compiler.boot +++ b/src/interp/compiler.boot @@ -620,8 +620,8 @@ compFormWithModemap(form,m,e,modemap) == (c:=get(z,'condition,e)) and c is [["case",=z,c1]] and (c1 is [":",=(second argl),=m] or EQ(c1,second argl) ) => --- first is a full tag, as placed by getInverseEnvironment --- second is what getSuccessEnvironment will place there + -- first is a full tag, as placed by getInverseEnvironment + -- second is what getSuccessEnvironment will place there ["CDR",z] ["call",:form'] e':= @@ -843,7 +843,6 @@ setqSingle(id,val,m,E) == e':= augModemapsFromDomain1(id,val,e') --all we do now is to allocate a slot number for lhs --e.g. the %LET form below will be changed by putInLocalDomainReferences ---+ if k := NRTassocIndex(id) then form := ["setShellEntry","$",k,x] else form:= @@ -862,18 +861,18 @@ setqMultiple(nameList,val,m,e) == val is ["CONS",:.] and m=$NoValueMode => setqMultipleExplicit(nameList,uncons val,m,e) val is ["%Comma",:l] and m=$NoValueMode => setqMultipleExplicit(nameList,l,m,e) - 1 --create a gensym, %add to local environment, compile and assign rhs + -- 1. create a gensym, %add to local environment, compile and assign rhs g:= genVariable() e:= addBinding(g,nil,e) T:= [.,m1,.]:= compSetq1(g,val,$EmptyMode,e) or return nil e:= put(g,"mode",m1,e) [x,m',e]:= convert(T,m) or return nil - 1.1 --exit if result is a list + -- 1.1. exit if result is a list m1 is ["List",D] => for y in nameList repeat e:= put(y,"value",[genSomeVariable(),D,$noEnv],e) convert([["PROGN",x,["%LET",nameList,g],g],m',e],m) - 2 --verify that the #nameList = number of parts of right-hand-side + -- 2. verify that the #nameList = number of parts of right-hand-side selectorModePairs:= --list of modes decompose(m1,#nameList,e) or return nil where @@ -884,7 +883,7 @@ setqMultiple(nameList,val,m,e) == stackMessage('"no multiple assigns to mode: %1p",[t]) #nameList~=#selectorModePairs => stackMessage('"%1b must decompose into %2 components",[val,#nameList]) - 3 --generate code; return + -- 3. generate code; return assignList:= [([.,.,e]:= compSetq1(x,["elt",g,y],z,e) or return "failed").expr for x in nameList for [y,:z] in selectorModePairs] |