summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Bytecode/Executable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibJS/Bytecode/Executable.cpp')
-rw-r--r--Userland/Libraries/LibJS/Bytecode/Executable.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Bytecode/Executable.cpp b/Userland/Libraries/LibJS/Bytecode/Executable.cpp
new file mode 100644
index 0000000000..caa34ba450
--- /dev/null
+++ b/Userland/Libraries/LibJS/Bytecode/Executable.cpp
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#include <LibJS/Bytecode/Executable.h>
+
+namespace JS::Bytecode {
+
+void Executable::dump() const
+{
+ for (auto& block : basic_blocks)
+ block.dump(*this);
+ if (!string_table->is_empty()) {
+ outln();
+ string_table->dump();
+ }
+}
+
+}