aboutsummaryrefslogtreecommitdiff
path: root/src/interp/c-util.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2009-07-12 17:10:18 +0000
committerdos-reis <gdr@axiomatics.org>2009-07-12 17:10:18 +0000
commit3838fe22164e91e9d5269f801c2b668682ccde83 (patch)
tree68200708174170f1d1ce3573e7d8cf77a4af4d81 /src/interp/c-util.boot
parent9a91238840354e46c0f1d898881d5ebf8c395520 (diff)
downloadopen-axiom-3838fe22164e91e9d5269f801c2b668682ccde83.tar.gz
* algebra/mkfunc.spad.pamphlet
(mkDefun$MakeFloatCompiledFunction): Tidy. * interp/c-util.boot (declareUnusedParameters): New. * interp/i-map.boot: Use it. * interp/i-spec1.boot: Likewise. * interp/slam.boot: Likewise. * lib/cfuns-c.c (writeablep): Document MinGW/MSYS bug work around.
Diffstat (limited to 'src/interp/c-util.boot')
-rw-r--r--src/interp/c-util.boot8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index 945ac812..3d050c51 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -41,6 +41,7 @@ module c_-util where
replaceSimpleFunctions: %Form -> %Form
foldExportedFunctionReferences: %List -> %List
diagnoseUnknownType: (%Mode,%Env) -> %Form
+ declareUnusedParameters: (%List,%Code) -> %List
--%
@@ -121,6 +122,13 @@ wantArgumentsAsTuple: (%List,%Signature) -> %Boolean
wantArgumentsAsTuple(args,sig) ==
isHomoegenousVarargSignature sig and #args ^= #sig
+++ We are about to seal the (Lisp) definition of a function.
+++ Augment the `body' with a declaration for those `parms'
+++ that are unused.
+declareUnusedParameters(parms,body) ==
+ unused := [p for p in parms | not CONTAINED(p,body)]
+ null unused => [body]
+ [["DECLARE",["IGNORE",:unused]],body]
devaluate d ==
not REFVECP d => d