diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/qml/v4/qv4compiler.cpp | 5 | ||||
-rw-r--r-- | src/declarative/qml/v4/qv4compiler_p_p.h | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/declarative/qml/v4/qv4compiler.cpp b/src/declarative/qml/v4/qv4compiler.cpp index 42e56d12c9..29023ae66e 100644 --- a/src/declarative/qml/v4/qv4compiler.cpp +++ b/src/declarative/qml/v4/qv4compiler.cpp @@ -62,7 +62,7 @@ static bool qmlEnableV4 = true; using namespace QDeclarativeJS; QV4CompilerPrivate::QV4CompilerPrivate() -: _function(0) , _block(0) , _discarded(false) + : _function(0) , _block(0) , _discarded(false), registerCount(0) { } @@ -74,6 +74,7 @@ void QV4CompilerPrivate::trace(int line, int column) bytecode.clear(); this->currentReg = _function->tempCount; + this->registerCount = qMax(this->registerCount, this->currentReg); foreach (IR::BasicBlock *bb, _function->basicBlocks) { if (! bb->isTerminated() && (bb->index + 1) < _function->basicBlocks.size()) @@ -1118,7 +1119,7 @@ bool QV4CompilerPrivate::compile(QDeclarativeJS::AST::Node *node) qerr << endl; } - if (discarded || subscriptionIds.count() > 0xFFFF || registeredStrings.count() > 0xFFFF) + if (discarded || subscriptionIds.count() > 0xFFFF || registeredStrings.count() > 0xFFFF || registerCount > 31) return false; return true; diff --git a/src/declarative/qml/v4/qv4compiler_p_p.h b/src/declarative/qml/v4/qv4compiler_p_p.h index 85a7c36f87..c43140663e 100644 --- a/src/declarative/qml/v4/qv4compiler_p_p.h +++ b/src/declarative/qml/v4/qv4compiler_p_p.h @@ -231,6 +231,7 @@ private: void discard() { _discarded = true; } bool _discarded; quint8 currentReg; + quint8 registerCount; bool usedSubscriptionIdsChanged; quint32 currentBlockMask; |