On May 25, 2011, at 10:34 PM, Charles Oliver Nutter wrote: > On Thu, May 26, 2011 at 12:19 AM, Ola Bini <ola.b...@gmail.com> wrote: >> Take a look at the way I use SwitchPoints in Seph. The api you're >> looking for is already there: >> >> SwitchPoint x = new SwitchPoint(); >> MethodHandle valid = >> x.guardWithTest(MethodHandles.constant(boolean.class, true), >> MethodHandle.constant(boolean.class, false)); >> >> System.err.println("Still valid: " + valid.invoke()); >> SwitchPoint.invalidateAll(new SwitchPoint[]{x}); >> System.err.println("Now not valid: " + valid.invoke()); > > I have to be blunt: this is just about the most roundabout way to > determine if a SwitchPoint is valid I can imagine :)
Well, lacking a method, it's actually probably the most straightforward one :-) Ola wins gazillion points for resourcefulness. > Can't we just add > a method? Yeah, probably warranted; since the information is available anyway, it'd make sense to make it easily accessible. Attila. > - Charlie > _______________________________________________ > 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