diff options
author | Hendiadyoin1 <leon.a@serenityos.org> | 2022-10-02 11:51:17 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-10-02 18:49:17 +0100 |
commit | 3e65afa41a24ffb635265020f411f19fda3e9bdc (patch) | |
tree | 079d3588d1de4829d463885795796ac0f17e94b8 /Userland/Libraries/LibJS/Bytecode | |
parent | baa4d6966814f336f534db8485c1e9acd84e0447 (diff) | |
download | serenity-3e65afa41a24ffb635265020f411f19fda3e9bdc.zip |
LibJS: Show class name in the dump from the NewClass instruction
Diffstat (limited to 'Userland/Libraries/LibJS/Bytecode')
-rw-r--r-- | Userland/Libraries/LibJS/Bytecode/Op.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Bytecode/Op.cpp b/Userland/Libraries/LibJS/Bytecode/Op.cpp index 58be7e29d6..07adf1fe6c 100644 --- a/Userland/Libraries/LibJS/Bytecode/Op.cpp +++ b/Userland/Libraries/LibJS/Bytecode/Op.cpp @@ -1155,7 +1155,8 @@ String NewFunction::to_string_impl(Bytecode::Executable const&) const String NewClass::to_string_impl(Bytecode::Executable const&) const { - return "NewClass"; + auto name = m_class_expression.name(); + return String::formatted("NewClass '{}'", name.is_null() ? ""sv : name); } String Return::to_string_impl(Bytecode::Executable const&) const |