Class-based dynamic languages on Truffle OSM

Raffaello Giulietti raffaello.giulietti at
Sun Nov 9 17:26:24 UTC 2014

I recently read the very interesting Truffle OSM paper 

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

More information about the graal-dev mailing list