diff options
author | dos-reis <gdr@axiomatics.org> | 2008-10-13 04:44:48 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-10-13 04:44:48 +0000 |
commit | a619487f9feb4a530244171b94decfccce57af8b (patch) | |
tree | 5a0f52493070180df83c72571b54afc514b249a3 /src/interp/define.boot | |
parent | af99530af5531146fb9b56b7fc58fe6209db0404 (diff) | |
download | open-axiom-a619487f9feb4a530244171b94decfccce57af8b.tar.gz |
Add support for Lisp declarations in generated Lisp code.
* interp/i-map.boot (compileCoerceMap): Tell backend that
minivector is global.
* interp/i-spec1.boot (compileADEFBody): Likewise.
* interp/slam.boot (reportFunctionCompilation): Likewise.
* interp/define.boot (spadCompileOrSetq): Tell backend to ignore
last argument for simple functions.
* interp/c-util.boot (skipDeclarations): New.
(lastDeclarationNode): Likewise.
(declareGlobalVariables): Likewise.
(transformToBackendCode): Use them to allow for Lisp
declarations in middle-end forms.
* interp/sys-driver.boot (AxiomCore::%sysInit): Reading Lisp level
Floating point numbers default to double precision.
* algebra/strap: Update.
Diffstat (limited to 'src/interp/define.boot')
-rw-r--r-- | src/interp/define.boot | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/interp/define.boot b/src/interp/define.boot index ae460b75..3104d044 100644 --- a/src/interp/define.boot +++ b/src/interp/define.boot @@ -1246,7 +1246,6 @@ spadCompileOrSetq (form is [nam,[lam,vl,body]]) == clearReplacement nam -- Make sure we have fresh info if $optReplaceSimpleFunctions then body := replaceSimpleFunctions body - form := [nam,[lam,vl,body]] if vl is [:vl',E] and body is [nam',: =vl'] then LAM_,EVALANDFILEACTQ ['PUT,MKQ nam,MKQ 'SPADreplace,MKQ nam'] @@ -1256,6 +1255,12 @@ spadCompileOrSetq (form is [nam,[lam,vl,body]]) == macform := ['XLAM,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]] + $insideCapsuleFunctionIfTrue => $optExportedFunctionReference => $capsuleFunctionStack := [form,:$capsuleFunctionStack] |