diff options
author | Liang Qi <liang.qi@qt.io> | 2016-06-13 09:04:09 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-06-13 19:06:06 +0200 |
commit | 4d2f743baaf6869693f4540df668e1b998154785 (patch) | |
tree | ba712b420e5d299be28faf641d30585ae8dce4e7 /src/qml | |
parent | 0c5a9ff9876cb1af53317720d1de8baae003e21d (diff) | |
parent | 0932a59971f606f07b41da19f3974d51b7008180 (diff) |
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp
Change-Id: I26d6435a29cac3840bb567ade5149c2562a94bf9
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 a5d4c6f122..8711bc049a 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 45c596985d..04b8b83b4a 100644 --- a/src/qml/jit/qv4regalloc.cpp +++ b/src/qml/jit/qv4regalloc.cpp @@ -840,6 +840,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 d603a1982a..f560b3be4f 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 4d2b263e97..c384321f1c 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper_p.h +++ b/src/qml/jsruntime/qv4qobjectwrapper_p.h @@ -222,7 +222,7 @@ private: }; -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 bae8f25efc..d9452a6257 100644 --- a/src/qml/qml.pro +++ b/src/qml/qml.pro @@ -22,6 +22,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 8c676bcec0..f7fdbf0d80 100644 --- a/src/qml/types/qqmllistmodel.cpp +++ b/src/qml/types/qqmllistmodel.cpp @@ -398,6 +398,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); |