aboutsummaryrefslogtreecommitdiff
path: root/src/interp/slam.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/slam.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/slam.boot')
-rw-r--r--src/interp/slam.boot16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/interp/slam.boot b/src/interp/slam.boot
index 9e950e61..9340fe96 100644
--- a/src/interp/slam.boot
+++ b/src/interp/slam.boot
@@ -1,6 +1,6 @@
-- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd.
-- All rights reserved.
--- Copyright (C) 2007-2008, Gabriel Dos Reis.
+-- Copyright (C) 2007-2009, Gabriel Dos Reis.
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
@@ -53,9 +53,10 @@ reportFunctionCompilation(op,nam,argl,body,isRecursive) ==
init => compileRecurrenceRelation(op,nam,argl,body,init)
cacheCount:= getCacheCount op
cacheCount = "all" => reportFunctionCacheAll(op,nam,argl,body)
+ parms := [:argl,"envArg"]
cacheCount = 0 or null argl =>
- fun:= [nam,["LAMBDA",[:argl,'envArg],
- declareGlobalVariables [minivectorName],body]]
+ fun:= [nam,["LAMBDA",parms,declareGlobalVariables [minivectorName],
+ :declareUnusedParameters(parms,body)]]
compileInteractive fun
nam
num :=
@@ -92,7 +93,8 @@ reportFunctionCompilation(op,nam,argl,body,isRecursive) ==
-- of above.
lamex:= ["LAM",arg,codeBody]
mainFunction:= [nam,lamex]
- computeFunction:= [auxfn,["LAMBDA",[:argl, 'envArg],body]]
+ computeFunction:= [auxfn,["LAMBDA",parms,
+ :declareUnusedParameters(parms,body)]]
compileInteractive mainFunction
compileInteractive computeFunction
cacheType:= "function"
@@ -125,7 +127,9 @@ reportFunctionCacheAll(op,nam,argl,body) ==
codeBody:= ["PROG",[g2],["RETURN",["COND",secondPredPair,thirdPredPair]]]
lamex:= ["LAM",arg,codeBody]
mainFunction:= [nam,lamex]
- computeFunction:= [auxfn,["LAMBDA",[:argl, 'envArg],body]]
+ parms := [:argl, "envArg"]
+ computeFunction:= [auxfn,["LAMBDA",parms,
+ :declareUnusedParameters(parms,body)]]
compileInteractive mainFunction
compileInteractive computeFunction
cacheType:= 'hash_-table
@@ -203,7 +207,7 @@ compileRecurrenceRelation(op,nam,argl,junk,[body,sharpArg,n,:initCode]) ==
continueInit:=
[["%LET",gIndex,["%ELT",stateVar,0]],
:[["%LET",g,["%ELT",stateVar,i]] for g in gsList for i in 1..]]
- mainFunction:= [nam,["LAM",margl,mbody]] where
+ mainFunction:= [nam,["LAM",margl,:declareUnusedParameters(margl,mbody)]] where
margl:= [:argl,'envArg]
max:= GENSYM()
tripleCode := ["CONS",n,["LIST",:initCode]]