diff options
author | Simon Hausmann <[email protected]> | 2013-12-05 14:53:58 +0100 |
---|---|---|
committer | The Qt Project <[email protected]> | 2013-12-05 22:05:31 +0100 |
commit | e6415cc21768a0ade96d449f6d84a26037d563af (patch) | |
tree | 88de062498b42f066f1a253d6b0f53d463ed3db5 /src/qml/compiler/qv4ssa.cpp | |
parent | 7a344ef2b7796731a69a4f36e13ca9cf6f3b1ee9 (diff) |
Clean up property dependency data structures
As a follow-up to the previous commit, this patch cleans up the data structures
used to track dependencies of QML binding expressions and functions to context
and scope properties, determined at compile time.
Instead of "collecting" these depending properties upfront (codegen time), we
propagate the information that a property is a context or scope property into
the IR at codegen time and later in the isel collect these properties and their
notify signal index in a hash in the IR functions. The CompileData structure
generator then can read these hashes directly when writing out the dependency
information.
Change-Id: I32134706e2d24bf63d1b1abad0259ab072460173
Reviewed-by: Lars Knoll <[email protected]>
Diffstat (limited to 'src/qml/compiler/qv4ssa.cpp')
-rw-r--r-- | src/qml/compiler/qv4ssa.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp index 21c56e3a52..4b6fbc8abe 100644 --- a/src/qml/compiler/qv4ssa.cpp +++ b/src/qml/compiler/qv4ssa.cpp @@ -2668,15 +2668,16 @@ void optimizeSSA(Function *function, DefUsesCalculator &defUses) continue; } if (Member *member = m->source->asMember()) { - if (member->memberIsEnum) { + if (member->kind == Member::MemberOfEnum) { Const *c = function->New<Const>(); - c->init(SInt32Type, member->enumValue); + const int enumValue = member->attachedPropertiesIdOrEnumValue; + c->init(SInt32Type, enumValue); W += replaceUses(targetTemp, c); defUses.removeDef(*targetTemp); *ref[s] = 0; defUses.removeUse(s, *member->base->asTemp()); continue; - } else if (member->attachedPropertiesId != 0 && member->property && member->base->asTemp()) { + } else if (member->attachedPropertiesIdOrEnumValue != 0 && member->property && member->base->asTemp()) { // Attached properties have no dependency on their base. Isel doesn't // need it and we can eliminate the temp used to initialize it. defUses.removeUse(s, *member->base->asTemp()); |