diff options
author | Alon Zakai <azakai@google.com> | 2024-01-05 09:22:02 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-05 09:22:02 -0800 |
commit | bdafd1116f2fd56ef8a86b3b1a18f3670e4004ed (patch) | |
tree | 6a054241e141b1fe0ee96ba82f85085997ba6d9e | |
parent | d312604d46ff3e1e14228394a2a4536b71483520 (diff) | |
download | binaryen-bdafd1116f2fd56ef8a86b3b1a18f3670e4004ed.tar.gz binaryen-bdafd1116f2fd56ef8a86b3b1a18f3670e4004ed.tar.bz2 binaryen-bdafd1116f2fd56ef8a86b3b1a18f3670e4004ed.zip |
[NFC] Add some const annotations (#6203)
-rw-r--r-- | src/literal.h | 6 | ||||
-rw-r--r-- | src/wasm-interpreter.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/literal.h b/src/literal.h index b484fc3b8..971cc8b3e 100644 --- a/src/literal.h +++ b/src/literal.h @@ -698,7 +698,7 @@ public: } Literals(size_t initialSize) : SmallVector(initialSize) {} - Type getType() { + Type getType() const { if (empty()) { return Type::none; } @@ -711,8 +711,8 @@ public: } return Type(types); } - bool isNone() { return size() == 0; } - bool isConcrete() { return size() != 0; } + bool isNone() const { return size() == 0; } + bool isConcrete() const { return size() != 0; } }; std::ostream& operator<<(std::ostream& o, wasm::Literal literal); diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index eb0a1274a..eeca7c3cc 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -80,7 +80,7 @@ public: return builder.makeConstantExpression(values); } - bool breaking() { return breakTo.is(); } + bool breaking() const { return breakTo.is(); } void clearIf(Name target) { if (breakTo == target) { |