diff options
Diffstat (limited to 'src/binary-reader-nop.h')
-rw-r--r-- | src/binary-reader-nop.h | 41 |
1 files changed, 10 insertions, 31 deletions
diff --git a/src/binary-reader-nop.h b/src/binary-reader-nop.h index 7bb0ec6a..a85e79aa 100644 --- a/src/binary-reader-nop.h +++ b/src/binary-reader-nop.h @@ -94,7 +94,7 @@ class BinaryReaderNop : public BinaryReaderDelegate { string_view field_name, Index except_index, TypeVector& sig) override { - return AllowIfFutureExceptions(); + return Result::Ok; } Result EndImportSection() override { return Result::Ok; } @@ -188,12 +188,8 @@ class BinaryReaderNop : public BinaryReaderDelegate { } Result OnCallExpr(Index func_index) override { return Result::Ok; } Result OnCallIndirectExpr(Index sig_index) override { return Result::Ok; } - Result OnCatchExpr(Index except_index) override { - return AllowIfFutureExceptions(); - } - Result OnCatchAllExpr() override { - return AllowIfFutureExceptions(); - } + Result OnCatchExpr(Index except_index) override { return Result::Ok; } + Result OnCatchAllExpr() override { return Result::Ok; } Result OnCompareExpr(Opcode opcode) override { return Result::Ok; } Result OnConvertExpr(Opcode opcode) override { return Result::Ok; } Result OnCurrentMemoryExpr() override { return Result::Ok; } @@ -220,9 +216,7 @@ class BinaryReaderNop : public BinaryReaderDelegate { return Result::Ok; } Result OnNopExpr() override { return Result::Ok; } - Result OnRethrowExpr(Index depth) override { - return AllowIfFutureExceptions(); - } + Result OnRethrowExpr(Index depth) override { return Result::Ok; } Result OnReturnExpr() override { return Result::Ok; } Result OnSelectExpr() override { return Result::Ok; } Result OnSetGlobalExpr(Index global_index) override { return Result::Ok; } @@ -233,11 +227,9 @@ class BinaryReaderNop : public BinaryReaderDelegate { return Result::Ok; } Result OnTeeLocalExpr(Index local_index) override { return Result::Ok; } - Result OnThrowExpr(Index depth) override { - return AllowIfFutureExceptions(); - } + Result OnThrowExpr(Index depth) override { return Result::Ok; } Result OnTryExpr(Index num_types, Type* sig_types) override { - return AllowIfFutureExceptions(); + return Result::Ok; } Result OnUnaryExpr(Opcode opcode) override { return Result::Ok; } Result OnUnreachableExpr() override { return Result::Ok; } @@ -326,18 +318,12 @@ class BinaryReaderNop : public BinaryReaderDelegate { Result EndRelocSection() override { return Result::Ok; } /* Exception section */ - Result BeginExceptionSection(Offset size) override { - return AllowIfFutureExceptions(); - } - Result OnExceptionCount(Index count) override { - return AllowIfFutureExceptions(); - } + Result BeginExceptionSection(Offset size) override { return Result::Ok; } + Result OnExceptionCount(Index count) override { return Result::Ok; } Result OnExceptionType(Index index, TypeVector& sig) override { - return AllowIfFutureExceptions(); - } - Result EndExceptionSection() override { - return AllowIfFutureExceptions(); + return Result::Ok; } + Result EndExceptionSection() override { return Result::Ok; } /* Linking section */ Result BeginLinkingSection(Offset size) override { return Result::Ok; } @@ -365,13 +351,6 @@ class BinaryReaderNop : public BinaryReaderDelegate { Result OnInitExprI64ConstExpr(Index index, uint64_t value) override { return Result::Ok; } - - bool allow_future_exceptions = false; - - private: - Result AllowIfFutureExceptions() const { - return allow_future_exceptions ? Result::Ok : Result::Error; - } }; } // namespace wabt |