[Vm-dev] A stab at explaining Spur
bera.clement at gmail.com
Fri Aug 14 08:53:25 UTC 2015
Hello Stefan, Ryan and all,
I checked the paper where I read it (unfortunately it was rejected) and the
exact sentence was:
*In some implementations (e.g. Dart  and PyPy ), object header and
attribute storage can be separated, so the attribute storage can be
relocated in order to grow. *
*C. F. Bolz. Efficiently implementing objects with maps
2010. F. Schneider. Compiling dart to efficient machine code
When I read F. Boltz. post, it looks like to me that in Pypy each instance
of a class has a pointer to its map and its storage. The storage seems to
be at a different location than the object's header and holds the instance
variable values. To me it sounds very much like the object is 'split' to be
able to grow the storage if a new instance variable is added for a specific
instance. Accessing an object instance variable requires an extra
indirection through the storage pointer. Is there something I miss there ?
It looks like the paper we wrote with Eliot could definitely apply there in
order to speed up instance variable access by removing the indirection to
In the talk compiling dart to efficient machine code, one section deals
pointer to their Map, their properties and their elements, which to me
sounds similar to Cincom Smalltalk design (the object header is separated
from the value of the instance variables). However the talk then discusses
the Dart implementation and it's not the case there. I guess I got confused
I am waiting for other people comments but to me it looks like the memory
representation where the object's header is separated from the the object's
and that they could benefit from our implementation.
2015-08-14 9:51 GMT+02:00 Stefan Marr <smalltalk at stefan-marr.de>:
> Hi Clément:
> > On 14 Aug 2015, at 08:41, Clément Bera <bera.clement at gmail.com> wrote:
> > 2015-08-14 4:29 GMT+02:00 Ryan Macnak <rmacnak at gmail.com>:
> >> On Thu, Aug 13, 2015 at 1:19 AM, Clément Bera <bera.clement at gmail.com>
> >> I heard recently that the implementation used by Cincom Smalltalk,
> splitting the object in 2 (header + fields), is also used in Pypy and the
> Dart VM as Python and Dart allow the user to add instance variables to
> objects at runtime which leads to the same problem.
> > Objects are not split in the Dart VM, and it does not support adding
> instance variables or otherwise changing classes at runtime. Objects have a
> single-word header with a class index, size information and GC bits.
> Identity hashes are not often used in Dart, so they are kept in a side
> > And I put "accept" on a paper that was claiming that... Damned. Any clue
> about Pypy ?
> PyPy uses maps ala Self, but objects are not ‘split’.
> It is more or less the same as with V8, which also uses maps aka hidden
> Best regards
> Stefan Marr
> Johannes Kepler Universität Linz
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev