From 3b14e2ffdd8eb4b7f7f4508768b75f2acc399370 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Fri, 9 Sep 2016 15:37:57 +0200 Subject: QML: Make Heap::Object and all subclasses trivial GCC6 might dead-store-eliminate out our secret write to Base::mmdata, because it expects all memory content to be "undefined" before constructor calls. Clang might take the same approach if the constructor of Heap::Object is removed. By making these structs trivial, it also makes them memcpy-able. Change-Id: I055b2ad28311b997fbe059849ebda4d5894eaa9b Reviewed-by: Simon Hausmann --- src/qml/jsapi/qjsvalueiterator.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/qml/jsapi') diff --git a/src/qml/jsapi/qjsvalueiterator.cpp b/src/qml/jsapi/qjsvalueiterator.cpp index 86c7554924..ce472ce7e5 100644 --- a/src/qml/jsapi/qjsvalueiterator.cpp +++ b/src/qml/jsapi/qjsvalueiterator.cpp @@ -103,11 +103,11 @@ QJSValueIterator::QJSValueIterator(const QJSValue& object) return; QV4::Scope scope(v4); QV4::Scoped it(scope, d_ptr->iterator.value()); - it->d()->it.flags = QV4::ObjectIterator::NoFlags; + it->d()->it().flags = QV4::ObjectIterator::NoFlags; QV4::ScopedString nm(scope); QV4::Property nextProperty; QV4::PropertyAttributes nextAttributes; - it->d()->it.next(nm.getRef(), &d_ptr->nextIndex, &nextProperty, &nextAttributes); + it->d()->it().next(nm.getRef(), &d_ptr->nextIndex, &nextProperty, &nextAttributes); d_ptr->nextName.set(v4, nm.asReturnedValue()); } @@ -157,7 +157,7 @@ bool QJSValueIterator::next() QV4::ScopedString nm(scope); QV4::Property nextProperty; QV4::PropertyAttributes nextAttributes; - it->d()->it.next(nm.getRef(), &d_ptr->nextIndex, &nextProperty, &nextAttributes); + it->d()->it().next(nm.getRef(), &d_ptr->nextIndex, &nextProperty, &nextAttributes); d_ptr->nextName.set(v4, nm.asReturnedValue()); return d_ptr->currentName.as() || d_ptr->currentIndex != UINT_MAX; } @@ -231,11 +231,11 @@ QJSValueIterator& QJSValueIterator::operator=(QJSValue& object) QV4::ScopedObject o(scope, QJSValuePrivate::getValue(&object)); d_ptr->iterator.set(v4, v4->newForEachIteratorObject(o)); QV4::Scoped it(scope, d_ptr->iterator.value()); - it->d()->it.flags = QV4::ObjectIterator::NoFlags; + it->d()->it().flags = QV4::ObjectIterator::NoFlags; QV4::ScopedString nm(scope); QV4::Property nextProperty; QV4::PropertyAttributes nextAttributes; - it->d()->it.next(nm.getRef(), &d_ptr->nextIndex, &nextProperty, &nextAttributes); + it->d()->it().next(nm.getRef(), &d_ptr->nextIndex, &nextProperty, &nextAttributes); d_ptr->nextName.set(v4, nm.asReturnedValue()); return *this; } -- cgit v1.2.3