Executable.h 548 B

12345678910111213141516171819202122232425
  1. /*
  2. * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/NonnullOwnPtrVector.h>
  8. #include <LibJS/Bytecode/BasicBlock.h>
  9. #include <LibJS/Bytecode/StringTable.h>
  10. namespace JS::Bytecode {
  11. struct Executable {
  12. NonnullOwnPtrVector<BasicBlock> basic_blocks;
  13. NonnullOwnPtr<StringTable> string_table;
  14. size_t number_of_registers { 0 };
  15. String const& get_string(StringTableIndex index) const { return string_table->get(index); }
  16. void dump() const;
  17. };
  18. }