hg: mlvm/mlvm/hotspot: 2 new changesets

Rémi Forax forax at univ-mlv.fr
Tue Sep 27 15:22:43 PDT 2011


On 09/27/2011 11:12 PM, Lukas Stadler wrote:
> Yes :-) and there's more:
> Pre-built binaries for linux x64 and more documentation at:
> http://ssw.jku.at/General/Staff/LS/coro/
>
> The page is work in progress, though.
>  I'll have to finish it by next week, in order to direct people to it 
> at my JavaOne talk :-)
>
> - Lukas

and you can reify the stack, see below.

Lukas, I think you should store a special singleton object instead of null
in the object array (objectValues) because currently there is no way to 
know if
null is null or a scalar.

Also I think we should have a way to ask to an overload of 
AsymRunnable.call()
to throw an exception that will be thrown by ret() in the coroutine and 
vice versa.

Rémi

     Coroutine coroutine = new Coroutine() {
       @Override
       protected void run() {
         int i = 3;
         int j = 4;
         Object o = null;
         int k = 2 + myYield();
       }

       private int myYield() {
         yield();
         return 0;
       }
     };

     Coroutine.yield();

     CoroutineFrame[] frames = coroutine.serialize();
     for(int i=0; i<frames.length; i++) {
       CoroutineFrame frame = frames[i];
       frame.dump();
       System.out.println("object values 
"+Arrays.toString(frame.objectValues));
       System.out.println("scalar values 
"+Arrays.toString(frame.scalarValues));
     }

prints:
frame: CoroutineBase.startInternal at 49 (3 locals, 0 expressions, 0 monitors)
object values [fr.umlv.async.io.SerializeMain$1 at 69adff28, null, null]
scalar values [0, 0, 0]
frame: .run at 8 (5 locals, 1 expressions, 0 monitors)
object values [fr.umlv.async.io.SerializeMain$1 at 69adff28, null, null, 
null, null, null]
scalar values [0, 3, 4, 0, 0, 2]
frame: .myYield at 0 (1 locals, 0 expressions, 0 monitors)
object values [fr.umlv.async.io.SerializeMain$1 at 69adff28]
scalar values [0]
frame: Coroutine.yield at 6 (0 locals, 0 expressions, 0 monitors)
object values []
scalar values []


>
> On Sep 27, 2011, at 21:43 , Remi Forax wrote:
>
>> Cool !
>>
>> Remi
>>
>>
>> lukas.stadler at jku.at <mailto:lukas.stadler at jku.at> wrote:
>>
>>> Changeset: 9bb80f812fd7
>>> Author:    Lukas Stadler <lukas.stadler at jku.at 
>>> <mailto:lukas.stadler at jku.at>>
>>> Date:      2011-09-26 15:11 +0200
>>> URL: http://hg.openjdk.java.net/mlvm/mlvm/hotspot/rev/9bb80f812fd7
>>>
>>> rebase coro to current hsx/hotspot-comp
>>>
>>> ! coro.patch
>>> ! series
>>>
>>> Changeset: 1bdc6f420130
>>> Author:    Lukas Stadler <lukas.stadler at jku.at 
>>> <mailto:lukas.stadler at jku.at>>
>>> Date:      2011-09-27 18:34 +0200
>>> URL: http://hg.openjdk.java.net/mlvm/mlvm/hotspot/rev/1bdc6f420130
>>>
>>> coro: fixes to stack walking, support for ricochet frames
>>>
>>> ! coro.patch
>>>
>>> _______________________________________________
>>> mlvm-dev mailing list
>>> mlvm-dev at openjdk.java.net <mailto:mlvm-dev at openjdk.java.net>
>>> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
>> _______________________________________________
>> mlvm-dev mailing list
>> mlvm-dev at openjdk.java.net <mailto:mlvm-dev at openjdk.java.net>
>> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
>
>
>
> _______________________________________________
> mlvm-dev mailing list
> mlvm-dev at openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20110928/78ee10b0/attachment.html 


More information about the mlvm-dev mailing list