By the way, why exactInvoker() is needed? Isn't the following true?

exactInvoker(target.type()).bindTo(target) == target

Kirill

On 01/27/2011 12:01 AM, Jim Laskey wrote:
> I think it's a simple issue.  Drop should use 1 instead of 0.
>
>
>      public static
>      MethodHandle filterReturnValue(MethodHandle target, MethodHandle filter) 
> {
>          MethodType targetType = target.type();
>          MethodType filterType = filter.type();
>          if (filterType.parameterCount() != 1
>              || filterType.parameterType(0) != targetType.returnType())
>              System.err.println("target and filter types do not match");
>          // FIXME: Too many nodes here.
>          MethodHandle returner = dropArguments(filter, 0, 
> targetType.parameterList());<<<   0 should be 1
>          return foldArguments(returner, 
> exactInvoker(target.type()).bindTo(target));
>      }
>
> Cheers,
>
> -- Jim
_______________________________________________
mlvm-dev mailing list
[email protected]
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Reply via email to