~ubuntu-branches/ubuntu/vivid/qtdeclarative-opensource-src-gles/vivid

« back to all changes in this revision

Viewing changes to src/qml/compiler/qv4ssa_p.h

  • Committer: Package Import Robot
  • Author(s): Timo Jyrinki
  • Date: 2014-10-29 07:54:05 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20141029075405-gq1uzomnw3but9g2
Tags: 5.3.2-0ubuntu1
Sync package with qtdeclarative-opensource-src - 5.3.2-3ubuntu1 

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
public:
78
78
    enum { Invalid = -1 };
79
79
 
80
 
    LifeTimeInterval()
 
80
    explicit LifeTimeInterval(int rangeCapacity = 2)
81
81
        : _end(Invalid)
82
82
        , _reg(Invalid)
83
83
        , _isFixedInterval(0)
84
84
        , _isSplitFromInterval(0)
85
 
    {}
 
85
    { _ranges.reserve(rangeCapacity); }
86
86
 
87
87
    bool isValid() const { return _end != Invalid; }
88
88
 
92
92
 
93
93
    void setFrom(Stmt *from);
94
94
    void addRange(int from, int to);
95
 
    Ranges ranges() const { return _ranges; }
96
 
    void reserveRanges(int capacity) { _ranges.reserve(capacity); }
 
95
    const Ranges &ranges() const { return _ranges; }
97
96
 
98
97
    int start() const { return _ranges.first().start; }
99
98
    int end() const { return _end; }
139
138
 
140
139
class Q_QML_PRIVATE_EXPORT Optimizer
141
140
{
 
141
    Q_DISABLE_COPY(Optimizer)
 
142
 
142
143
public:
143
 
    Optimizer(Function *function)
144
 
        : function(function)
145
 
        , inSSA(false)
146
 
    {}
 
144
    Optimizer(Function *function);
147
145
 
148
146
    void run(QQmlEnginePrivate *qmlEngine);
149
147
    void convertOutOfSSA();
153
151
 
154
152
    QHash<BasicBlock *, BasicBlock *> loopStartEndBlocks() const { return startEndLoops; }
155
153
 
156
 
    QVector<LifeTimeInterval> lifeRanges() const;
 
154
    QVector<LifeTimeInterval> lifeTimeIntervals() const;
157
155
 
158
156
    QSet<IR::Jump *> calculateOptionalJumps();
159
157