diff options
-rw-r--r-- | src/wasm-interpreter.h | 6 | ||||
-rw-r--r-- | src/wasm-validator.h | 6 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index 3db818787..76c3f66ba 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -49,8 +49,7 @@ int32_t safe_ctz(int32_t v) { return _BitScanForward(&result,v) ? result : 32; } -int32_t platform_popcount(int32_t v) -{ +int32_t platform_popcount(int32_t v) { return __popcnt(v); } #else @@ -64,8 +63,7 @@ int32_t safe_ctz(int32_t v) { return __builtin_ctz(v); } -int32_t platform_popcount(int32_t v) -{ +int32_t platform_popcount(int32_t v) { return __buildin_popcount(v); } #endif diff --git a/src/wasm-validator.h b/src/wasm-validator.h index 46bcf7a2e..f0e73fb85 100644 --- a/src/wasm-validator.h +++ b/src/wasm-validator.h @@ -39,7 +39,7 @@ public: void visitLoop(Loop *curr) override { if (curr->in.is()) { - ChildChecker childChecker(curr->in); + LoopChildChecker childChecker(curr->in); childChecker.walk(curr->body); shouldBeTrue(childChecker.valid); } @@ -98,11 +98,11 @@ public: private: // the "in" label has a none type, since no one can receive its value. make sure no one breaks to it with a value. - struct ChildChecker : public WasmWalker { + struct LoopChildChecker : public WasmWalker { Name in; bool valid = true; - ChildChecker(Name in) : in(in) {} + LoopChildChecker(Name in) : in(in) {} void visitBreak(Break *curr) override { if (curr->name == in && curr->value) { |