aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog6
-rw-r--r--src/interp/c-util.boot17
-rw-r--r--src/interp/lisp-backend.boot6
3 files changed, 15 insertions, 14 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 068a1ac1..8adca31f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,11 @@
2012-05-04 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * interp/lisp-backend.boot (assembleCode): New.
+ * interp/c-util.boot (backendCompileSPADSLAM): Use it.
+ (backendCompile2): Likewise.
+
+2012-05-04 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* interp/clam.boot ($hashNode): Remove.
(compHashGlobal): Likewise.
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index 95980031..50861e5f 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -1535,15 +1535,8 @@ backendCompileSPADSLAM(name,args,body) ==
["PROGN",["SETQ",g2,app],
["SETQ",al,["cons5",["CONS",key,g2],al]],g2]]]]
SETANDFILE(al,nil) -- define the global cache.
- -- compile the worker function first.
- u := [auxfn,["LAMBDA",args,:body]]
- if $PrettyPrint then PRETTYPRINT u
- COMP370 u
- -- then compile the wrapper (which is the user-visible constructor).
- u := [name,["LAMBDA",args,code]]
- if $PrettyPrint then PRETTYPRINT u
- COMP370 u
- name
+ assembleCode [auxfn,["LAMBDA",args,:body]]
+ assembleCode [name,["LAMBDA",args,code]]
backendCompile2: %Code -> %Symbol
backendCompile2 code ==
@@ -1551,11 +1544,7 @@ backendCompile2 code ==
systemError ['"parenthesis error in: ", code]
symbolTarget(name,$clamList) => compClam(name,args,body,$clamList)
type = "SPADSLAM" => backendCompileSPADSLAM(name,args,body)
- body := [name,[type,args,:body]]
- if $PrettyPrint then PRETTYPRINT body
- if not $COMPILE then SAY '"No Compilation"
- else COMP370 body
- name
+ assembleCode [name,[type,args,:body]]
++ returns all fuild variables contained in `x'. Fuild variables are
++ identifiers starting with '$', except domain variable names.
diff --git a/src/interp/lisp-backend.boot b/src/interp/lisp-backend.boot
index e0d5a80e..bb61333e 100644
--- a/src/interp/lisp-backend.boot
+++ b/src/interp/lisp-backend.boot
@@ -805,3 +805,9 @@ COMPILE1 fun ==
['DEFMACRO,name,newArgs,:body]
compileLispDefinition(name,body)
body
+
+assembleCode x ==
+ if $PrettyPrint then PRETTYPRINT x
+ if not $COMPILE then SAY '"No Compilation"
+ else COMP370 x
+ first x