summaryrefslogtreecommitdiff
path: root/src/libs/qmljs/qmljsscopebuilder.cpp
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2010-11-23 12:57:48 +0100
committerChristian Kamm <christian.d.kamm@nokia.com>2010-11-25 15:06:44 +0100
commit93967104f3d7d2579be048d7137a404994981196 (patch)
tree02556037a835dfeb37d802e95746470719afad1a /src/libs/qmljs/qmljsscopebuilder.cpp
parent8f27c43877fa7d7bef7f2f7f7413544435f122fd (diff)
downloadqt-creator-93967104f3d7d2579be048d7137a404994981196.tar.gz
QmlJS: Reactivate instantiating component scope detection.
* Bind::usesQmlPrototype is now significantly more performant * type environments are no longer hashed by filename, but rather by Document * * duplicate scope builds are avoided Task-number: QTCREATORBUG-2835 Reviewed-by: Erik Verbruggen
Diffstat (limited to 'src/libs/qmljs/qmljsscopebuilder.cpp')
-rw-r--r--src/libs/qmljs/qmljsscopebuilder.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libs/qmljs/qmljsscopebuilder.cpp b/src/libs/qmljs/qmljsscopebuilder.cpp
index 1809b954bd..477f82db3b 100644
--- a/src/libs/qmljs/qmljsscopebuilder.cpp
+++ b/src/libs/qmljs/qmljsscopebuilder.cpp
@@ -97,6 +97,11 @@ void ScopeBuilder::pop()
void ScopeBuilder::initializeScopeChain()
{
ScopeChain &scopeChain = _context->scopeChain();
+ if (scopeChain.qmlComponentScope
+ && scopeChain.qmlComponentScope->document == _doc) {
+ return;
+ }
+
scopeChain = ScopeChain(); // reset
Interpreter::Engine *engine = _context->engine();