Differences in asType between MLVM/bsdport and JDK7

Ola Bini ola.bini at gmail.com
Fri May 27 00:26:39 PDT 2011


On 2011-05-27 12.53, John Rose wrote:
> On May 27, 2011, at 12:11 AM, Ola Bini wrote:
> 
>> I ran the compile against what's in b144, but directly from the
>> JDK7 repo
>> 
>> On 2011-05-27 12.26, John Rose wrote:
>>> On May 26, 2011, at 11:38 PM, Ola Bini wrote:
>>> 
>>>> Caused by: java.lang.IllegalArgumentException: target and
>>>> fallback types must match:
>>>> (SephObject,Object,Object,Object,Object)Object != 
>>>> (SephObject,SephObject,SThread,LexicalScope,MethodHandle)SephObject
>
>>>> 
> Are you expecting the target type, with its homogeneous Object types,
> or the fallback type, with its heterogeneous types? How is the wrong
> one getting created?

I'm creating a specialized GWT that will take
(SephObject,SephObject,SThread,LexicalScope,MethodHandle)SephObject, so
that's what I'm expecting for both of the entries.

>> 
>> The place that is doing the work is this: MethodHandle
>> _insertArguments = insertArguments(findStatic(MethodHandles.class, 
>> "insertArguments", methodType(MethodHandle.class, 
>> MethodHandle.class, int.class, Object[].class)), 1, 
>> 0).asCollector(Object[].class, type().parameterCount()). 
>> asType(type().insertParameterTypes(0, MethodHandle.class) 
>> .changeReturnType(MethodHandle.class));
> 
> 
> That looks like reasonable code.  What is type() here?  Is it Object*
> or SephObject,SThread,...?

I'm glad you say it looks reasonable. =)

type() is just a call site type, so that will be the SephObject,SThread etc.

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