From: Ville V. <vil...@gm...> - 2008-09-29 21:09:52
Attachments:
Closure.java.cleanup5.patch
|
Yet another cleanup, consolidate the try blocks in 1-8 parameter execute functions into bindParameters, rename helper to bindParametersAndExecute. Tests still run, no regressions, net win 47 lines. Next cleanup patch for Closure.java will most be using the new for loop where applicable. I also intend to look at SpecialOperators.java and see if progn invocations can be used there in place of evaluating loops, if there's noone else doing that in the meantime..? That's a very minor thing, only two eval loops in there. -VJV- |
From: Ville V. <vil...@gm...> - 2008-09-29 21:56:18
|
> Hi Ville, > I'm not clear enough (yet) about the semantics to tackle this, but please > keep suggesting minor things for the less expert among us (like me) to take > a shot at. I'm keen to make whatever small contributions I can. > I'll have another look tomorrow and see if I can identify exactly what's > wanted. Well, usually you see code blocks like while (args != NIL) { result = eval(args.car(), env, thread); args = args.cdr(); } return result; This can be replaced with return progn(args, env, thread); There's a bunch of these in Primitives.java. I found two in SpecialOperators.java. A simple grep finds more. I used grep 'result = eval(' *.java to get started. There aren't actually very many of these left. -VJV- |
From: Philip H. <phi...@in...> - 2008-10-01 20:09:01
|
On 29 Sep, 2008, at 10:56 pm, Ville Voutilainen wrote: > Well, usually you see code blocks like > while (args != NIL) > { > result = eval(args.car(), env, thread); > args = args.cdr(); > } > return result; > > This can be replaced with > > return progn(args, env, thread); > > There's a bunch of these in Primitives.java. I found two in > SpecialOperators.java. > A simple grep finds more. I used > grep 'result = eval(' *.java to get started. There aren't actually > very many of these > left. I'm doing SpecialOperators now. -- Phil Hudson PGP/GnuPG ID: 0x887DCA63 |
From: Philip H. <phi...@in...> - 2008-10-01 20:11:30
Attachments:
SpecialOperators.java.cleanup2.patch
|
On 29 Sep, 2008, at 10:56 pm, Ville Voutilainen wrote: > Well, usually you see code blocks like > while (args != NIL) > { > result = eval(args.car(), env, thread); > args = args.cdr(); > } > return result; > > This can be replaced with > > return progn(args, env, thread); > > There's a bunch of these in Primitives.java. I found two in > SpecialOperators.java. > A simple grep finds more. I used > grep 'result = eval(' *.java to get started. There aren't actually > very many of these > left. Done for SpecialOperators |
From: Philip H. <phi...@in...> - 2008-09-29 22:44:30
|
On 29 Sep, 2008, at 10:09 pm, Ville Voutilainen wrote: > I also intend to look at SpecialOperators.java and see if progn > invocations can > be used there in place of evaluating loops, if there's noone else > doing that > in the meantime..? That's a very minor thing, only two eval loops > in there. Hi Ville, I'm not clear enough (yet) about the semantics to tackle this, but please keep suggesting minor things for the less expert among us (like me) to take a shot at. I'm keen to make whatever small contributions I can. I'll have another look tomorrow and see if I can identify exactly what's wanted. Regards, Phil -- Phil Hudson PGP/GnuPG ID: 0x887DCA63 |
From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2008-09-30 20:57:58
|
Committed. Thanks for the patch! Bye, Erik. On Mon, Sep 29, 2008 at 11:09 PM, Ville Voutilainen <vil...@gm...> wrote: > Yet another cleanup, consolidate the try blocks in 1-8 parameter > execute functions > into bindParameters, rename helper to bindParametersAndExecute. Tests still > run, no regressions, net win 47 lines. > > Next cleanup patch for Closure.java will most be using the new for loop where > applicable. > > I also intend to look at SpecialOperators.java and see if progn invocations can > be used there in place of evaluating loops, if there's noone else doing that > in the meantime..? That's a very minor thing, only two eval loops in there. > > -VJV- > |
From: Philip H. <phi...@in...> - 2008-10-01 20:14:53
|
On 29 Sep, 2008, at 10:56 pm, Ville Voutilainen wrote: > Well, usually you see code blocks like > while (args != NIL) > { > result = eval(args.car(), env, thread); > args = args.cdr(); > } > return result; > > This can be replaced with > > return progn(args, env, thread); > > There's a bunch of these in Primitives.java. I found two in > SpecialOperators.java. > A simple grep finds more. I used > grep 'result = eval(' *.java to get started. There aren't actually > very many of these > left. Doing Primitives now -- Phil Hudson PGP/GnuPG ID: 0x887DCA63 |
From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2008-10-01 20:40:08
|
On Wed, Oct 1, 2008 at 10:14 PM, Philip Hudson <phi...@in...> wrote: > On 29 Sep, 2008, at 10:56 pm, Ville Voutilainen wrote: > >> Well, usually you see code blocks like >> while (args != NIL) >> { >> result = eval(args.car(), env, thread); >> args = args.cdr(); >> } >> return result; >> >> This can be replaced with >> >> return progn(args, env, thread); >> >> There's a bunch of these in Primitives.java. I found two in >> SpecialOperators.java. >> A simple grep finds more. I used >> grep 'result = eval(' *.java to get started. There aren't actually >> very many of these >> left. > > Doing Primitives now That's great! I've committed the other patch in the mean time to SpecialOperators.java. Keep the patches comming! Bye, Erik. |
From: Philip H. <phi...@in...> - 2008-10-03 02:34:17
Attachments:
Primitives.java.cleanup1.patch
|
On 29 Sep, 2008, at 10:56 pm, Ville Voutilainen wrote: > Well, usually you see code blocks like > while (args != NIL) > { > result = eval(args.car(), env, thread); > args = args.cdr(); > } > return result; > > This can be replaced with > > return progn(args, env, thread); > > There's a bunch of these in Primitives.java. Patch for Primitives.java |
From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2008-10-05 13:00:17
|
On Fri, Oct 3, 2008 at 4:32 AM, Philip Hudson <phi...@in...> wrote: > On 29 Sep, 2008, at 10:56 pm, Ville Voutilainen wrote: > >> Well, usually you see code blocks like >> while (args != NIL) >> { >> result = eval(args.car(), env, thread); >> args = args.cdr(); >> } >> return result; >> >> This can be replaced with >> >> return progn(args, env, thread); >> >> There's a bunch of these in Primitives.java. > > Patch for Primitives.java Committed. Thanks for the patch! Bye, Erik. |