changeset 1766:5fb49fa09808

8164618: add documentation for NativeNumber and NativeBoolean Reviewed-by: sundar Contributed-by: srinivas.dama@oracle.com
author sundar
date Wed, 24 Aug 2016 14:02:41 +0530
parents 3a924b820d02
children fe2dcb396ff4
files src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/OptimisticTypesCalculator.java src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/Functions.properties
diffstat 2 files changed, 18 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/OptimisticTypesCalculator.java	Thu Aug 18 21:33:30 2016 +0000
+++ b/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);
--- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/Functions.properties	Thu Aug 18 21:33:30 2016 +0000
+++ b/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
+