[armedbear-devel] Consolidating copy/paste code

dmiles@users.sourceforge.net logicmoo at gmail.com
Thu Apr 15 21:38:55 UTC 2010


On Thu, Apr 15, 2010 at 2:21 PM, Erik Huelsmann <ehuels at gmail.com> wrote:
>
> Hi David,
>
> >> Do you feel like contributing more, but you don't have any idea where
> >> to start? You might want to have a look at ticket 88; it's a change to
> >> provide ABCL with primitives for SLIME to use to find the right source
> >> code. There's a comment in the ticket explaining my direction of
> >> thoughts. If that's not enough, we can discuss on the list, here.
> >>
> >> Although this is probably more like 2 or 3 afternoons since you're
> >> very new in our code base.
> >
> > OK.  I'll take a look at it this weekend.  It sounds like you're
> > suggesting to modify the compiler to emit CompiledPrimitive
> > instead of Primitive, where CompiledPrimitive is just an empty
> > sublcass of Primitive?
>
> Yes. Additionally, it would be a good idea to define a Primitive (in
> Primitives.java) which takes exactly one argument and returns T if
> that argument is instanceof CompiledPrimitive or CompiledClosure; or
> NIL otherwise.

I had implemented ticket #88 in my Lisps SVN a month back.. (since it
was based on ABCL the change should be easy to see)

What I do is extend JavaPrimitive instead of Primitive.
created as: https://code.google.com/r/logicmoo-invoke-interface/source/browse/src/com/cyc/tool/subl/jrtl/nativeCode/commonLisp/JavaPrimitive.java?spec=svn4bce7566fdb7cec203b098526ff83c28362f0256&r=4bce7566fdb7cec203b098526ff83c28362f0256

Whenever a primitive is defined from .java source I force
JavaPrimitive instead of Primitive then for JavaPrimitive

Here is the scope of the change:
https://code.google.com/r/logicmoo-invoke-interface/source/detail?r=e95a8df3af8704970bdfd5934e6a54d3834128ac&path=/src/com/cyc/tool/subl/jrtl/nativeCode/commonLisp/StringFunctions.java

Jope you find this helpfull.


>
> >> Thanks again for your contribution!
> >
> > No trouble.  abcl just allowed me to integrate a large amount of old
> > code that I was rather fond of with an equally large amount of new
> > code, so I'm rather grateful.
>
> If you need help or pointers, please do ask! We'll gladly help you
> find your way around.
>
> Bye,
>
> Erik.
>
> _______________________________________________
> armedbear-devel mailing list
> armedbear-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel




More information about the armedbear-devel mailing list