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@49 (3 locals, 0 expressions, 0 monitors)
object values [fr.umlv.async.io.SerializeMain$1@69adff28, null, null]
scalar values [0, 0, 0]
frame: .run@8 (5 locals, 1 expressions, 0 monitors)
object values [fr.umlv.async.io.SerializeMain$1@69adff28, null, null,
null, null, null]
scalar values [0, 3, 4, 0, 0, 2]
frame: .myYield@0 (1 locals, 0 expressions, 0 monitors)
object values [fr.umlv.async.io.SerializeMain$1@69adff28]
scalar values [0]
frame: Coroutine.yield@6 (0 locals, 0 expressions, 0 monitors)
object values []
scalar values []
On Sep 27, 2011, at 21:43 , Remi Forax wrote:
Cool !
Remi
lukas.stad...@jku.at <mailto:lukas.stad...@jku.at> wrote:
Changeset: 9bb80f812fd7
Author: Lukas Stadler <lukas.stad...@jku.at
<mailto:lukas.stad...@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.stad...@jku.at
<mailto:lukas.stad...@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@openjdk.java.net <mailto:mlvm-dev@openjdk.java.net>
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
_______________________________________________
mlvm-dev mailing list
mlvm-dev@openjdk.java.net <mailto:mlvm-dev@openjdk.java.net>
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
_______________________________________________
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
_______________________________________________
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev