Differences in asType between MLVM/bsdport and JDK7
Ola Bini
ola.bini at gmail.com
Fri May 27 00:39:00 PDT 2011
On 2011-05-27 12.59, John Rose wrote:
> On May 27, 2011, at 12:26 AM, Ola Bini wrote:
>
>> type() is just a call site type, so that will be the
>> SephObject,SThread etc.
>
>
> Good. So what's the code that creates the target (not the fallback)?
> It looks like it has its types denatured to Object. -- John
Actually, I was lying before - the code I inserted was not what crashes.
This is the code that crashes:
MethodHandle _test = dropArguments(
findVirtual(SephObject.class, "isActivatable",
methodType(boolean.class)), 1, type().parameterArray());
MethodHandle _then = filterArguments(
invoker(type()),
0,
insertArguments(
findVirtual(SephObject.class, "activationFor",
methodType(MethodHandle.class,
int.class,
boolean.class)),
1,
arity(),
keywords()));
MethodHandle _else = dropArguments(
identity(SephObject.class),
1,
type().parameterArray());
MethodHandle all = guardWithTest(_test, _then, _else);
And as you say, the _then part has an invoker as the main part. type()
there is still the CallSite.type() with specific classes.
Cheers
--
Ola Bini (http://olabini.com)
Ioke - JRuby - ThoughtWorks
"Yields falsehood when quined" yields falsehood when quined.
More information about the mlvm-dev
mailing list