Are value types supposed to work at all currently?
peter.levart at gmail.com
Mon May 25 16:26:00 UTC 2015
I've been playing with the idea of Packed Objects over a weekend. Not
hacking the VM like IBM, but using pure Java (with a little help from
Unsafe ;-). Here's what I came up with:
It's interesting from the semantics standpoint alone. Mutating / viewing
operations are possible to construct and compose in a generic way.
Packed Objects are not value types, but can be used as value types. They
can also be used to mutate parts of "values" in a well defined way.
Additional features that come to mind besides those already implemented
in above prototype are:
- read-only views of components of a packed object / array
- mapping native memory instead of heap as an option (like ByteBuffer)
- atomic operations on primitive components (CAS, GAS, GAA, ...)
- "view" locks - locking a range occupied by a component to allow
exclusive accesses to a (sub/super)component.
On 05/21/2015 10:51 PM, Volker Simonis wrote:
> Hi Simon,
> it may be worth mentioning that there are other projects/approaches like
> IBM's PackedObjects or Gil Tene's ObjectLayout which solve at least a part
> of the problems which are addressed more generally by ValueTypes.
> I compared them in a talk that I was giving at FOSDEM (did we actually met
> there?) and JPoint: http://progdoc.de/papers/JPoint2015/jpoint2015.html
> Incidentally I'll also give this talk tomorrow at JEE Conf in Kiev so if
> you should be around you're very welcome;)
> On Thursday, May 21, 2015, Simon Ochsenreither <simon at ochsenreither.de>
>> Hi Brian, hi Maurizio,
>> here are the slides I used for my talk yesterday:
>> I hope they accurately reflected the current situation as much as possible.
>> Corrections and comments welcome! (The talk at ScalaDays will likely look
>> quite differently, though.)
>> I finished the slides a few minutes before the talk, so they are quite
>> One thing I would certainly add are all the boxing considerations, which
>> were discussed at the meetup, but are missing on the slides.
More information about the valhalla-dev