diff options
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/compiler/qv4codegen.cpp | 5 | ||||
-rw-r--r-- | src/qml/jit/qv4regalloc.cpp | 1 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 8 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4qobjectwrapper_p.h | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4scopedvalue_p.h | 2 | ||||
-rw-r--r-- | src/qml/qml.pro | 5 | ||||
-rw-r--r-- | src/qml/types/qqmllistmodel.cpp | 2 |
7 files changed, 17 insertions, 8 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp index d08d2aafa2..f5733b96f0 100644 --- a/src/qml/compiler/qv4codegen.cpp +++ b/src/qml/compiler/qv4codegen.cpp @@ -2724,6 +2724,9 @@ bool Codegen::visit(WithStatement *ast) _function->hasWith = true; + const int withObject = _block->newTemp(); + _block->MOVE(_block->TEMP(withObject), *expression(ast->expression)); + // need an exception handler for with to cleanup the with scope IR::BasicBlock *withExceptionHandler = _function->newBasicBlock(exceptionHandler()); withExceptionHandler->EXP(withExceptionHandler->CALL(withExceptionHandler->NAME(IR::Name::builtin_pop_scope, 0, 0), 0)); @@ -2738,8 +2741,6 @@ bool Codegen::visit(WithStatement *ast) _block->JUMP(withBlock); _block = withBlock; - int withObject = _block->newTemp(); - _block->MOVE(_block->TEMP(withObject), *expression(ast->expression)); IR::ExprList *args = _function->New<IR::ExprList>(); args->init(_block->TEMP(withObject)); _block->EXP(_block->CALL(_block->NAME(IR::Name::builtin_push_with_scope, 0, 0), args)); diff --git a/src/qml/jit/qv4regalloc.cpp b/src/qml/jit/qv4regalloc.cpp index 131e0a5b0a..c21f52ecd3 100644 --- a/src/qml/jit/qv4regalloc.cpp +++ b/src/qml/jit/qv4regalloc.cpp @@ -839,6 +839,7 @@ public: , _assignedSpillSlots(assignedSpillSlots) , _intRegs(intRegs) , _fpRegs(fpRegs) + , _currentStmt(0) { _unprocessed = unprocessed; _liveAtStart.reserve(function->basicBlockCount()); diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index d9692a0876..15a4ed2e56 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -188,6 +188,10 @@ ExecutionEngine::ExecutionEngine(EvalISelFactory *factory) /* writable */ true, /* executable */ false, /* includesGuardPages */ true); jsStackBase = (Value *)jsStack->base(); +#ifdef V4_USE_VALGRIND + VALGRIND_MAKE_MEM_UNDEFINED(jsStackBase, 2*JSStackLimit); +#endif + jsStackTop = jsStackBase; exceptionValue = jsAlloca(1); @@ -197,10 +201,6 @@ ExecutionEngine::ExecutionEngine(EvalISelFactory *factory) typedArrayCtors = static_cast<FunctionObject *>(jsAlloca(NTypedArrayTypes)); jsStrings = jsAlloca(NJSStrings); -#ifdef V4_USE_VALGRIND - VALGRIND_MAKE_MEM_UNDEFINED(jsStackBase, 2*JSStackLimit); -#endif - // set up stack limits jsStackLimit = jsStackBase + JSStackLimit/sizeof(Value); diff --git a/src/qml/jsruntime/qv4qobjectwrapper_p.h b/src/qml/jsruntime/qv4qobjectwrapper_p.h index d2650efd58..f101f352f1 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper_p.h +++ b/src/qml/jsruntime/qv4qobjectwrapper_p.h @@ -191,7 +191,7 @@ struct Q_QML_EXPORT QObjectMethod : public QV4::FunctionObject static void markObjects(Heap::Base *that, QV4::ExecutionEngine *e); }; -struct QmlSignalHandler : public QV4::Object +struct Q_QML_EXPORT QmlSignalHandler : public QV4::Object { V4_OBJECT2(QmlSignalHandler, QV4::Object) V4_PROTOTYPE(signalHandlerPrototype) diff --git a/src/qml/jsruntime/qv4scopedvalue_p.h b/src/qml/jsruntime/qv4scopedvalue_p.h index e01571c3d6..58797f5eda 100644 --- a/src/qml/jsruntime/qv4scopedvalue_p.h +++ b/src/qml/jsruntime/qv4scopedvalue_p.h @@ -88,7 +88,7 @@ struct Scope { memset(mark, 0, (engine->jsStackTop - mark)*sizeof(Value)); #endif #ifdef V4_USE_VALGRIND - VALGRIND_MAKE_MEM_UNDEFINED(mark, engine->jsStackLimit - mark); + VALGRIND_MAKE_MEM_UNDEFINED(mark, (engine->jsStackLimit - mark) * sizeof(Value)); #endif engine->jsStackTop = mark; } diff --git a/src/qml/qml.pro b/src/qml/qml.pro index e30c39c8b9..f4862a17a6 100644 --- a/src/qml/qml.pro +++ b/src/qml/qml.pro @@ -16,6 +16,11 @@ exists("qqml_enable_gcov") { LIBS_PRIVATE += -lgcov } +greaterThan(QT_GCC_MAJOR_VERSION, 5) { + # Our code is bad. Temporary workaround. + QMAKE_CXXFLAGS += -fno-delete-null-pointer-checks +} + QMAKE_DOCS = $$PWD/doc/qtqml.qdocconf # 2415: variable "xx" of static storage duration was declared but never referenced diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qml/types/qqmllistmodel.cpp index 44a4ff03e9..1e1ebc4939 100644 --- a/src/qml/types/qqmllistmodel.cpp +++ b/src/qml/types/qqmllistmodel.cpp @@ -396,6 +396,8 @@ void ListModel::updateCacheIndices() QVariant ListModel::getProperty(int elementIndex, int roleIndex, const QQmlListModel *owner, QV4::ExecutionEngine *eng) { + if (roleIndex >= m_layout->roleCount()) + return QVariant(); ListElement *e = elements[elementIndex]; const ListLayout::Role &r = m_layout->getExistingRole(roleIndex); return e->getProperty(r, owner, eng); |