On 09/03/2014 03:25 PM, Vladimir Ivanov wrote:
Peter,
Thanks for the feedback.
> In LambdaFormEditor, where Transform[] is promoted into
ConcurrentHashMap<Transform, Transform>:
339 ConcurrentHashMap<Transform, Transform> m =
new ConcurrentHashMap<>(MAX_CACHE_ARRAY_SIZE * 2);
340 for (Transform k : ta) {
341 if (k != null) continue;
342 m.put(k, k);
343 }
344 lambdaForm.transformCache = m;
345 // The second iteration will update for this
query, concurrently.
346 continue;
I think line 341 is wrong. It should be:
if (k == null) break;
shouldn't it?
Good catch! Fixed.
I think it can even be removed or replaced with something like:
assert k != null;
...since null entry in array is not possible in this situation -
promotion to CHM happens only when array is full.
Regards, Peter
Best regards,
Vladimir Ivanov
Regards, Peter
On 9/2/14, 5:57 PM, Vladimir Ivanov wrote:
https://bugs.openjdk.java.net/browse/JDK-8057042
LambdaFormEditor provides an API to transform LambdaForms. Deriving
new
LambdaForms from a base one allows to cache and reuse results of
repeated transformations.
BMH binding is rewritten to use LambdaFormEditor.
Testing: jdk/java/lang/invoke, jdk/java/util/streams, nashorn,
octane w/
"-ea -esa" and COMPILE_THRESHOLD={0,30}.
Reviewed-by: vlivanov, ?
Contributed-by: john.r.r...@oracle.com
Thanks!
Best regards,
Vladimir Ivanov
_______________________________________________
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
_______________________________________________
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