diff options
-rw-r--r-- | src/qml/compiler/qv4codegen.cpp | 64 | ||||
-rw-r--r-- | src/qml/compiler/qv4codegen_p.h | 7 |
2 files changed, 4 insertions, 67 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp index a90dca4884..321cf21c54 100644 --- a/src/qml/compiler/qv4codegen.cpp +++ b/src/qml/compiler/qv4codegen.cpp @@ -3965,70 +3965,6 @@ void Codegen::RValue::loadInAccumulator() const } -Codegen::Reference::Reference(const Codegen::Reference &other) -{ - *this = other; -} - -Codegen::Reference &Codegen::Reference::operator =(const Reference &other) -{ - type = other.type; - - switch (type) { - case Invalid: - case Accumulator: - break; - case Super: - break; - case SuperProperty: - property = other.property; - break; - case StackSlot: - theStackSlot = other.theStackSlot; - break; - case ScopedLocal: - index = other.index; - scope = other.scope; - break; - case Name: - // name is always copied - break; - case Member: - propertyBase = other.propertyBase; - propertyNameIndex = other.propertyNameIndex; - break; - case Subscript: - elementBase = other.elementBase; - elementSubscript = other.elementSubscript; - break; - case Import: - index = other.index; - break; - case Const: - constant = other.constant; - break; - case QmlScopeObject: - case QmlContextObject: - qmlBase = other.qmlBase; - qmlCoreIndex = other.qmlCoreIndex; - qmlNotifyIndex = other.qmlNotifyIndex; - capturePolicy = other.capturePolicy; - break; - } - - // keep loaded reference - isArgOrEval = other.isArgOrEval; - codegen = other.codegen; - isReadonly = other.isReadonly; - isReferenceToConst = other.isReferenceToConst; - name = other.name; - requiresTDZCheck = other.requiresTDZCheck; - stackSlotIsLocalOrArgument = other.stackSlotIsLocalOrArgument; - isVolatile = other.isVolatile; - global = other.global; - return *this; -} - bool Codegen::Reference::operator==(const Codegen::Reference &other) const { if (type != other.type) diff --git a/src/qml/compiler/qv4codegen_p.h b/src/qml/compiler/qv4codegen_p.h index afcc1b67ad..c25e386131 100644 --- a/src/qml/compiler/qv4codegen_p.h +++ b/src/qml/compiler/qv4codegen_p.h @@ -194,9 +194,10 @@ public: Reference(Codegen *cg, Type type = Invalid) : type(type), codegen(cg) {} Reference() {} - Reference(const Reference &other); - - Reference &operator =(const Reference &other); + Reference(const Reference &) = default; + Reference(Reference &&) = default; + Reference &operator =(const Reference &) = default; + Reference &operator =(Reference &&) = default; bool operator==(const Reference &other) const; bool operator!=(const Reference &other) const |