NativeExecutable.h 518 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (c) 2023, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/Noncopyable.h>
  8. #include <AK/Types.h>
  9. #include <LibJS/Runtime/Completion.h>
  10. namespace JS::JIT {
  11. class NativeExecutable {
  12. AK_MAKE_NONCOPYABLE(NativeExecutable);
  13. AK_MAKE_NONMOVABLE(NativeExecutable);
  14. public:
  15. NativeExecutable(void* code, size_t size);
  16. ~NativeExecutable();
  17. void run(VM&);
  18. private:
  19. void* m_code { nullptr };
  20. size_t m_size { 0 };
  21. };
  22. }