Danger Will Robinson! Missing API!
Attila Szegedi
szegedia at gmail.com
Wed May 25 22:43:57 PDT 2011
On May 25, 2011, at 10:34 PM, Charles Oliver Nutter wrote:
> 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 :)
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 at openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
More information about the mlvm-dev
mailing list