1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-19 23:05:07 +00:00

LibJS: Show class name in the dump from the NewClass instruction

This commit is contained in:
Hendiadyoin1 2022-10-02 11:51:17 +02:00 committed by Linus Groh
parent baa4d69668
commit 3e65afa41a

View file

@ -1155,7 +1155,8 @@ String NewFunction::to_string_impl(Bytecode::Executable const&) const
String NewClass::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 String Return::to_string_impl(Bytecode::Executable const&) const