Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Commit 3b89f74

Browse files
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: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent e0cd719 commit 3b89f74

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

Source/JavaScriptCore/ChangeLog

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
2020-10-22 Robin Morisset <[email protected]>
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+
117
2020-10-21 Caitlin Potter <[email protected]>
218

319
[JSC] support op_get_private_name in DFG and FTL

Source/JavaScriptCore/bytecode/BytecodeDumper.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,12 @@ class BytecodeDumperBase {
4747
void printLocationAndOp(InstructionStream::Offset location, const char* op);
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
}
5658

Source/JavaScriptCore/generator/Opcode.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def dumper
269269
dumper->printLocationAndOp(__location, &"**#{@name}"[2 - __sizeShiftAmount]);
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});
273273
EOF
274274
}}
275275
}

0 commit comments

Comments
 (0)