Title: [268871] trunk/Source/_javascript_Core
Revision
268871
Author
[email protected]
Date
2020-10-22 10:45:53 -0700 (Thu, 22 Oct 2020)

Log 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:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (268870 => 268871)


--- trunk/Source/_javascript_Core/ChangeLog	2020-10-22 17:31:05 UTC (rev 268870)
+++ trunk/Source/_javascript_Core/ChangeLog	2020-10-22 17:45:53 UTC (rev 268871)
@@ -1,3 +1,19 @@
+2020-10-22  Robin Morisset  <[email protected]>
+
+        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:
+
 2020-10-21  Caitlin Potter  <[email protected]>
 
         [JSC] support op_get_private_name in DFG and FTL

Modified: trunk/Source/_javascript_Core/bytecode/BytecodeDumper.h (268870 => 268871)


--- trunk/Source/_javascript_Core/bytecode/BytecodeDumper.h	2020-10-22 17:31:05 UTC (rev 268870)
+++ trunk/Source/_javascript_Core/bytecode/BytecodeDumper.h	2020-10-22 17:45:53 UTC (rev 268871)
@@ -47,10 +47,12 @@
     void printLocationAndOp(InstructionStream::Offset location, const char* op);
 
     template<typename T>
-    void dumpOperand(T operand, bool isFirst = false)
+    void dumpOperand(const char* operandName, T operand, bool isFirst = false)
     {
         if (!isFirst)
             m_out.print(", ");
+        m_out.print(operandName);
+        m_out.print(":");
         dumpValue(operand);
     }
 

Modified: trunk/Source/_javascript_Core/generator/Opcode.rb (268870 => 268871)


--- trunk/Source/_javascript_Core/generator/Opcode.rb	2020-10-22 17:31:05 UTC (rev 268870)
+++ trunk/Source/_javascript_Core/generator/Opcode.rb	2020-10-22 17:45:53 UTC (rev 268871)
@@ -269,7 +269,7 @@
         dumper->printLocationAndOp(__location, &"**#{@name}"[2 - __sizeShiftAmount]);
 #{print_args { |arg|
 <<-EOF.chomp
-        dumper->dumpOperand(#{arg.field_name}, #{arg.index == 0});
+        dumper->dumpOperand("#{arg.name}", #{arg.field_name}, #{arg.index == 0});
 EOF
     }}
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to