# HG changeset patch # User sundar # Date 1472027561 -19800 # Node ID e49bc2deb2f039865ed574e69a8a984b6151db33 # Parent e17429a7e843c4a4ed3651458d0f950970edcbcc 8164618: add documentation for NativeNumber and NativeBoolean Reviewed-by: sundar Contributed-by: srinivas.dama@oracle.com diff -r e17429a7e843 -r e49bc2deb2f0 nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/OptimisticTypesCalculator.java --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/OptimisticTypesCalculator.java Wed Jul 05 22:07:34 2017 +0200 +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/OptimisticTypesCalculator.java Wed Aug 24 14:02:41 2016 +0530 @@ -79,7 +79,7 @@ @Override public boolean enterPropertyNode(final PropertyNode propertyNode) { - if(propertyNode.getKeyName().equals(ScriptObject.PROTO_PROPERTY_NAME)) { + if(ScriptObject.PROTO_PROPERTY_NAME.equals(propertyNode.getKeyName())) { tagNeverOptimistic(propertyNode.getValue()); } return super.enterPropertyNode(propertyNode); diff -r e17429a7e843 -r e49bc2deb2f0 nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/Functions.properties --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/Functions.properties Wed Jul 05 22:07:34 2017 +0200 +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/Functions.properties Wed Aug 24 14:02:41 2016 +0530 @@ -173,3 +173,20 @@ String.prototype.toLocaleUpperCase=returns a new string representing the calling string value converted to upper case according to any locale specific case mappings String.prototype.trim=returns a new string representing the calling string with white space removed from both ends + +Boolean.prototype.toString=returns string representation of specified Boolean object + +Boolean.prototype.valueOf=returns the primitive value of the specified Boolean object + +Number.prototype.toString=returns string representation of specified object in the specified radix + +Number.prototype.toLocaleString=returns a string with a language sensitive representation of this number + +Number.prototype.valueOf=returns the primitive value of the specified object + +Number.prototype.toFixed=returns a string representing the number in decimal fixed-point notation + +Number.prototype.toExponential=returns a string representing the number in decimal exponential notation + +Number.prototype.toPrecision=returns a string representing the number to a specified precision in fixed-point or exponential notation +