mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-13 22:52:52 +00:00
LibJS/Bytecode: Pretty-print the this
register as "this"
This commit is contained in:
parent
507f83a615
commit
9d22db2802
Notes:
sideshowbarker
2024-07-17 03:00:02 +09:00
Author: https://github.com/awesomekling
Commit: 9d22db2802
Pull-request: https://github.com/SerenityOS/serenity/pull/24504
1 changed files with 5 additions and 1 deletions
|
@ -46,7 +46,11 @@ static ByteString format_operand(StringView name, Operand operand, Bytecode::Exe
|
|||
builder.appendff("\033[32m{}\033[0m:", name);
|
||||
switch (operand.type()) {
|
||||
case Operand::Type::Register:
|
||||
builder.appendff("\033[33mreg{}\033[0m", operand.index());
|
||||
if (operand.index() == Register::this_value().index()) {
|
||||
builder.appendff("\033[33mthis\033[0m");
|
||||
} else {
|
||||
builder.appendff("\033[33mreg{}\033[0m", operand.index());
|
||||
}
|
||||
break;
|
||||
case Operand::Type::Local:
|
||||
// FIXME: Show local name.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue