Interpreter.h 622 B

123456789101112131415161718192021222324
  1. /*
  2. * Copyright (c) 2021, Ali Mohammad Pur <mpfard@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWasm/AbstractMachine/Configuration.h>
  8. namespace Wasm {
  9. struct Interpreter {
  10. void interpret(Configuration&);
  11. private:
  12. void interpret(Configuration&, InstructionPointer&, const Instruction&);
  13. void branch_to_label(Configuration&, LabelIndex);
  14. ReadonlyBytes load_from_memory(Configuration&, const Instruction&, size_t);
  15. void store_to_memory(Configuration&, const Instruction&, ReadonlyBytes data);
  16. void call_address(Configuration&, FunctionAddress);
  17. };
  18. }