Commit 9af4f2c6 authored by Christian Kamm's avatar Christian Kamm
Browse files

QmlJS: Remove unused function environment from binder.

This used to contain all functions declared in Script blocks. With them
gone, there's no reason to keep it.
parent 34d3b5d8
......@@ -43,7 +43,6 @@ Bind::Bind(Document *doc)
: _doc(doc),
_currentObjectValue(0),
_idEnvironment(0),
_functionEnvironment(0),
_rootObjectValue(0)
{
if (_doc)
......@@ -79,11 +78,6 @@ Interpreter::ObjectValue *Bind::idEnvironment() const
return _idEnvironment;
}
Interpreter::ObjectValue *Bind::functionEnvironment() const
{
return _functionEnvironment;
}
Interpreter::ObjectValue *Bind::rootObjectValue() const
{
return _rootObjectValue;
......@@ -175,7 +169,6 @@ void Bind::accept(Node *node)
bool Bind::visit(AST::UiProgram *)
{
_idEnvironment = _engine.newObject(/*prototype =*/ 0);
_functionEnvironment = _engine.newObject(/*prototype =*/ 0);
return true;
}
......
......@@ -56,7 +56,6 @@ public:
Interpreter::ObjectValue *currentObjectValue() const;
Interpreter::ObjectValue *idEnvironment() const;
Interpreter::ObjectValue *functionEnvironment() const;
Interpreter::ObjectValue *rootObjectValue() const;
Interpreter::ObjectValue *findQmlObject(AST::Node *node) const;
......@@ -98,7 +97,6 @@ private:
Interpreter::ObjectValue *_currentObjectValue;
Interpreter::ObjectValue *_idEnvironment;
Interpreter::ObjectValue *_functionEnvironment;
Interpreter::ObjectValue *_rootObjectValue;
QHash<AST::Node *, Interpreter::ObjectValue *> _qmlObjects;
......
......@@ -1316,7 +1316,6 @@ void ScopeChain::QmlComponentChain::clear()
qDeleteAll(instantiatingComponents);
instantiatingComponents.clear();
rootObject = 0;
functionScopes.clear();
ids = 0;
}
......@@ -1327,7 +1326,6 @@ void ScopeChain::QmlComponentChain::add(QList<const ObjectValue *> *list) const
if (rootObject)
list->append(rootObject);
list->append(functionScopes);
if (ids)
list->append(ids);
}
......@@ -1347,7 +1345,6 @@ void ScopeChain::update()
if (qmlComponentScope.rootObject && ! qmlScopeObjects.contains(qmlComponentScope.rootObject))
_all += qmlComponentScope.rootObject;
_all += qmlScopeObjects;
_all += qmlComponentScope.functionScopes;
if (qmlComponentScope.ids)
_all += qmlComponentScope.ids;
if (qmlTypes)
......
......@@ -256,7 +256,6 @@ public:
QList<QmlComponentChain *> instantiatingComponents;
const ObjectValue *rootObject;
QList<const ObjectValue *> functionScopes;
const ObjectValue *ids;
void add(QList<const ObjectValue *> *list) const;
......
......@@ -115,7 +115,6 @@ void Link::makeComponentChain(
if (bind->rootObjectValue())
target->rootObject = bind->rootObjectValue();
target->functionScopes += bind->functionEnvironment();
target->ids = bind->idEnvironment();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment