aboutsummaryrefslogtreecommitdiff
path: root/src/interp/define.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2009-03-01 07:15:10 +0000
committerdos-reis <gdr@axiomatics.org>2009-03-01 07:15:10 +0000
commit18e478cfb26865634334253465dbda7e67dd8699 (patch)
tree191a334631bbde6905c7ac3fdc98eb9ea75902e3 /src/interp/define.boot
parentc42526006076b88ff2755f33eb1defd2e455e67e (diff)
downloadopen-axiom-18e478cfb26865634334253465dbda7e67dd8699.tar.gz
* interp/compiler.boot (compTopLevel): Initialize list of
optimizable domain constructors. (processInlineRequest): New. * interp/define.boot (spadCompileOrSetq): Tidy. (mutateToNothing): New. (doIt): Use it. Add support for inline directives. * interp/fnewmeta.lisp (PARSE-Inline): New. * interp/metalex.lisp (KEYWORDS): Include 'inline'.
Diffstat (limited to 'src/interp/define.boot')
-rw-r--r--src/interp/define.boot19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/interp/define.boot b/src/interp/define.boot
index c3173e82..6a2aecbb 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -1287,10 +1287,9 @@ spadCompileOrSetq (form is [nam,[lam,vl,body]]) ==
LAM_,EVALANDFILEACTQ ['PUT,MKQ nam,MKQ 'SPADreplace,MKQ macform]
sayBrightly ['" ",:bright nam,'"is replaced by",:bright body]
- if GET(nam,"SPADreplace") then
- form := [nam,[lam,vl,["DECLARE",["IGNORE",E]],body]]
- else
- form := [nam,[lam,vl,body]]
+ form :=
+ GET(nam,"SPADreplace") => [nam,[lam,vl,["DECLARE",["IGNORE",E]],body]]
+ [nam,[lam,vl,body]]
$insideCapsuleFunctionIfTrue =>
$optExportedFunctionReference =>
@@ -1439,6 +1438,12 @@ compSingleCapsuleItem(item,$predl,$e) ==
doIt(macroExpandInPlace(item,$e),$predl)
$e
+
+++ subroutine of doIt. Called to generate runtime noop insn.
+mutateToNothing item ==
+ RPLACA(item,'PROGN)
+ RPLACD(item,NIL)
+
doIt(item,$predl) ==
$GENNO: local:= 0
item is ['SEQ,:l,['exit,1,x]] =>
@@ -1483,8 +1488,10 @@ doIt(item,$predl) ==
for dom in doms repeat
sayBrightly ['" importing ",:formatUnabbreviated dom]
[.,.,$e] := compOrCroak(item,$EmptyMode,$e)
- RPLACA(item,'PROGN)
- RPLACD(item,NIL) -- creates a no-op
+ mutateToNothing item
+ item is ["%Inline",type] =>
+ processInlineRequest(type,$e)
+ mutateToNothing item
item is ["IF",:.] => doItIf(item,$predl,$e)
item is ["where",b,:l] => compOrCroak(item,$EmptyMode,$e)
item is ["MDEF",:.] => [.,.,$e]:= compOrCroak(item,$EmptyMode,$e)