diff options
Diffstat (limited to 'src/qml/compiler')
-rw-r--r-- | src/qml/compiler/qqmlirbuilder.cpp | 1 | ||||
-rw-r--r-- | src/qml/compiler/qqmltypecompiler.cpp | 2 | ||||
-rw-r--r-- | src/qml/compiler/qv4jsir.cpp | 20 | ||||
-rw-r--r-- | src/qml/compiler/qv4ssa.cpp | 2 |
4 files changed, 13 insertions, 12 deletions
diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp index 16c4cb28ed..d871a9add5 100644 --- a/src/qml/compiler/qqmlirbuilder.cpp +++ b/src/qml/compiler/qqmlirbuilder.cpp @@ -339,6 +339,7 @@ IRBuilder::IRBuilder(const QSet<QString> &illegalNames) : illegalNames(illegalNames) , _object(0) , _propertyDeclaration(0) + , pool(0) , jsGenerator(0) { } diff --git a/src/qml/compiler/qqmltypecompiler.cpp b/src/qml/compiler/qqmltypecompiler.cpp index cde7a2acb4..3ce3e04969 100644 --- a/src/qml/compiler/qqmltypecompiler.cpp +++ b/src/qml/compiler/qqmltypecompiler.cpp @@ -1244,7 +1244,7 @@ int QQmlEnumTypeResolver::evaluateEnum(const QString &scope, const QByteArray &e imports->resolveType(scope, &type, 0, 0, 0); if (!type) return -1; - return type ? type->enumValue(compiler->enginePrivate(), QHashedCStringRef(enumValue.constData(), enumValue.length()), ok) : -1; + return type->enumValue(compiler->enginePrivate(), QHashedCStringRef(enumValue.constData(), enumValue.length()), ok); } const QMetaObject *mo = StaticQtMetaObject::get(); diff --git a/src/qml/compiler/qv4jsir.cpp b/src/qml/compiler/qv4jsir.cpp index 685825e8ea..f8cfe7da2c 100644 --- a/src/qml/compiler/qv4jsir.cpp +++ b/src/qml/compiler/qv4jsir.cpp @@ -164,12 +164,12 @@ struct RemoveSharedExpressions: IR::StmtVisitor, IR::ExprVisitor subexpressions.clear(); subexpressions.reserve(function->basicBlockCount() * 8); - foreach (BasicBlock *block, function->basicBlocks()) { + for (BasicBlock *block : function->basicBlocks()) { if (block->isRemoved()) continue; clone.setBasicBlock(block); - foreach (Stmt *s, block->statements()) { + for (Stmt *s : block->statements()) { s->accept(this); } } @@ -451,7 +451,7 @@ void Function::removeBasicBlock(BasicBlock *block) int Function::liveBasicBlocksCount() const { int count = 0; - foreach (BasicBlock *bb, basicBlocks()) + for (BasicBlock *bb : basicBlocks()) if (!bb->isRemoved()) ++count; return count; @@ -507,7 +507,7 @@ void Function::setStatementCount(int cnt) BasicBlock::~BasicBlock() { - foreach (Stmt *s, _statements) { + for (Stmt *s : qAsConst(_statements)) { Phi *p = s->asPhi(); if (p) p->destroyData(); @@ -558,7 +558,7 @@ Expr *BasicBlock::CONST(Type type, double value) } else if (type == NullType) { value = 0; } else if (type == UndefinedType) { - value = qSNaN(); + value = qQNaN(); } e->init(type, value); @@ -764,7 +764,7 @@ void BasicBlock::setStatements(const QVector<Stmt *> &newStatements) Q_ASSERT(!isRemoved()); Q_ASSERT(newStatements.size() >= _statements.size()); // FIXME: this gets quite inefficient for large basic-blocks, so this function/case should be re-worked. - foreach (Stmt *s, _statements) { + for (Stmt *s : qAsConst(_statements)) { Phi *p = s->asPhi(); if (!p) continue; @@ -978,11 +978,11 @@ void IRPrinter::print(Function *f) *out << ')' << endl << '{' << endl; - foreach (const QString *local, f->locals) + for (const QString *local : qAsConst(f->locals)) *out << " local var " << *local << endl; bool needsSeperator = !f->locals.isEmpty(); - foreach (BasicBlock *bb, f->basicBlocks()) { + for (BasicBlock *bb : f->basicBlocks()) { if (bb->isRemoved()) continue; @@ -1000,7 +1000,7 @@ void IRPrinter::print(BasicBlock *bb) std::swap(currentBB, bb); printBlockStart(); - foreach (Stmt *s, currentBB->statements()) { + for (Stmt *s : currentBB->statements()) { if (!s) continue; @@ -1315,7 +1315,7 @@ void IRPrinter::printBlockStart() *out << str; *out << "; predecessors:"; - foreach (BasicBlock *in, currentBB->in) + for (BasicBlock *in : qAsConst(currentBB->in)) *out << " L" << in->index(); if (currentBB->in.isEmpty()) *out << " none"; diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp index f20dbbf4fe..de4ab8dae5 100644 --- a/src/qml/compiler/qv4ssa.cpp +++ b/src/qml/compiler/qv4ssa.cpp @@ -2771,7 +2771,7 @@ void convertConst(Const *c, Type targetType) break; case NullType: case UndefinedType: - c->value = qSNaN(); + c->value = qQNaN(); c->type = targetType; default: Q_UNIMPLEMENTED(); |