aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4objectiterator.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2016-09-09 15:37:57 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2016-10-06 11:44:08 +0000
commit3b14e2ffdd8eb4b7f7f4508768b75f2acc399370 (patch)
tree7943f293bf2d0d376d5dc620448bab1a2b58027d /src/qml/jsruntime/qv4objectiterator.cpp
parent1b90dc4482d001512f09a5785d4cbd8030879d82 (diff)
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 <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4objectiterator.cpp')
-rw-r--r--src/qml/jsruntime/qv4objectiterator.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/qml/jsruntime/qv4objectiterator.cpp b/src/qml/jsruntime/qv4objectiterator.cpp
index 4354e09248..7943a13ac0 100644
--- a/src/qml/jsruntime/qv4objectiterator.cpp
+++ b/src/qml/jsruntime/qv4objectiterator.cpp
@@ -45,30 +45,6 @@
using namespace QV4;
-ObjectIterator::ObjectIterator(ExecutionEngine *e, Value *scratch1, Value *scratch2, Object *o, uint flags)
- : engine(e)
- , object(scratch1)
- , current(scratch2)
- , arrayNode(0)
- , arrayIndex(0)
- , memberIndex(0)
- , flags(flags)
-{
- init(o);
-}
-
-ObjectIterator::ObjectIterator(Scope &scope, const Object *o, uint flags)
- : engine(scope.engine)
- , object(scope.alloc(1))
- , current(scope.alloc(1))
- , arrayNode(0)
- , arrayIndex(0)
- , memberIndex(0)
- , flags(flags)
-{
- init(o);
-}
-
void ObjectIterator::init(const Object *o)
{
object->setM(o ? o->m() : 0);