Home
last modified time | relevance | path

Searched refs:toNumber (Results 1 – 25 of 87) sorted by relevance

1234

/external/v8/test/mjsunit/
Dstr-to-num.js28 function toNumber(val) { function
47 assertEquals(123, toNumber(" 123"));
48 assertEquals(123, toNumber("\n123"));
49 assertEquals(123, toNumber("\r123"));
50 assertEquals(123, toNumber("\t123"));
51 assertEquals(123, toNumber("\f123"));
53 assertEquals(123, toNumber("123 "));
54 assertEquals(123, toNumber("123\n"));
55 assertEquals(123, toNumber("123\r"));
56 assertEquals(123, toNumber("123\t"));
[all …]
/external/webkit/Source/WebCore/xml/
DXPathPredicate.cpp67 return -p.toNumber(); in evaluate()
82 double leftVal = lhs.toNumber(); in evaluate()
83 double rightVal = rhs.toNumber(); in evaluate()
128 if (compare(Value(stringValue(lhsSet[lindex])).toNumber(), rhs)) in compare()
153 if (compare(lhs, Value(stringValue(rhsSet[rindex])).toNumber())) in compare()
176 equal = lhs.toNumber() == rhs.toNumber(); in compare()
184 return lhs.toNumber() > rhs.toNumber(); in compare()
186 return lhs.toNumber() >= rhs.toNumber(); in compare()
188 return lhs.toNumber() < rhs.toNumber(); in compare()
190 return lhs.toNumber() <= rhs.toNumber(); in compare()
[all …]
DXPathFunctions.cpp503 double doublePos = arg(1)->evaluate().toNumber(); in evaluate()
510 double doubleLen = arg(2)->evaluate().toNumber(); in evaluate()
628 return Value(Expression::evaluationContext().node.get()).toNumber(); in evaluate()
629 return arg(0)->evaluate().toNumber(); in evaluate()
644 sum += Value(stringValue(nodes[i])).toNumber(); in evaluate()
651 return floor(arg(0)->evaluate().toNumber()); in evaluate()
656 return ceil(arg(0)->evaluate().toNumber()); in evaluate()
672 return round(arg(0)->evaluate().toNumber()); in evaluate()
DXPathValue.cpp87 double Value::toNumber() const in toNumber() function in WebCore::XPath::Value
91 return Value(toString()).toNumber(); in toNumber()
DXPathResult.cpp79 m_value = m_value.toNumber(); in convertTo()
129 return m_value.toNumber(); in numberValue()
/external/webkit/Source/JavaScriptCore/runtime/
DMathObject.cpp120 return JSValue::encode(jsNumber(fabs(exec->argument(0).toNumber(exec)))); in mathProtoFuncAbs()
125 return JSValue::encode(jsDoubleNumber(acos(exec->argument(0).toNumber(exec)))); in mathProtoFuncACos()
130 return JSValue::encode(jsDoubleNumber(asin(exec->argument(0).toNumber(exec)))); in mathProtoFuncASin()
135 return JSValue::encode(jsDoubleNumber(atan(exec->argument(0).toNumber(exec)))); in mathProtoFuncATan()
140 double arg0 = exec->argument(0).toNumber(exec); in mathProtoFuncATan2()
141 double arg1 = exec->argument(1).toNumber(exec); in mathProtoFuncATan2()
147 return JSValue::encode(jsNumber(ceil(exec->argument(0).toNumber(exec)))); in mathProtoFuncCeil()
152 return JSValue::encode(jsDoubleNumber(cos(exec->argument(0).toNumber(exec)))); in mathProtoFuncCos()
157 return JSValue::encode(jsDoubleNumber(exp(exec->argument(0).toNumber(exec)))); in mathProtoFuncExp()
162 return JSValue::encode(jsNumber(floor(exec->argument(0).toNumber(exec)))); in mathProtoFuncFloor()
[all …]
DDateConstructor.cpp89 value = primitive.toNumber(exec); in constructDate()
93 args.at(0).toNumber(exec), in constructDate()
94 args.at(1).toNumber(exec), in constructDate()
95 args.at(2).toNumber(exec), in constructDate()
96 args.at(3).toNumber(exec), in constructDate()
97 args.at(4).toNumber(exec), in constructDate()
98 args.at(5).toNumber(exec), in constructDate()
99 args.at(6).toNumber(exec) in constructDate()
172 exec->argument(0).toNumber(exec), in dateUTC()
173 exec->argument(1).toNumber(exec), in dateUTC()
[all …]
DOperations.cpp58 return jsNumber(p1.toNumber(callFrame) + p2.toNumber(callFrame)); in jsAddSlowCase()
DNumberConstructor.cpp108 double n = exec->argumentCount() ? exec->argument(0).toNumber(exec) : 0; in constructWithNumberConstructor()
122 return JSValue::encode(jsNumber(!exec->argumentCount() ? 0 : exec->argument(0).toNumber(exec))); in callNumberConstructor()
DJSValue.cpp46 double d = toNumber(exec); in toInteger()
54 return trunc(toNumber(exec)); in toIntegerPreserveNaN()
DJSCell.h112 virtual double toNumber(ExecState*) const;
298 ALWAYS_INLINE double JSValue::toNumber(ExecState* exec) const in toNumber() function
305 return asCell()->toNumber(exec); in toNumber()
/external/webkit/Source/WebCore/bridge/jni/jsc/
DJNIUtilityPrivate.cpp79 jboolean value = (jboolean)item.toNumber(exec); in convertArrayInstanceToJavaArray()
90 jbyte value = (jbyte)item.toNumber(exec); in convertArrayInstanceToJavaArray()
115 jshort value = (jshort)item.toNumber(exec); in convertArrayInstanceToJavaArray()
126 jint value = (jint)item.toNumber(exec); in convertArrayInstanceToJavaArray()
137 jlong value = (jlong)item.toNumber(exec); in convertArrayInstanceToJavaArray()
148 jfloat value = (jfloat)item.toNumber(exec); in convertArrayInstanceToJavaArray()
159 jdouble value = (jdouble)item.toNumber(exec); in convertArrayInstanceToJavaArray()
263 result.z = (jboolean)value.toNumber(exec); in convertValueToJValue()
269 result.b = (jbyte)value.toNumber(exec); in convertValueToJValue()
275 result.c = (jchar)value.toNumber(exec); in convertValueToJValue()
[all …]
/external/webkit/Source/WebCore/bindings/js/
DJSDeviceMotionEventCustom.cpp50 double x = xValue.toNumber(exec); in readAccelerationArgument()
58 double y = yValue.toNumber(exec); in readAccelerationArgument()
66 double z = zValue.toNumber(exec); in readAccelerationArgument()
88 double alpha = alphaValue.toNumber(exec); in readRotationRateArgument()
96 double beta = betaValue.toNumber(exec); in readRotationRateArgument()
104 double gamma = gammaValue.toNumber(exec); in readRotationRateArgument()
185 double interval = exec->argument(6).toNumber(exec); in initDeviceMotionEvent()
DJSDeviceOrientationEventCustom.cpp70 double alpha = exec->argument(3).toNumber(exec); in initDeviceOrientationEvent()
72 double beta = exec->argument(4).toNumber(exec); in initDeviceOrientationEvent()
74 double gamma = exec->argument(5).toNumber(exec); in initDeviceOrientationEvent()
DJSWebKitPointCustom.cpp42 x = static_cast<float>(exec->argument(0).toNumber(exec)); in constructJSWebKitPoint()
43 y = static_cast<float>(exec->argument(1).toNumber(exec)); in constructJSWebKitPoint()
DJSGeolocationCustom.cpp79 double timeoutNumber = timeoutValue.toNumber(exec); in createPositionOptions()
95 double maximumAgeNumber = maximumAgeValue.toNumber(exec); in createPositionOptions()
DJSArrayBufferViewHelper.h76 impl->set(i + offset, v.toNumber(exec)); in setWebGLArrayHelper()
146 array->set(i, v.toNumber(exec)); in constructArrayBufferView()
DJSFloat32ArrayCustom.cpp38 impl()->set(index, static_cast<float>(value.toNumber(exec))); in indexSetter()
/external/webkit/Source/JavaScriptCore/qt/tests/qscriptvalue/
Dtst_qscriptvalue.cpp69 QCOMPARE(v.toNumber(), 1.0); in ctor()
82 QCOMPARE(v.toNumber(), 1.0); in ctor()
95 QCOMPARE(v.toNumber(), 1.0); in ctor()
101 QCOMPARE(v.toNumber(), 12345678910.5); in ctor()
139 QCOMPARE(v.toNumber(), 1.0); in ctor()
145 QCOMPARE(v5.toNumber(), 1.0); in ctor()
177 QCOMPARE(v.toNumber(), 1.0); in ctor()
185 QCOMPARE(v.toNumber(), 1.0); in ctor()
193 QCOMPARE(v.toNumber(), 1.0); in ctor()
232 QCOMPARE(v.toNumber(), 1.0); in ctor()
[all …]
Dtst_qscriptvalue_generated_totype.cpp428 void tst_QScriptValue::toNumber() in toNumber() function in tst_QScriptValue
433 QVERIFY(qIsNaN(value.toNumber())); in toNumber()
437 QVERIFY(qIsInf(value.toNumber())); in toNumber()
438 QVERIFY(qIsInf(value.toNumber())); in toNumber()
441 QCOMPARE(value.toNumber(), expected); in toNumber()
442 QCOMPARE(value.toNumber(), expected); in toNumber()
/external/webkit/Source/JavaScriptCore/qt/tests/qscriptengine/
Dtst_qscriptengine.cpp324 QCOMPARE(ret.toNumber(), 456.0); in evaluateProgram()
354 double expected = eng.evaluate(program).toNumber(); in evaluateProgram()
358 double ret = eng2.evaluate(program).toNumber(); in evaluateProgram()
478 QCOMPARE(tmp.toNumber(), falskt.toNumber()); in toObject()
487 QCOMPARE(tmp.toNumber(), sant.toNumber()); in toObject()
496 QCOMPARE(tmp.toNumber(), number.toNumber()); in toObject()
723 QVERIFY(qIsNaN(ret.toNumber())); in newDate()
/external/webkit/Source/JavaScriptCore/qt/benchmarks/qscriptvalue/
Dtst_qscriptvalue.cpp74 void toNumber();
311 void tst_QScriptValue::toNumber() in toNumber() function in tst_QScriptValue
315 value.toNumber(); in toNumber()
/external/webkit/Source/JavaScriptCore/qt/api/
Dqscriptvalue_p.h109 inline qsreal toNumber() const;
510 qsreal QScriptValuePrivate::toNumber() const in toNumber() function
574 qsreal result = toNumber(); in toInteger()
746 return u.m_number == other->toNumber(); in equals()
757 return toNumber() == other->u.m_number; in equals()
759 return toNumber() == other->toNumber(); in equals()
766 return toNumber() == other->toNumber(); in equals()
768 return toNumber() == other->u.m_number; in equals()
/external/webkit/Source/JavaScriptCore/tests/mozilla/ecma_2/Statements/
Dforin-002.js26 this.toNumber = new Function ( "return this.value + 0" );
/external/apache-xml/src/main/java/org/apache/xalan/extensions/
DExpressionContext.java60 public double toNumber(Node n); in toNumber() method

1234