From 8ea3a4b4aae5c6c1287bc4e48a2fcdd33a51a7f5 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Thu, 3 Feb 2011 17:14:17 +0000 Subject: * interp/c-util.boot: Replace COND with %when throught. Use %otherwise instead of %true where appropriate. * interp/define.boot: Likewise. * interp/functor.boot: Likewise. * interp/g-opt.boot: Likewise. * interp/i-code.boot: Likewise. * interp/i-output.boot: Likewise. * interp/i-spec1.boot: Likewise. * interp/i-spec2.boot: Likewise. * interp/i-util.boot: Likewise. * interp/info.boot: Likewise. * interp/modemap.boot: Likewise. * interp/nruncomp.boot: Likewise. * interp/pspad1.boot: Likewise. * interp/pspad2.boot: Likewise. * interp/slam.boot: Likewise. * interp/wi1.boot: Likewise. * interp/wi2.boot: Likewise. * interp/compiler.boot (canReturn): Don't test for COND anymore. --- src/interp/define.boot | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/interp/define.boot') diff --git a/src/interp/define.boot b/src/interp/define.boot index c9948720..76b8cc3c 100644 --- a/src/interp/define.boot +++ b/src/interp/define.boot @@ -1187,8 +1187,8 @@ addArgumentConditions($body,$functionName) == fn $argumentConditionList where fn clist == clist is [[n,untypedCondition,typedCondition],:.] => - ['COND,[typedCondition,fn rest clist], - ['%true,["argumentDataError",n, + ['%when,[typedCondition,fn rest clist], + ['%otherwise,["argumentDataError",n, MKQ untypedCondition,MKQ $functionName]]] null clist => $body systemErrorHere ["addArgumentConditions",clist] @@ -1340,10 +1340,10 @@ uncons x == --% CAPSULE bootStrapError(functorForm,sourceFile) == - ['COND, _ + ['%when, _ ['$bootStrapMode, _ ['%veclit,mkTypeForm functorForm,nil,nil,nil,nil,nil]], - [''T, ['systemError,['%listlit,'"%b",MKQ functorForm.op,'"%d",'"from", _ + ['%otherwise, ['systemError,['%listlit,'"%b",MKQ functorForm.op,'"%d",'"from", _ '"%b",MKQ namestring sourceFile,'"%d",'"needs to be compiled"]]]] registerInlinableDomain(x,e) == @@ -1363,10 +1363,10 @@ compAdd(['add,$addForm,capsule],m,e) == $bootStrapMode = true => if $addForm is ["%Comma",:.] then code := nil else [code,m,e]:= comp($addForm,m,e) - [['COND, _ + [['%when, _ ['$bootStrapMode, _ code],_ - [''T, ['systemError,['%listlit,'"%b",MKQ $functorForm.op,'"%d",'"from", _ + ['%otherwise, ['systemError,['%listlit,'"%b",MKQ $functorForm.op,'"%d",'"from", _ '"%b",MKQ namestring _/EDITFILE,'"%d",'"needs to be compiled"]]]],m,e] $addFormLhs: local:= $addForm if $addForm is ["SubDomain",domainForm,predicate] then @@ -1569,8 +1569,8 @@ doItIf(item is [.,p,x,y],$predl,$e) == if y~="%noBranch" then compSingleCapsuleItem(y,[["not",p],:$predl],getInverseEnvironment(p,olde)) y':=localExtras(oldFLP) - item.op := "COND" - item.rest := [[p',x,:x'],['%true,y,:y']] + item.op := '%when + item.rest := [[p',x,:x'],['%otherwise,y,:y']] where localExtras(oldFLP) == EQ(oldFLP,$functorLocalParameters) => nil flp1:=$functorLocalParameters @@ -1691,7 +1691,7 @@ DomainSubstitutionFunction(parameters,body) == --should not bother if it will only be called once name:= INTERN strconc(KAR $definition,";CAT") SETANDFILE(name,nil) - body:= ["COND",[name],['%true,['%store,name,body]]] + body:= ['%when,[name],['%otherwise,['%store,name,body]]] body @@ -1712,7 +1712,7 @@ compSignature(opsig,pred,env) == compCategoryItem(x,predl,env) == x is nil => nil --1. if x is a conditional expression, recurse; otherwise, form the predicate - x is ["COND",[p,e]] => + x is ['%when,[p,e]] => predl':= [p,:predl] e is ["PROGN",:l] => for y in l repeat compCategoryItem(y,predl',env) -- cgit v1.2.3