|
Lines 132-138
public:
Source/JavaScriptCore/b3/B3Procedure.h_sec1
|
| 132 |
|
132 |
|
| 133 |
iterator(const Procedure& procedure, unsigned index) |
133 |
iterator(const Procedure& procedure, unsigned index) |
| 134 |
: m_procedure(&procedure) |
134 |
: m_procedure(&procedure) |
| 135 |
, m_index(index) |
135 |
, m_index(findNext(index)) |
| 136 |
{ |
136 |
{ |
| 137 |
} |
137 |
} |
| 138 |
|
138 |
|
|
Lines 143-149
public:
Source/JavaScriptCore/b3/B3Procedure.h_sec2
|
| 143 |
|
143 |
|
| 144 |
iterator& operator++() |
144 |
iterator& operator++() |
| 145 |
{ |
145 |
{ |
| 146 |
m_index++; |
146 |
m_index = findNext(m_index + 1); |
| 147 |
return *this; |
147 |
return *this; |
| 148 |
} |
148 |
} |
| 149 |
|
149 |
|
|
Lines 159-164
public:
Source/JavaScriptCore/b3/B3Procedure.h_sec3
|
| 159 |
} |
159 |
} |
| 160 |
|
160 |
|
| 161 |
private: |
161 |
private: |
|
|
162 |
unsigned findNext(unsigned index) |
| 163 |
{ |
| 164 |
while (index < m_procedure->m_values.size() && !m_procedure->m_values[index]) |
| 165 |
index++; |
| 166 |
return index; |
| 167 |
} |
| 162 |
|
168 |
|
| 163 |
const Procedure* m_procedure; |
169 |
const Procedure* m_procedure; |
| 164 |
unsigned m_index; |
170 |
unsigned m_index; |
|
Lines 177-182
public:
Source/JavaScriptCore/b3/B3Procedure.h_sec4
|
| 177 |
|
183 |
|
| 178 |
ValuesCollection values() const { return ValuesCollection(*this); } |
184 |
ValuesCollection values() const { return ValuesCollection(*this); } |
| 179 |
|
185 |
|
|
|
186 |
void deleteValue(Value*); |
| 187 |
|
| 180 |
// The name has to be a string literal, since we don't do any memory management for the string. |
188 |
// The name has to be a string literal, since we don't do any memory management for the string. |
| 181 |
void setLastPhaseName(const char* name) |
189 |
void setLastPhaseName(const char* name) |
| 182 |
{ |
190 |
{ |
|
Lines 186-193
public:
Source/JavaScriptCore/b3/B3Procedure.h_sec5
|
| 186 |
const char* lastPhaseName() const { return m_lastPhaseName; } |
194 |
const char* lastPhaseName() const { return m_lastPhaseName; } |
| 187 |
|
195 |
|
| 188 |
private: |
196 |
private: |
|
|
197 |
JS_EXPORT_PRIVATE size_t addValueIndex(); |
| 198 |
|
| 189 |
Vector<std::unique_ptr<BasicBlock>> m_blocks; |
199 |
Vector<std::unique_ptr<BasicBlock>> m_blocks; |
| 190 |
Vector<std::unique_ptr<Value>> m_values; |
200 |
Vector<std::unique_ptr<Value>> m_values; |
|
|
201 |
Vector<size_t> m_valueIndexFreeList; |
| 191 |
const char* m_lastPhaseName; |
202 |
const char* m_lastPhaseName; |
| 192 |
}; |
203 |
}; |
| 193 |
|
204 |
|