File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,10 @@ struct PossibleConstantValues {
48
48
public:
49
49
PossibleConstantValues () : value(None()) {}
50
50
51
+ bool operator ==(const PossibleConstantValues& other) const {
52
+ return value == other.value ;
53
+ }
54
+
51
55
// Notes the contents of an expression and update our internal knowledge based
52
56
// on it and all previous values noted.
53
57
void note (Expression* expr, Module& wasm) {
@@ -155,7 +159,7 @@ struct PossibleConstantValues {
155
159
}
156
160
157
161
// Assuming we have a single value, make an expression containing that value.
158
- Expression* makeExpression (Module& wasm) {
162
+ Expression* makeExpression (Module& wasm) const {
159
163
Builder builder (wasm);
160
164
if (isConstantLiteral ()) {
161
165
return builder.makeConstantExpression (getConstantLiteral ());
Original file line number Diff line number Diff line change @@ -145,7 +145,8 @@ struct SubTypes {
145
145
// Efficiently iterate on subtypes of a type, up to a particular depth (depth
146
146
// 0 means not to traverse subtypes, etc.). The callback function receives
147
147
// (type, depth).
148
- template <typename F> void iterSubTypes (HeapType type, Index depth, F func) {
148
+ template <typename F>
149
+ void iterSubTypes (HeapType type, Index depth, F func) const {
149
150
// Start by traversing the type itself.
150
151
func (type, 0 );
151
152
@@ -186,7 +187,7 @@ struct SubTypes {
186
187
}
187
188
188
189
// As above, but iterate to the maximum depth.
189
- template <typename F> void iterSubTypes (HeapType type, F func) {
190
+ template <typename F> void iterSubTypes (HeapType type, F func) const {
190
191
return iterSubTypes (type, std::numeric_limits<Index>::max (), func);
191
192
}
192
193
You can’t perform that action at this time.
0 commit comments