diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 6 | ||||
-rw-r--r-- | src/algebra/integer.spad.pamphlet | 2 | ||||
-rw-r--r-- | src/interp/c-util.boot | 3 |
3 files changed, 10 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c1f7a1ad..4e2b98a0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2011-11-28 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/c-util.boot (inlineDirectCall): Inline a non-side effect + free argument in a unary pure function call if it is used exactly once. + * algebra/integer.spad.pamphlet (Integer) [reducedSystem]: Fix typo. + +2011-11-28 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/define.boot (encodeCatform): Handle $ here. * interp/nruncomp.boot (deltaTran): assocIndex now handles $. (getLocalIndex): Likewise. diff --git a/src/algebra/integer.spad.pamphlet b/src/algebra/integer.spad.pamphlet index 198b3afa..e7de9302 100644 --- a/src/algebra/integer.spad.pamphlet +++ b/src/algebra/integer.spad.pamphlet @@ -152,7 +152,7 @@ Integer: IntegerNumberSystem with reducedSystem(m:Matrix %, v:Vector %): Record(mat:Matrix(Integer), vec:Vector(Integer)) == - [m pretend Matrix(Integer), vec pretend Vector(Integer)] + [m pretend Matrix(Integer), v pretend Vector(Integer)] abs(x) == %iabs x random() == random()$Lisp diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index e9643db3..5cd74206 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -1321,6 +1321,9 @@ inlineDirectCall call == newparms := [gensym() for p in parms] body := applySubst(pairList(parms,newparms),body) applySubst!(pairList(newparms,call.args),body) + -- a non-side effect free argument used exactly once is OK. + parms is [p] and numOfOccurencesOf(p,body) = 1 => + substitute(first call.args,p,body) -- get cute later. call call |