aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2012-05-04 13:41:44 +0000
committerdos-reis <gdr@axiomatics.org>2012-05-04 13:41:44 +0000
commit4e59a0f4d0ce881f79ae146fce1f85467755bb99 (patch)
tree27b1b188d6d26657f9bd044f3a5768cbad8085c7 /src/interp
parent48aa2726d4d5feaeea046d94fa8cf60da808fa17 (diff)
downloadopen-axiom-4e59a0f4d0ce881f79ae146fce1f85467755bb99.tar.gz
* interp/clam.boot ($hashNode): Remove.
(compHashGlobal): Likewise.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/clam.boot51
1 files changed, 1 insertions, 50 deletions
diff --git a/src/interp/clam.boot b/src/interp/clam.boot
index c551f415..e5d2f4ec 100644
--- a/src/interp/clam.boot
+++ b/src/interp/clam.boot
@@ -68,13 +68,8 @@ namespace BOOT
-- see definition of backendCompile2 in c-util which calls clamComp below
++
-$hashNode := [[]]
-
-++
$failed := '"failed"
--- see SETQ LISP for initial def of $hashNode
-
compClam(op,argl,body,$clamList) ==
--similar to reportFunctionCompilation in SLAM BOOT
if $InteractiveMode then startTimingProcess 'compilation
@@ -165,11 +160,7 @@ compClam(op,argl,body,$clamList) ==
op
compHash(op,argl,body,cacheNameOrNil,eqEtc,countFl) ==
- --Note: when cacheNameOrNil~=nil, it names a global hashtable
-
--- cacheNameOrNil => compHashGlobal(op,argl,body,cacheNameOrNil,eqEtc,countFl)
--- This branch to compHashGlobal is now omitted; as a result,
--- entries will be stored on the global hashtable in a uniform way:
+-- Entries will be stored on the global hashtable in a uniform way:
-- (<argument list>, <reference count>,:<value>)
-- where the reference count is optional
@@ -269,46 +260,6 @@ compHash(op,argl,body,cacheNameOrNil,eqEtc,countFl) ==
LAM_,EVALANDFILEACTQ cacheResetCode
op
-compHashGlobal(op,argl,body,cacheName,eqEtc,countFl) ==
- --Note: when cacheNameOrNil~=nil, it names a global hashtable
-
- if (not (eqEtc in '(UEQUAL))) then
- sayBrightly "for hash option, only EQ, CVEC, and UEQUAL are allowed"
- auxfn:= makeSymbol strconc(op,'";")
- g1:= gensym() --argument or argument list
- [arg,cacheArgKey,computeValue] :=
- -- arg: to be used as formal argument of lambda construction;
- -- cacheArgKey: the form used to look up the value in the cache
- -- computeValue: the form used to compute the value from arg
- application:=
- argl = nil => [auxfn]
- argl is [.] => [auxfn,g1] --g1 is a parameter
- ['APPLY,['function,auxfn],g1] --g1 is a parameter list
- [g1,['consForHashLookup,MKQ op,g1],application]
- g2 := gensym() --value computed by calling function
- returnFoundValue:=
- countFl => ['CDRwithIncrement,g2]
- g2
- getCode:= ['tableValue,cacheName,cacheArgKey]
- secondPredPair:= [g2,returnFoundValue]
- putForm:= ['%pair,MKQ op,g1]
- putCode:=
- countFl =>
- ['%store,['tableValue,cacheName,putForm],['%pair,1,computeValue]]
- ['%store,['tableValue,cacheName,putForm],computeValue]
- thirdPredPair := ['%otherwise,putCode]
- codeBody := ['%bind,[[g2,getCode]],['%when,secondPredPair,thirdPredPair]]
- mainFunction:= [op,['LAMBDA,arg,codeBody]]
- computeFunction:= [auxfn,['LAMBDA,argl,:body]]
- compileInteractive mainFunction
- compileInteractive computeFunction
- op
-
-consForHashLookup(a,b) ==
- $hashNode.first := a
- $hashNode.rest := b
- $hashNode
-
CDRwithIncrement x ==
x.first := first x + 1
rest x