Danger Will Robinson! Missing API!
Charles Oliver Nutter
headius at headius.com
Wed May 25 22:34:07 PDT 2011
On Thu, May 26, 2011 at 12:19 AM, Ola Bini <ola.bini at 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 :) Can't we just add
a method?
- Charlie
More information about the mlvm-dev
mailing list