diff options
Diffstat (limited to 'src/binaryen-c.cpp')
-rw-r--r-- | src/binaryen-c.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/binaryen-c.cpp b/src/binaryen-c.cpp index 51a401a3c..a9bc9e2b6 100644 --- a/src/binaryen-c.cpp +++ b/src/binaryen-c.cpp @@ -4998,16 +4998,18 @@ BinaryenExpressionRef RelooperRenderAndDispose(RelooperRef relooper, namespace wasm { -class CExpressionRunner final : public ExpressionRunner<CExpressionRunner> { +// Evaluates a suspected constant expression via the C-API. Inherits most of its +// functionality from ConstantExpressionRunner, which it shares with the +// precompute pass, but must be `final` so we can `delete` its instances. +class CExpressionRunner final + : public ConstantExpressionRunner<CExpressionRunner> { public: CExpressionRunner(Module* module, CExpressionRunner::Flags flags, Index maxDepth, Index maxLoopIterations) - : ExpressionRunner<CExpressionRunner>( + : ConstantExpressionRunner<CExpressionRunner>( module, flags, maxDepth, maxLoopIterations) {} - - void trap(const char* why) override { throw NonconstantException(); } }; } // namespace wasm |