From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2008-09-20 06:24:25
|
On Fri, Sep 19, 2008 at 11:47 PM, Ville Voutilainen <vil...@gm...> wrote: > So, I created a helper function bindParameters, which takes care of > the recurring block > > if (arity != arityValue) > { > if (optionalParameters != null) > bindOptionalParameterDefaults(ext, thread); > if (restVar != null) > bindArg(restVar, NIL, ext, thread); > if (keywordParameters != null) > bindKeywordParameterDefaults(ext, thread); > } > if (auxVars != null) > bindAuxVars(ext, thread); > > The patch doesn't cause regressions and most of it is code deletion again. Yes. I saw. Nice cleanup. I committed the patch. > While this kind of cleanup is nice, I think there's room for even > better cleanup. > > I looked at Lisp.java, where all this stuff starts, in > > public static final LispObject funcall(LispObject fun, LispObject[] args, > LispThread thread) > > This function does a switch-case on parameter count and then invokes the > 0-8 argument versions or the array version. Erik, I want to try removing the > switch and the 0-8 argument versions and just use the array version, > do you find any objections to that idea? I don't have a real problem with the change, except that - when looking at Primitives.java - the change looks rather invasive: you may need to rewrite most of Primitives, or so it looks to me. Do you have any ideas about the approach? Bye, Erik. |