Executable.cpp 535 B

1234567891011121314151617181920212223242526
  1. /*
  2. * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibJS/Bytecode/Executable.h>
  7. namespace JS::Bytecode {
  8. void Executable::dump() const
  9. {
  10. dbgln("\033[33;1mJS::Bytecode::Executable\033[0m ({})", name);
  11. for (auto& block : basic_blocks)
  12. block->dump(*this);
  13. if (!string_table->is_empty()) {
  14. outln();
  15. string_table->dump();
  16. }
  17. if (!identifier_table->is_empty()) {
  18. outln();
  19. identifier_table->dump();
  20. }
  21. }
  22. }