aboutsummaryrefslogtreecommitdiffstats
path: root/qmljs_engine.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2012-11-19 11:54:54 +0100
committerLars Knoll <lars.knoll@digia.com>2012-11-19 13:57:51 +0100
commitb072fd9317fa20d9206e9faaca7b0b45ae28a519 (patch)
tree8df50b7305108c52ed6899e5fa5d7f4655a14076 /qmljs_engine.cpp
parenta2676884804fb523ee586f1ebc6a11353ec79fcb (diff)
Added isNaN and isFinite to the global context.
Change-Id: Ia85d27a6ac82fd5dbf6b0f706747afa6418626b1 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'qmljs_engine.cpp')
-rw-r--r--qmljs_engine.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/qmljs_engine.cpp b/qmljs_engine.cpp
index 8097639e54..4415231934 100644
--- a/qmljs_engine.cpp
+++ b/qmljs_engine.cpp
@@ -162,7 +162,10 @@ ExecutionEngine::ExecutionEngine()
glo->__put__(rootContext, identifier(QStringLiteral("Infinity")), Value::fromDouble(INFINITY));
glo->__put__(rootContext, identifier(QStringLiteral("eval")), Value::fromObject(new EvalFunction(rootContext)));
-
+ // TODO: parseInt [15.1.2.2]
+ // TODO: parseFloat [15.1.2.3]
+ glo->__put__(rootContext, identifier(QStringLiteral("isNaN")), Value::fromObject(new IsNaNFunction(rootContext))); // isNaN [15.1.2.4]
+ glo->__put__(rootContext, identifier(QStringLiteral("isFinite")), Value::fromObject(new IsFiniteFunction(rootContext))); // isFinite [15.1.2.5]
}
ExecutionContext *ExecutionEngine::newContext()