2021-04-30 20:38:51 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2021, Ali Mohammad Pur <mpfard@serenityos.org>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibWasm/AbstractMachine/Configuration.h>
|
|
|
|
|
|
|
|
namespace Wasm {
|
|
|
|
|
|
|
|
struct Interpreter {
|
2021-05-23 21:34:58 +00:00
|
|
|
virtual ~Interpreter() = default;
|
|
|
|
virtual void interpret(Configuration&) = 0;
|
|
|
|
virtual bool did_trap() const = 0;
|
2023-12-16 14:19:34 +00:00
|
|
|
virtual ByteString trap_reason() const = 0;
|
2021-05-23 21:34:58 +00:00
|
|
|
virtual void clear_trap() = 0;
|
|
|
|
};
|
2021-05-21 16:40:44 +00:00
|
|
|
|
2021-04-30 20:38:51 +00:00
|
|
|
}
|