diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-03-25 21:31:16 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-04-24 15:21:43 +0000 |
commit | 590c23b23c5f60d78aa92030f89259833496b8be (patch) | |
tree | 4a499b58c7b17cb9779f2faa018a6d61ba516f01 /src/qml/jsruntime/qv4engine.cpp | |
parent | 1af88df0725b2b6aca5db43a0fe3e31c553025b8 (diff) |
Move evalfunction and thrower onto the js stack
Change-Id: I3a0abe13d802aff8998d1c64f86b5a8f98c8335f
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4engine.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index a2edcbca16..a7c9ff8b05 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -427,8 +427,8 @@ ExecutionEngine::ExecutionEngine(EvalISelFactory *factory) globalObject->defineReadonlyProperty(QStringLiteral("Infinity"), Primitive::fromDouble(Q_INFINITY)); - evalFunction = memoryManager->alloc<EvalFunction>(global); - globalObject->defineDefaultProperty(QStringLiteral("eval"), (o = evalFunction)); + jsObjects[Eval_Function] = memoryManager->alloc<EvalFunction>(global); + globalObject->defineDefaultProperty(QStringLiteral("eval"), *evalFunction()); globalObject->defineDefaultProperty(QStringLiteral("parseInt"), GlobalFunctions::method_parseInt, 2); globalObject->defineDefaultProperty(QStringLiteral("parseFloat"), GlobalFunctions::method_parseFloat, 1); @@ -442,7 +442,7 @@ ExecutionEngine::ExecutionEngine(EvalISelFactory *factory) globalObject->defineDefaultProperty(QStringLiteral("unescape"), GlobalFunctions::method_unescape, 1); ScopedString name(scope, newString(QStringLiteral("thrower"))); - thrower = BuiltinFunction::create(global, name, ::throwTypeError); + jsObjects[ThrowerObject] = BuiltinFunction::create(global, name, ::throwTypeError); } ExecutionEngine::~ExecutionEngine() @@ -937,8 +937,6 @@ void ExecutionEngine::markObjects() for (int i = 0; i < Heap::TypedArray::NTypes; ++i) typedArrayCtors[i].mark(this); - thrower->mark(this); - if (m_qmlExtensions) m_qmlExtensions->markObjects(this); |