diff options
Diffstat (limited to 'src/qml/compiler/qv4codegen_p.h')
-rw-r--r-- | src/qml/compiler/qv4codegen_p.h | 37 |
1 files changed, 11 insertions, 26 deletions
diff --git a/src/qml/compiler/qv4codegen_p.h b/src/qml/compiler/qv4codegen_p.h index 27c8e96e16..a46d47cb67 100644 --- a/src/qml/compiler/qv4codegen_p.h +++ b/src/qml/compiler/qv4codegen_p.h @@ -191,10 +191,7 @@ public: bool isLValue() const { return !isReadonly; } Reference(Codegen *cg, Type type = Invalid) : type(type), codegen(cg) {} - Reference() - : type(Invalid) - , codegen(nullptr) - {} + Reference() {} Reference(const Reference &other); Reference &operator =(const Reference &other); @@ -367,7 +364,7 @@ public: bool stackSlotIsLocalOrArgument = false; bool isVolatile = false; bool global = false; - Codegen *codegen; + Codegen *codegen = nullptr; private: void storeAccumulator() const; @@ -386,16 +383,12 @@ public: }; struct ObjectPropertyValue { - ObjectPropertyValue() - : getter(-1) - , setter(-1) - , keyAsIndex(UINT_MAX) - {} + ObjectPropertyValue() {} Reference rvalue; - int getter; // index in _module->functions or -1 if not set - int setter; - uint keyAsIndex; + int getter = -1; // index in _module->functions or -1 if not set + int setter = -1; + uint keyAsIndex = UINT_MAX; bool hasGetter() const { return getter >= 0; } bool hasSetter() const { return setter >= 0; } @@ -406,34 +399,26 @@ protected: class Result { Reference _result; - const BytecodeGenerator::Label *_iftrue; - const BytecodeGenerator::Label *_iffalse; - Format _format; + const BytecodeGenerator::Label *_iftrue = nullptr; + const BytecodeGenerator::Label *_iffalse = nullptr; + Format _format = ex; Format _requested; bool _trueBlockFollowsCondition = false; public: explicit Result(const Reference &lrvalue) : _result(lrvalue) - , _iftrue(nullptr) - , _iffalse(nullptr) - , _format(ex) , _requested(ex) - { - } + {} explicit Result(Format requested = ex) - : _iftrue(nullptr) - , _iffalse(nullptr) - , _format(ex) - , _requested(requested) {} + : _requested(requested) {} explicit Result(const BytecodeGenerator::Label *iftrue, const BytecodeGenerator::Label *iffalse, bool trueBlockFollowsCondition) : _iftrue(iftrue) , _iffalse(iffalse) - , _format(ex) , _requested(cx) , _trueBlockFollowsCondition(trueBlockFollowsCondition) { |