From 13234d734eae71bbeb29c5280f27b0bf6eb3a839 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Thu, 8 Dec 2011 02:40:09 +0000 Subject: * interp/g-opt.boot (tranformIF!): New. (optimize!): Likewise. Abstract from optimizeFunctionDef. (optimize): New. (optimizeFunctionDef): Use optimize!. (simplifyVMForm): Do not call optIF2COND. (optIF2COND): Remove. * interp/compiler.boot (compHasFormat): Use optimize! in lieu of simplifyVMForm. * interp/nruncomp.boot (NRTencode): Use optimize. (NRTsetVector4a): Likewise. --- src/interp/nruncomp.boot | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/interp/nruncomp.boot') diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot index cb78812a..852e5729 100644 --- a/src/interp/nruncomp.boot +++ b/src/interp/nruncomp.boot @@ -114,14 +114,14 @@ NRTencode(db,x,y) == encode(db,x,y,true) where encode(db,x,compForm,firstTime) = [op,:[encode(db,y,z,false) for y in x.args for z in compForm.args]] -- enumeration constants are like field names, they do not need -- to be encoded. - ['%eval,NRTreplaceAllLocalReferences(db,copyTree simplifyVMForm compForm)] + ['%eval,NRTreplaceAllLocalReferences(db,optimize compForm)] symbolMember?(x,$formalArgList) => v := $FormalMapVariableList.(symbolPosition(x,$formalArgList)) firstTime => ["local",v] v x is "$$" => x compForm is [.,:.] => - ['%eval,NRTreplaceAllLocalReferences(db,copyTree simplifyVMForm compForm)] + ['%eval,NRTreplaceAllLocalReferences(db,optimize compForm)] quote compForm --------------FUNCTIONS CALLED DURING CAPSULE FUNCTION COMPILATION------------- @@ -550,7 +550,7 @@ reverseCondlist cl == NRTsetVector4a(sig,form,cond) == sig is '$ => domainList := - [simplifyVMForm COPY comp(d,$EmptyMode,$e).expr or d + [optimize comp(d,$EmptyMode,$e).expr or d for d in categoryPrincipals $domainShell] $uncondList := append(domainList,$uncondList) if isCategoryForm(form,$e) then $uncondList := [form,:$uncondList] -- cgit v1.2.3