[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-graal-dev
Subject:    Re: Class-based dynamic languages on Truffle OSM
From:       Raffaello Giulietti <raffaello.giulietti () supsi ! ch>
Date:       2014-11-10 16:46:02
Message-ID: 5460EBCA.4070008 () supsi ! ch
[Download RAW message or body]

Is there any hope that the Graal VM will someday be able to optimize the 
layout (quantity/type of fields) of the objects and inline the 
extensions arrays in the objects once it sees a stable shape? And to 
de-optimize it when needed?


Regards
Raffaello



On 2014-11-09 19:25, Thomas Wuerthinger wrote:
> Raffaello,
>
> Languages are free to chose their own way of implementing the object
> layout when using Truffle. The paper describes one specific technique
> that has shown to be good for objects of dynamic size and shape.
>
> In case of fixed size objects, one might still want to speculate on the
> types of fields. This can be beneficial even in case of static languages
> like Java, because the provided static type of a field is only a
> conservative estimate of the actual type of values stored in the field
> at run time. Stefan Marr’s TruffleSOM
> (https://github.com/smarr/TruffleSOM) is an example implementation of
> Smalltalk using Truffle.
>
> Regards, thomas
>
>
> On 09 Nov 2014, at 18:26, Raffaello Giulietti
> <raffaello.giulietti@supsi.ch <mailto:raffaello.giulietti@supsi.ch>> wrote:
>
>> I recently read the very interesting Truffle OSM paper
>> (http://dl.acm.org/citation.cfm?id=2647517).
>>
>> If my understanding is correct, the paper proposes to treat all guest
>> language (g-lang) objects as instances of a *single* Java subclass of
>> StorageObject, like the exemplar JSObject.
>>
>> While this one-size-fits-all approach might be ideal for
>> prototype-based or open-ended class-based g-langs, where instances can
>> grow as new properties are added at runtime, I wonder if it is ideal
>> for those dynamic g-langs where the set of instance variables (fields)
>> is fixed at class definition time, like in Smalltalk.
>>
>> I'm not sure if my understanding is correct or if Truffle/Graal's
>> magic is able to optimize the size and the shape of objects along
>> their way from birth to death. This would be wonderful!
>>
>> Any clarifications, even technically detailed ones, would be welcome.
>>
>> Thanks in advance
>> Raffaello Giulietti
>>
>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic