On Dec 30, 2011, at 3:45 PM, Rémi Forax wrote: > On 12/30/2011 03:26 PM, christian.thalin...@oracle.com wrote: >> Changeset: 700540b4b52b >> Author: twisti >> Date: 2011-12-30 15:25 +0100 >> URL: http://hg.openjdk.java.net/mlvm/mlvm/jdk/rev/700540b4b52b >> >> LF'ified makeAllocator; 18 MethodHandlesTests working >> >> ! meth-lazy-7023639.bcg.patch > > Hi Christian, > I believe you should create the UNSAFE_ALLOCATEINSTANCE with > lookup.bind() instead of doing a findVirtual + a bindReceiver > to avoid to bind the receiver for each call of findConstructor.
Good point. The reason why I'm not using it now but rather use something like this: lzmh = (LazyMethodHandle) lzmh.bindReceiver(UNSAFE); lzmh = (LazyMethodHandle) lzmh.bindArgument(0, allocateClass); is because MH.bindReceiver still uses BoundMethodHandle and I want to avoid BMHs since I want to get rid of them. But as soon as DMHs have LazyMethodHandle functionality I will change that code. -- Chris > > BTW, nice to see that collect is not used anymore during the allocation. > > cheers, > Rémi > > > _______________________________________________ > mlvm-dev mailing list > mlvm-dev@openjdk.java.net > http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev _______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev