OSM issue
Guido Chari
charig at gmail.com
Wed Aug 12 13:20:32 UTC 2015
Thanks for the answer Stefan.
2015-08-12 6:33 GMT-03:00 Stefan Marr <php at stefan-marr.de>:
> Hi Guido:
>
> > On 11 Aug 2015, at 22:15, Guido Chari <charig at gmail.com> wrote:
> >
> > Well that is a little confusing for me. Most of the classes ending with
> > impl like DynamicObjectImpl and LayoutImpl are abstract and there are
> > subclasses with standard implementations (BasicLayout,
> DynamicObjectBasic).
> > I thought those implementations were the ones used for JRuby.
>
> Yes and no.
> The framework is designed so that language implementations only use the
> main entry points and that the framework itself then can do ‘magic’.
> So, the implementations are not public because they are not necessarily
> meant to be changed.
>
Well, that is ok. But what i meant is that most of the implementations are
actually abstract and public. And that is ok for me. I just modify the
minimum for having, for instance, 5 primitives dynamic fields and 5 long[]
dynamic fields for honoring the TruffleSOM native object model. As i said
my problem is just with the DefaultStrategy.
>
> > If i would like a different scheme of fields for my dynamicObject i
> thought
> > the standard way was to subclass DynamicObjectImpl. If this is not the
> way,
> > what is the suggested way of using the framework for defining my own
> > dynamic object with different count of primitive and object fields?
>
> I’d say, break it open in your local copy. What you intent to do is not
> the standard use case.
> The framework is designed that there can be multiple implementations of
> the object model, but I would assume that the current implementation is not
> necessarily designed to be reused for such experiments directly. Might be
> it would be simpler to either hack it, or take the things you need and
> assemble them manually the way you want.
>
Ok. But the changes i introduced are quite basic and minimal. I just
subclass the DynamicObjectImpl for having different count of fields and
then a new layout is required so i subclass LayoutImpl for the
corresponding changes. I think it is a pitty if all these can not be used
just because DefaultStrategy is private.
>
> Assuming that you are still experimenting with TruffleSOM, does the basic
> object model already work with it?
>
Did not try. I went straight in the direction of adapting the model for
using the same number of dynamic fields of the TruffleSOM implementation.
>
> Best regards
> Stefan
>
Best,
Guido.
>
> --
> Stefan Marr
> Johannes Kepler Universität Linz
> http://stefan-marr.de/research/
>
>
>
>
More information about the graal-dev
mailing list