RFR 8027137: Merge ScriptFunction and ScriptFunctionImpl

Sundararajan Athijegannathan sundararajan.athijegannathan at oracle.com
Wed Sep 9 11:22:09 UTC 2015


Thanks for the reviews Hannes & Attila.

I've incorporated the changes suggested. Updated webrev: 
http://cr.openjdk.java.net/~sundar/8027137/webrev.01/

PS. I've changed all counters (used from NativeDebug) to use LongAdder.

-Sundar

On 9/9/2015 2:57 PM, Attila Szegedi wrote:
> Great work! I’m very happy that ScriptFunctionImpl is going away.
>
> Some implementation remarks:
>
> - The newly public methods in Global.java, getFunctionPrototype and getTypeErrorThrower don’t have Javadoc.
> - The newly public two constructors of PrototypeObject also don’t hava Javadoc.
> -  while you're at it, how about we replace ScriptFunction.constructorCount/invokes/allocations fields with LongAdder objects? We should gradually be replacing all such static counters.
> - can we create an explicit subclass for bound functions? It can be declared as "private static class Bound extends ScriptFunction { ... }" within the ScriptFunction class. When we debug, we'll then see its name as ScriptFunction$Bound instead of ScriptFunction$1.
>
> Attila.
>
>> On Sep 9, 2015, at 10:19 AM, Sundararajan Athijegannathan <sundararajan.athijegannathan at oracle.com> wrote:
>>
>> Please review http://cr.openjdk.java.net/~sundar/8027137/ for https://bugs.openjdk.java.net/browse/JDK-8027137
>>
>> Thanks,
>> -Sundar



More information about the nashorn-dev mailing list