/openjdk10/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/ |
H A D | NativeMath.java | 96 return Math.abs(JSType.toNumber(x)); 148 return Math.acos(JSType.toNumber(x)); 174 return Math.asin(JSType.toNumber(x)); 200 return Math.atan(JSType.toNumber(x)); 227 return Math.atan2(JSType.toNumber(y), JSType.toNumber(x)); 254 return Math.ceil(JSType.toNumber(x)); 306 return Math.cos(JSType.toNumber(x)); 332 return Math.exp(JSType.toNumber(x)); 345 return Math.floor(JSType.toNumber( [all...] |
H A D | NativeUint8ClampedArray.java | 184 return set(index, JSType.toNumber(value), strict); 204 return rint(JSType.toNumber(rint));
|
H A D | NativeDate.java | 193 num = timeClip(JSType.toNumber(args[0])); 570 final double num = timeClip(JSType.toNumber(time)); 799 final double yearNum = JSType.toNumber(year); 1218 final double darg = JSType.toNumber(args[i]); 1242 // Need to call toNumber on all args for side-effects - even if an argument 1243 // fails to convert to number, subsequent toNumber calls needed for possible 1247 final double darg = JSType.toNumber(args[i - fieldId]);
|
H A D | NativeJSON.java | 182 modSpace = JSType.toNumber(JSType.toPrimitive(modSpace, Number.class)); 258 value = JSType.toNumber(value);
|
H A D | NativeFloat32Array.java | 155 return set(index, JSType.toNumber(value), strict);
|
H A D | NativeFloat64Array.java | 155 return set(index, JSType.toNumber(value), strict);
|
H A D | NativeDataView.java | 880 getBuffer(self, littleEndian).putFloat((int)JSType.toUint32(byteOffset), (float)JSType.toNumber(value)); 936 getBuffer(self, littleEndian).putDouble((int)JSType.toUint32(byteOffset), JSType.toNumber(value));
|
H A D | NativeNumber.java | 146 final double num = (args.length > 0) ? JSType.toNumber(args[0]) : 0.0;
|
H A D | ArrayBufferView.java | 281 final double dlen = JSType.toNumber(arg0);
|
/openjdk10/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/ |
H A D | JSObject.java | 195 default double toNumber() { method in interface:JSObject 196 return JSType.toNumber(JSType.toPrimitive(this, Number.class));
|
H A D | AbstractJSObject.java | 206 public double toNumber() { method in class:AbstractJSObject
|
/openjdk10/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/extensions/ |
H A D | ExpressionContext.java | 61 public double toNumber(Node n); method in interface:ExpressionContext
|
/openjdk10/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ |
H A D | ExsltMath.java | 78 double d = toNumber(n); 113 double d = toNumber(n); 153 double d = toNumber(n); 190 double d = toNumber(n);
|
H A D | ExsltBase.java | 71 protected static double toNumber(Node n) method in class:ExsltBase
|
/openjdk10/nashorn/test/src/jdk/nashorn/internal/runtime/test/ |
H A D | JSTypeTest.java | 80 * Test of toNumber method, of class Runtime. 84 assertTrue(Double.isNaN(JSType.toNumber(ScriptRuntime.UNDEFINED))); 85 assertEquals(JSType.toNumber((Object)null), 0.0, 0.0); 86 assertEquals(JSType.toNumber(Boolean.TRUE), 1.0, 0.0); 87 assertEquals(JSType.toNumber(Boolean.FALSE), 0.0, 0.0); 88 assertEquals(JSType.toNumber(3.14), 3.14, 0.0);
|
/openjdk10/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ |
H A D | JSONListAdapter.java | 153 public double toNumber() { method in class:JSONListAdapter 154 return obj.toNumber();
|
H A D | JSType.java | 102 public static final Call TO_NUMBER = staticCall(JSTYPE_LOOKUP, JSType.class, "toNumber", double.class, Object.class); 758 public static double toNumber(final Object obj) { method in class:JSType 769 * Converts an object for a comparison with a number. Almost identical to {@link #toNumber(Object)} but 778 // handle them here to avoid throwing an error in toNumber conversion. 779 return obj == null || obj instanceof Symbol || obj instanceof NativeSymbol ? Double.NaN : toNumber(obj); 818 public static double toNumber(final Boolean b) { method in class:JSType 830 public static double toNumber(final ScriptObject obj) { method in class:JSType 831 return toNumber(toPrimitive(obj, Number.class)); 852 * Object to number conversion that delegates to either {@link #toNumber(Object)} or to 860 return UnwarrantedOptimismException.isValid(programPoint) ? toNumberOptimistic(obj, programPoint) : toNumber(ob 908 public static double toNumber(final String str) { method in class:JSType [all...] |
H A D | ScriptRuntime.java | 697 return JSType.toNumber(xPrim) + JSType.toNumber(yPrim); 997 // Specification says comparing a number to string should be done as "equals(num, JSType.toNumber(str))". We 1000 return ((Number)num).doubleValue() == JSType.toNumber(str.toString()); 1004 return equals(JSType.toNumber((Boolean)bool), any); 1144 JSType.toNumber(px) < JSType.toNumber(py); 1164 JSType.toNumber(px) > JSType.toNumber(py); 1180 JSType.toNumber(p [all...] |
H A D | DefaultPropertyAccess.java | 53 return JSType.toNumber(get(key));
|
H A D | GlobalFunctions.java | 330 return Double.isNaN(JSType.toNumber(number)); 342 final double value = JSType.toNumber(number);
|
/openjdk10/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/ |
H A D | JavaArgumentConverters.java | 51 private static final MethodHandle TO_NUMBER = findOwnMH("toNumber", Number.class, Object.class); 149 return JSType.toNumber((String) obj); 151 return JSType.toNumber(obj.toString()); 165 private static Number toNumber(final Object obj0) { method in class:JavaArgumentConverters 173 return JSType.toNumber((String) obj); 175 return JSType.toNumber(obj.toString());
|
/openjdk10/nashorn/test/script/basic/ |
H A D | JDK-8072426.js | 57 toNumber: function() { 58 // toNumber no longer invoked 64 // Test JSObjectLinker toInt32/toLong/toNumber 83 // Test fallback from toNumber to toString for numeric conversion when toNumber doesn't exist 92 // Test fallback from toNumber to toString for numeric conversion when toNumber isn't a callable 101 // Test fallback from toNumber to toString for numeric conversion when toNumber returns a non-primitive 110 // Test TypeError from toNumber t [all...] |
/openjdk10/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/ |
H A D | LengthNotWritableFilter.java | 96 return JSType.toNumber(get(index));
|
H A D | ObjectArrayData.java | 219 return JSType.toNumber(array[index]);
|
H A D | SparseArrayData.java | 251 return JSType.toNumber(sparseMap.get(indexToKey(index)));
|