Review request for JDK-8006570

Hannes Wallnoefer hannes.wallnoefer at oracle.com
Tue Jan 22 03:01:13 PST 2013


I've uploaded a new webrev based mostly on feedback by Sundar.

http://cr.openjdk.java.net/~hannesw/8006570/

Changes to the first webrev:

- Test now also covers this-conversion cases that were not subject of 
this bug.

- NashornGuardedInvocation does no longer make use of the 
NashornCallSiteDescriptor.CALLSITE_STRICT flag. The purpose of 
NashornGuardedInvocation never was to track strictness of the callsite, 
but of the invocation target function (Javadoc comments were misleading 
and have also been fixed).

What we really need to know from NashornGuardedInvocation is whether the 
target function is a non-strict script function (i.e. neither built-in 
nor strict) so I changed the NashornGuardedInvocation.isStrict() methods 
to NashornGuardedInvocation.isNonStrict() with these semantics (neither 
strict nor built-in).

Most checks for target function strictness already did this correctly 
(i.e. check for both not-strict and not-builtin) but the one in 
PrimitiveLookup.lookupPrimitive() did not, making string method 
invocation 2-3 times more expensive because of the unnecessary string 
wrapper creation (I'll add a String microbenchmark later as part of 
JDK-8006408).

Hannes

Am 2013-01-21 17:28, schrieb Hannes Wallnoefer:
> Please review JDK-8006570 at 
> http://cr.openjdk.java.net/~hannesw/8006570/.
>
> Thanks,
> Hannes



More information about the nashorn-dev mailing list