From 6fc86e66f58fb9a9265121b847e7227ee133fd5b Mon Sep 17 00:00:00 2001 From: dos-reis Date: Thu, 3 May 2012 19:31:30 +0000 Subject: * interp/define.boot (compDefineFunctor1): Use LAMBDA for the resulting functor if not cachable. * interp/clam.boot (compClam): Tidy. (compHash): Likewise. (compHashGlobal): Likewise. * interp/i-eval.boot (evalForm): Use LAMBDA, not LAM. * interp/i-coerce.boot (getSubDomainPredicate): Use %lambda not LAM. --- src/ChangeLog | 10 ++++++++++ src/interp/clam.boot | 9 +++------ src/interp/define.boot | 2 +- src/interp/i-coerce.boot | 2 +- src/interp/i-eval.boot | 4 ++-- 5 files changed, 17 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index bd88baab..2ed9ae3e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2012-05-03 Gabriel Dos Reis + + * interp/define.boot (compDefineFunctor1): Use LAMBDA for the + resulting functor if not cachable. + * interp/clam.boot (compClam): Tidy. + (compHash): Likewise. + (compHashGlobal): Likewise. + * interp/i-eval.boot (evalForm): Use LAMBDA, not LAM. + * interp/i-coerce.boot (getSubDomainPredicate): Use %lambda not LAM. + 2012-05-03 Gabriel Dos Reis * interp/c-util.boot (makeWorkerName): New. diff --git a/src/interp/clam.boot b/src/interp/clam.boot index 496a1f0c..52dd4081 100644 --- a/src/interp/clam.boot +++ b/src/interp/clam.boot @@ -143,8 +143,7 @@ compClam(op,argl,body,$clamList) == codeBody:= ['PROG,[g2,g3], :callCountCode, ['RETURN,['%when,secondPredPair,thirdPredPair]]] - lamex:= ['LAM,arg,codeBody] - mainFunction:= [op,lamex] + mainFunction:= [op,['LAM,arg,codeBody]] computeFunction:= [auxfn,['LAMBDA,argl,:body]] -- compile generated function stub @@ -243,8 +242,7 @@ compHash(op,argl,body,cacheNameOrNil,eqEtc,countFl) == thirdPredPair:= ['%otherwise,putCode] codeBody:= mkSeq [:callCountCode, mkBind([[g2,getCode]],['%when,secondPredPair,thirdPredPair])] - lamex:= ['LAM,arg,codeBody] - mainFunction:= [op,lamex] + mainFunction:= [op,['LAM,arg,codeBody]] computeFunction:= [auxfn,['LAMBDA,argl,:body]] -- compile generated function stub @@ -300,8 +298,7 @@ compHashGlobal(op,argl,body,cacheName,eqEtc,countFl) == ['%store,['tableValue,cacheName,putForm],computeValue] thirdPredPair := ['%otherwise,putCode] codeBody := ['%bind,[[g2,getCode]],['%when,secondPredPair,thirdPredPair]] - lamex := ['LAM,arg,codeBody] - mainFunction:= [op,lamex] + mainFunction:= [op,['LAM,arg,codeBody]] computeFunction:= [auxfn,['LAMBDA,argl,:body]] compileInteractive mainFunction compileInteractive computeFunction diff --git a/src/interp/define.boot b/src/interp/define.boot index 025eb880..1d8ac2e9 100644 --- a/src/interp/define.boot +++ b/src/interp/define.boot @@ -1484,7 +1484,7 @@ compDefineFunctor1(df is ['DEF,form,signature,body],m,$e,$formalArgList) == T:= compFunctorBody(db,body,rettype,$e) body':= T.expr lamOrSlam := - dbInstanceCache db = nil => 'LAM + dbInstanceCache db = nil => 'LAMBDA 'SPADSLAM fun := compile(db,dbSubstituteFormals(db,[op',[lamOrSlam,form.args,body']]),signature') --The above statement stops substitutions gettting in one another's way diff --git a/src/interp/i-coerce.boot b/src/interp/i-coerce.boot index 43bf5694..919a6979 100644 --- a/src/interp/i-coerce.boot +++ b/src/interp/i-coerce.boot @@ -929,7 +929,7 @@ getSubDomainPredicate(tSuper, tSub, pred) == predfn := tableValue($superHash, [tSuper,:tSub]) => predfn arg := gensym() [predfn] := compileInteractive - [gensym(),['LAM,[arg],substitute(arg,"#1", pred)]] + [gensym(),['%lambda,[arg],substitute(arg,"#1", pred)]] tableValue($superHash, [tSuper,:tSub]) := predfn predfn diff --git a/src/interp/i-eval.boot b/src/interp/i-eval.boot index 0ccb74a6..b43c83e0 100644 --- a/src/interp/i-eval.boot +++ b/src/interp/i-eval.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2011, Gabriel Dos Reis. +-- Copyright (C) 2007-2012, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -243,7 +243,7 @@ evalForm(op,opName,argl,mmS) == ['SPADCALL,:form,freeFun] fun is ['XLAM,xargs,:xbody] => rec := first form - ['FUNCALL,['function , ['LAMBDA,xargs,:xbody]],:take(#xargs, form)] + ['FUNCALL,['function, ['LAMBDA,xargs,:xbody]],:take(#xargs, form)] dcVector := evalDomain dc fun0 := newType? CAAR mm => -- cgit v1.2.3