aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4script.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4script.cpp')
-rw-r--r--src/qml/jsruntime/qv4script.cpp47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp
index 25089855bb..5d7df9a9d7 100644
--- a/src/qml/jsruntime/qv4script.cpp
+++ b/src/qml/jsruntime/qv4script.cpp
@@ -58,44 +58,8 @@
#include <QtCore/QDebug>
#include <QtCore/QString>
-QT_BEGIN_NAMESPACE
-
-namespace QV4 {
-namespace Heap {
-
-struct QmlBindingWrapper : FunctionObject {
- void init(QV4::QmlContext *scope, Function *f);
-};
-
-}
-
-struct QmlBindingWrapper : FunctionObject {
- V4_OBJECT2(QmlBindingWrapper, FunctionObject)
-
- static void call(const Managed *that, Scope &scope, CallData *callData) {
- QV4::ScriptFunction::call(that, scope, callData);
- }
-};
-
-}
-
-QT_END_NAMESPACE
-
using namespace QV4;
-DEFINE_OBJECT_VTABLE(QmlBindingWrapper);
-
-void Heap::QmlBindingWrapper::init(QV4::QmlContext *scope, Function *f)
-{
- Heap::FunctionObject::init(scope, scope->d()->engine->id_eval(), /*createProto = */ false);
-
- Q_ASSERT(scope->inUse());
-
- function = f;
- if (function)
- function->compilationUnit->addref();
-}
-
Script::Script(ExecutionEngine *v4, QmlContext *qml, CompiledData::CompilationUnit *compilationUnit)
: line(0), column(0), scope(v4->rootContext()), strictMode(false), inheritContext(true), parsed(false)
, compilationUnit(compilationUnit), vmFunction(0), parseAsBinding(true)
@@ -280,17 +244,6 @@ QQmlRefPointer<QV4::CompiledData::CompilationUnit> Script::precompile(IR::Module
return isel->compile(/*generate unit data*/false);
}
-ReturnedValue Script::qmlBinding()
-{
- if (!parsed)
- parse();
- ExecutionEngine *v4 = scope->engine();
- Scope valueScope(v4);
- Scoped<QmlContext> qml(valueScope, qmlContext.value());
- ScopedObject v(valueScope, v4->memoryManager->allocObject<QmlBindingWrapper>(qml, vmFunction));
- return v.asReturnedValue();
-}
-
QV4::ReturnedValue Script::evaluate(ExecutionEngine *engine, const QString &script, QmlContext *qmlContext)
{
QV4::Scope scope(engine);