hg: mlvm/mlvm/jdk: meth: avoid binding of Unsafe instances and superfluous nulls in field getters/setters; provide immediate literal binding facility rudiment

2012-07-02 Thread michael . haupt
Changeset: 9413fdf424cd Author:mhaupt Date: 2012-07-02 10:12 +0200 URL: http://hg.openjdk.java.net/mlvm/mlvm/jdk/rev/9413fdf424cd meth: avoid binding of Unsafe instances and superfluous nulls in field getters/setters; provide immediate literal binding facility rudiment ! meth-lazy

hg: mlvm/mlvm/jdk: meth: BMH refactorings

2012-07-02 Thread michael . haupt
Changeset: bc14db7367b6 Author:mhaupt Date: 2012-07-02 13:29 +0200 URL: http://hg.openjdk.java.net/mlvm/mlvm/jdk/rev/bc14db7367b6 meth: BMH refactorings ! meth-lazy-7023639.xbmh.patch ___ mlvm-dev mailing list [email protected] h

Re: TaggedArrays (Proposal)

2012-07-02 Thread Rémi Forax
On 07/02/2012 03:05 PM, Jim Laskey wrote: > During a week in the rarefied air of Stockholm back in May, a > sleepless night got me thinking. The day after that, the thinking > became a reality. I've been sitting on the code since, not sure what > to do next. So..., why not start the month lea

Re: TaggedArrays (Proposal)

2012-07-02 Thread Jim Laskey
On 2012-07-02, at 10:57 AM, Rémi Forax wrote: > On 07/02/2012 03:05 PM, Jim Laskey wrote: >> During a week in the rarefied air of Stockholm back in May, a >> sleepless night got me thinking. The day after that, the thinking >> became a reality. I've been sitting on the code since, not sure wh

Re: TaggedArrays (Proposal)

2012-07-02 Thread ravenex
Very cool stuff, Jim and Rickard! I guess people are going to start missing NaN encoded tagged value/pointers now that there's something real to play with ;-) @Remi The subclass suggestion sounds a lot like Maxine's Hybrid objects, where named fields and an untyped array is bundled into a single

Re: TaggedArrays (Proposal)

2012-07-02 Thread Jim Laskey
We had been using NaN encodings in Nashorn but moving away from it because of 32-bit FP emulation issues. If you use a sNaN, 32-bit FP emulation converts sNaN to qNaN on load and creates a mess of things. On 2012-07-02, at 11:11 AM, ravenex wrote: > Very cool stuff, Jim and Rickard! I guess

Re: TaggedArrays (Proposal)

2012-07-02 Thread ravenex
So 32-bit is a pain-point for NaN encoding. I was only playing on x64 and didn't notice that. Thanks for the info! (Sorry for the messed formatting in the previous mail) - Raven -- Original -- From: "Jim Laskey"; Date: Mon, Jul 2, 2012 10:21 PM T

Re: TaggedArrays (Proposal)

2012-07-02 Thread Rémi Forax
On 07/02/2012 04:11 PM, ravenex wrote: > Very cool stuff, Jim and Rickard! > I guess people are going to start missing NaN encoded tagged > value/pointers now that there's something real to play with ;-) > > @Remi The subclass suggestion sounds a lot like Maxine's Hybrid > objects, where named fi

Re: TaggedArrays (Proposal)

2012-07-02 Thread Mark Roos
>From Jim It occurred to me on that sleepless Monday night, that the solution for most dynamic languages could be so much simpler. First, we have to look at what it is we really need. Ultimately it's about boxing. We want to avoid allocating memory whenever we need to store a primitive value

Re: TaggedArrays (Proposal)

2012-07-02 Thread Jim Laskey
Mark, I'll walk into the trap of offering a solution. While I'm not familiar with your implementation of SmallTalk, the array example might work like this (generic/loose java) // language stack public static TaggedArray stack = TaggedArrays.allocate(1024*1024); public s

Re: TaggedArrays (Proposal)

2012-07-02 Thread Mark Roos
Hi Jim, some free from thinking. My implementation does not have a parallel stack so I am using the java stack frame to hold temps and pass arguments. Even so I can see how I would use a TaggedArray. Instead of using jvm var slots I would have one slot with a Tagged Array in it to hold my m

Re: TaggedArrays (Proposal)

2012-07-02 Thread Charles Oliver Nutter
A couple quick thoughts from my end. JRuby does maintain a couple parallel stacks for "out of band" data that crosses method activations, and I have explored using a large array as well for closure scopes. Currently, JRuby has a set of different-sized heap scopes for up to 4 local variables and t

Working around NoClassDefFound

2012-07-02 Thread Charles Oliver Nutter
Ok folks...last I heard from Christian the new indy backend is not going to make u6, so I'm actively seeking workarounds for the dreaded NoClassDefFoundError. I believe Remi suggested something like erasing the types in the MH tree and then re-casting them or something, but I can't find the thread

Re: TaggedArrays (Proposal)

2012-07-02 Thread Howard Lovatt
I like the idea and something along these lines would be a great addition to the standard library, which I will come back to as a PS. In com.sun.misc.Unsafe there are already getLong(Object, int) and setLong(Object, int, long) methods and the same for Object. No doubt if we used getLong and setLon

Re: TaggedArrays (Proposal)

2012-07-02 Thread Krystal Mok
On Tue, Jul 3, 2012 at 1:28 PM, Howard Lovatt wrote: > I like the idea and something along these lines would be a great addition > to the standard library, which I will come back to as a PS. > > In com.sun.misc.Unsafe there are already getLong(Object, int) and > setLong(Object, int, long) methods

Re: TaggedArrays (Proposal)

2012-07-02 Thread Howard Lovatt
@Kris, I was assuming that the tag would be sufficient for the JVM since 'real' references would be aligned and hence naturally not tagged. But I don't know enough about the JVM and hence you could well be correct. -- Howard. On 3 July 2012 15:40, Krystal Mok wrote: > On Tue, Jul 3, 2012 at 1:28

Re: TaggedArrays (Proposal)

2012-07-02 Thread Krystal Mok
@Howard Your suggestion could pretty much work if the underlying VM is using a conservative collector, where it'd actually include a set of filters to check if a value is a (or "looks like a") real reference. There are also a couple of runtimes that implements exact GC by tagging values, but most