⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 268871 in webkit


Ignore:
Timestamp:
Oct 22, 2020, 10:45:53 AM (6 years ago)
Author:
rmorisset@apple.com
Message:

Use operand names when dumping Bytecode
https://bugs.webkit.org/show_bug.cgi?id=218084

Reviewed by Saam Barati.

For example this would output the following:

[ 258] put_to_scope scope:loc7, var:3, value:loc8, getPutInfo:1048576<DoNotThrowIfNotFound|GlobalProperty|Initialization|NotStrictMode>, symbolTableOrScopeDepth:0, offset:0

instead of

[ 258] put_to_scope loc7, 3, loc8, 1048576<DoNotThrowIfNotFound|GlobalProperty|Initialization|NotStrictMode>, 0, 0

  • bytecode/BytecodeDumper.h:

(JSC::BytecodeDumperBase::dumpOperand):

  • generator/Opcode.rb:
Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r268794 r268871  
     12020-10-22  Robin Morisset  <rmorisset@apple.com>
     2
     3        Use operand names when dumping Bytecode
     4        https://bugs.webkit.org/show_bug.cgi?id=218084
     5
     6        Reviewed by Saam Barati.
     7
     8        For example this would output the following:
     9          [ 258] put_to_scope       scope:loc7, var:3, value:loc8, getPutInfo:1048576<DoNotThrowIfNotFound|GlobalProperty|Initialization|NotStrictMode>, symbolTableOrScopeDepth:0, offset:0
     10        instead of
     11          [ 258] put_to_scope       loc7, 3, loc8, 1048576<DoNotThrowIfNotFound|GlobalProperty|Initialization|NotStrictMode>, 0, 0
     12
     13        * bytecode/BytecodeDumper.h:
     14        (JSC::BytecodeDumperBase::dumpOperand):
     15        * generator/Opcode.rb:
     16
    1172020-10-21  Caitlin Potter  <caitp@igalia.com>
    218
  • trunk/Source/JavaScriptCore/bytecode/BytecodeDumper.h

    r263618 r268871  
    4848
    4949    template<typename T>
    50     void dumpOperand(T operand, bool isFirst = false)
     50    void dumpOperand(const char* operandName, T operand, bool isFirst = false)
    5151    {
    5252        if (!isFirst)
    5353            m_out.print(", ");
     54        m_out.print(operandName);
     55        m_out.print(":");
    5456        dumpValue(operand);
    5557    }
  • trunk/Source/JavaScriptCore/generator/Opcode.rb

    r264049 r268871  
    270270#{print_args { |arg|
    271271<<-EOF.chomp
    272         dumper->dumpOperand(#{arg.field_name}, #{arg.index == 0});
     272        dumper->dumpOperand("#{arg.name}", #{arg.field_name}, #{arg.index == 0});
    273273EOF
    274274    }}
Note: See TracChangeset for help on using the changeset viewer.