Re: Coming change to dropArguments?

2011-04-11 Thread Mark Roos
John wrote

If the desired MethodType is available, you can also use 
MethodType.parameterList to get a List of the parameters (at O(1) likely 
allocation cost).  From thatlist you can also subList to 
specify the desired dropped parameter types.

Interesting thought.   Upon examining my use I see that about 16 lengths 
are required to cover the use cases.  So I plan to pre compute them and 
store in a static array in my
call site class.

thanks

mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev


Coming change to dropArguments?

2011-04-06 Thread Mark Roos
In reading John's blog I saw a mention about changing dropArguments, 
perhaps providing  a simpler version?
I would like that.

In my code dropArguments is used to drop all but the first argument before 
a bind and test for the
test branch of guardWtihTest.  Mine is a special case where all of the 
arguments are the same type
and 'this' is the first argument ( for the purpose of the test). 

It works fine except I have to create the array of types which are to be 
dropped.  No big deal but it 
does seem like it adds complexity that is not necessary.

In thinking about it what would be nice would be to have an 
'extractSingleArgument' like api.  Then
my test branch would be;   extract, bind, test.  Very clear and inline and 
I could chose the argument
to compare.

Perhaps there is something like this already?

thanks
mark___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev


Re: Coming change to dropArguments?

2011-04-06 Thread Rémi Forax

On 04/06/2011 08:52 PM, Mark Roos wrote:
In reading John's blog I saw a mention about changing dropArguments, 
perhaps providing  a simpler version?

I would like that.

In my code dropArguments is used to drop all but the first argument 
before a bind and test for the
test branch of guardWtihTest.  Mine is a special case where all of the 
arguments are the same type

and 'this' is the first argument ( for the purpose of the test).

It works fine except I have to create the array of types which are to 
be dropped.  No big deal but it

does seem like it adds complexity that is not necessary.

In thinking about it what would be nice would be to have an 
'extractSingleArgument' like api.  Then
my test branch would be;   extract, bind, test.  Very clear and inline 
and I could chose the argument

to compare.

Perhaps there is something like this already?


You can also use the dasLropArguments that takes a List and use
Arrays.asList() followed by subList().



thanks
mark


cheers,
Rémi

___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev


Re: Coming change to dropArguments?

2011-04-06 Thread John Rose
On Apr 6, 2011, at 3:10 PM, Rémi Forax wrote:

 You can also use the dropArguments that takes a List and use
 Arrays.asList() followed by subList().

If the desired MethodType is available, you can also use 
MethodType.parameterList to get a List of the parameters (at O(1) likely 
allocation cost).  From that list you can also subList to specify the desired 
dropped parameter types.

-- John
___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev