aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2012-05-05 03:03:21 +0000
committerdos-reis <gdr@axiomatics.org>2012-05-05 03:03:21 +0000
commitbc043d9ee39d772cc767d98a80cb5c0ddffe6b19 (patch)
treea85c0a60f6c2ba57eb11b75a323abd218c07758a /src
parent6c9193053770172afdd6bb0dc39881f934f06724 (diff)
downloadopen-axiom-bc043d9ee39d772cc767d98a80cb5c0ddffe6b19.tar.gz
* interp/define.boot (compileConstructor1): Don't call
clearConstructorCache here. Simplify. (compileConstructor): Call clearConstructorCache here. * interp/c-util.boot (backendCompile2): Do not test for membership of $clamList. * interp/clam.boot (compHash): Use compQuietly instead of compileQuietly.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog10
-rw-r--r--src/interp/c-util.boot1
-rw-r--r--src/interp/clam.boot2
-rw-r--r--src/interp/define.boot21
4 files changed, 18 insertions, 16 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 4b301309..235c92bd 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,15 @@
2012-05-04 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * interp/define.boot (compileConstructor1): Don't call
+ clearConstructorCache here. Simplify.
+ (compileConstructor): Call clearConstructorCache here.
+ * interp/c-util.boot (backendCompile2): Do not test for membership
+ of $clamList.
+ * interp/clam.boot (compHash): Use compQuietly instead of
+ compileQuietly.
+
+2012-05-04 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* interp/clam.boot (compHash): Use compQuietly in lieu of
compileInteractive.
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index 50861e5f..e43cd164 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -1542,7 +1542,6 @@ backendCompile2: %Code -> %Symbol
backendCompile2 code ==
code isnt [name,[type,args,:body]] =>
systemError ['"parenthesis error in: ", code]
- symbolTarget(name,$clamList) => compClam(name,args,body,$clamList)
type = "SPADSLAM" => backendCompileSPADSLAM(name,args,body)
assembleCode [name,[type,args,:body]]
diff --git a/src/interp/clam.boot b/src/interp/clam.boot
index 02b3fa06..64d9fc14 100644
--- a/src/interp/clam.boot
+++ b/src/interp/clam.boot
@@ -243,7 +243,7 @@ compHash(op,argl,body,cacheNameOrNil,eqEtc,countFl) ==
if $reportCompilation then
sayBrightlyI bright '"Generated LISP code for function:"
pp computeFunction
- compileQuietly [computeFunction]
+ compQuietly [computeFunction]
if cacheNameOrNil = nil then
cacheType:=
diff --git a/src/interp/define.boot b/src/interp/define.boot
index 57095ff6..25ab7aea 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -2084,27 +2084,20 @@ spadCompileOrSetq(db,form is [nam,[lam,vl,body]]) ==
compileConstructor(db,form)
compileConstructor(db,form) ==
- u:= compileConstructor1(db,form)
+ u := compileConstructor1(db,form)
clearClams() --clear all CLAMmed functions
+ clearConstructorCache u --clear cache for constructor
u
compileConstructor1(db,form:=[fn,[key,vl,:bodyl]]) ==
-- fn is the name of some category/domain/package constructor;
-- we will cache all of its values on $ConstructorCache with reference
-- counts
- $clamList: local := nil
- lambdaOrSlam :=
- dbConstructorKind db = 'category => 'SPADSLAM
- dbInstanceCache db = nil => 'LAMBDA
- $clamList:=
- [[fn,"$ConstructorCache",'domainEqualList,'count],:$clamList]
- 'LAMBDA
- compForm:= [[fn,[lambdaOrSlam,vl,:bodyl]]]
- u :=
- dbConstructorKind db = 'category => compAndDefine compForm
- backendCompile compForm
- clearConstructorCache fn --clear cache for constructor
- first u
+ dbConstructorKind db = 'category =>
+ first compAndDefine [[fn,['SPADSLAM,vl,:bodyl]]]
+ dbInstanceCache db = nil =>
+ first backendCompile [[fn,['LAMBDA,vl,:bodyl]]]
+ compClam(fn,vl,bodyl,[[fn,"$ConstructorCache",'domainEqualList,'count]])
constructMacro: %Form -> %Form
constructMacro (form is [nam,[lam,vl,body]]) ==