diff options
-rw-r--r-- | src/ChangeLog | 8 | ||||
-rw-r--r-- | src/interp/c-util.boot | 6 | ||||
-rw-r--r-- | src/interp/clam.boot | 6 | ||||
-rw-r--r-- | src/interp/define.boot | 4 | ||||
-rw-r--r-- | src/interp/lisp-backend.boot | 2 | ||||
-rw-r--r-- | src/interp/slam.boot | 10 |
6 files changed, 21 insertions, 15 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c72a27bc..f480c063 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,13 @@ 2012-05-03 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/c-util.boot: Use LAMBDA type in lieu of LAM. + * interp/clam.boot: Likewise. + * interp/define.boot: Likewise. + * interp/lisp-backend.boot (COMPILE1): Tidy. + * interp/slam.boot: Likewise. + +2012-05-03 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/g-opt.boot ($AbstractionOperator): Remove SLAM. * interp/c-util.boot (backendCompileSLAM): Remove. (backendCompileSPADSLAM): Tidy. diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index a67d2835..95980031 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -1427,11 +1427,11 @@ foldExportedFunctionReferences defs == for fun in defs repeat fun isnt [name,lamex] => nil getFunctionReplacement name => nil - lamex isnt ["LAM",vars,body] => nil + lamex isnt ["LAMBDA",vars,body] => nil body := replaceSimpleFunctions body form := expandableDefinition?(vars,body) => registerFunctionReplacement(name,form) - second(fun) := ["LAM",vars,["DECLARE",["IGNORE",last vars]],body] + second(fun) := ["LAMBDA",vars,["DECLARE",["IGNORE",last vars]],body] if sideEffectFree? body then registerRedexForm(name,vars,body) lamex.absBody := body @@ -1540,7 +1540,7 @@ backendCompileSPADSLAM(name,args,body) == if $PrettyPrint then PRETTYPRINT u COMP370 u -- then compile the wrapper (which is the user-visible constructor). - u := [name,["LAM",args,code]] + u := [name,["LAMBDA",args,code]] if $PrettyPrint then PRETTYPRINT u COMP370 u name diff --git a/src/interp/clam.boot b/src/interp/clam.boot index 52dd4081..4f7e6b25 100644 --- a/src/interp/clam.boot +++ b/src/interp/clam.boot @@ -143,7 +143,7 @@ compClam(op,argl,body,$clamList) == codeBody:= ['PROG,[g2,g3], :callCountCode, ['RETURN,['%when,secondPredPair,thirdPredPair]]] - mainFunction:= [op,['LAM,arg,codeBody]] + mainFunction:= [op,['LAMBDA,arg,codeBody]] computeFunction:= [auxfn,['LAMBDA,argl,:body]] -- compile generated function stub @@ -242,7 +242,7 @@ compHash(op,argl,body,cacheNameOrNil,eqEtc,countFl) == thirdPredPair:= ['%otherwise,putCode] codeBody:= mkSeq [:callCountCode, mkBind([[g2,getCode]],['%when,secondPredPair,thirdPredPair])] - mainFunction:= [op,['LAM,arg,codeBody]] + mainFunction:= [op,['LAMBDA,arg,codeBody]] computeFunction:= [auxfn,['LAMBDA,argl,:body]] -- compile generated function stub @@ -298,7 +298,7 @@ compHashGlobal(op,argl,body,cacheName,eqEtc,countFl) == ['%store,['tableValue,cacheName,putForm],computeValue] thirdPredPair := ['%otherwise,putCode] codeBody := ['%bind,[[g2,getCode]],['%when,secondPredPair,thirdPredPair]] - mainFunction:= [op,['LAM,arg,codeBody]] + mainFunction:= [op,['LAMBDA,arg,codeBody]] computeFunction:= [auxfn,['LAMBDA,argl,:body]] compileInteractive mainFunction compileInteractive computeFunction diff --git a/src/interp/define.boot b/src/interp/define.boot index 1d8ac2e9..57095ff6 100644 --- a/src/interp/define.boot +++ b/src/interp/define.boot @@ -1146,7 +1146,7 @@ compDefineCategory2(form,signature,body,m,e,$formalArgList) == body:= ["%bind",[[g:= gensym(),body]], ['%seq,['%store,['%tref,g,0],mkConstructor $form],g]] - fun := compile(db,[op',["LAM",sargl,body]],signature') + fun := compile(db,[op',["LAMBDA",sargl,body]],signature') -- 5. give operator a 'modemap property pairlis := pairList(form.args,$FormalMapVariableList) @@ -1938,7 +1938,7 @@ compDefineCapsuleFunction(db,df is ['DEF,form,signature,body], body' := replaceExitEtc(T.expr,catchTag,"TAGGEDreturn",$returnMode) body' := addArgumentConditions(body',$op) finalBody := ['%scope,catchTag,body'] - compile(db,[op',["LAM",[:argl,'_$],finalBody]],signature) + compile(db,[op',["LAMBDA",[:argl,'_$],finalBody]],signature) $functorStats:= addStats($functorStats,$functionStats) --7. give operator a 'value property diff --git a/src/interp/lisp-backend.boot b/src/interp/lisp-backend.boot index 2b739af8..c19da522 100644 --- a/src/interp/lisp-backend.boot +++ b/src/interp/lisp-backend.boot @@ -803,7 +803,7 @@ COMPILE1 fun == body := [['DSETQ,args,args'],:body] type is 'LAMBDA => ["&REST",args',"&AUX",:$Vars] type is 'MLAMBDA => ["&WHOLE",args',"&REST",gensym(),"&AUX",:$Vars] - coreError '"bad function type" + systemError ['"bad function type: ",:bright symbolName type] if $Decls ~= nil then body := [['DECLARE,['SPECIAL,:$Decls]],:body] body := diff --git a/src/interp/slam.boot b/src/interp/slam.boot index f3f278e7..3a1c0bba 100644 --- a/src/interp/slam.boot +++ b/src/interp/slam.boot @@ -188,8 +188,7 @@ reportFunctionCompilation(op,nam,argl,body,isRecursive) == ["PROG",[g2,g3],["RETURN",['%when,secondPredPair,thirdPredPair]]] -- cannot use envArg in next statement without redoing much -- of above. - lamex:= ["LAM",arg,codeBody] - mainFunction:= [nam,lamex] + mainFunction:= [nam,["LAMBDA",arg,codeBody]] computeFunction:= [auxfn,["LAMBDA",parms,body]] compileInteractive mainFunction compileInteractive computeFunction @@ -223,8 +222,7 @@ reportFunctionCacheAll(op,nam,argl,body) == ['%store,['tableValue,['%dynval,MKQ cacheName],g1], computeValue]] codeBody:= ["PROG",[g2],["RETURN",['%when,secondPredPair,thirdPredPair]]] - lamex:= ["LAM",arg,codeBody] - mainFunction:= [nam,lamex] + mainFunction:= [nam,["LAMBDA",arg,codeBody]] parms := [:argl, "envArg"] computeFunction:= [auxfn,["LAMBDA",parms,body]] compileInteractive mainFunction @@ -289,7 +287,7 @@ compileRecurrenceRelation(op,nam,argl,junk,[body,sharpArg,n,:initCode]) == ['store,['tableValue,["%dynval", MKQ stateNam],extraArgumentCode], newTripleCode] - computeFunction:= [auxfn,["LAM",cargl,cbody]] where + computeFunction:= [auxfn,["LAMBDA",cargl,cbody]] where cargl:= [:argl,lastArg] returnValue:= ["PROGN",newStateCode,first gsList] cbody:= @@ -305,7 +303,7 @@ compileRecurrenceRelation(op,nam,argl,junk,[body,sharpArg,n,:initCode]) == continueInit:= [["%LET",gIndex,["ELT",stateVar,0]], :[["%LET",g,["ELT",stateVar,i]] for g in gsList for i in 1..]] - mainFunction:= [nam,["LAM",margl,mbody]] where + mainFunction:= [nam,["LAMBDA",margl,mbody]] where margl:= [:argl,'envArg] max:= gensym() tripleCode := ['%pair,n,['%list,:initCode]] |