WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
171280
Make DFG SpeculatedType dumps easier to read.
https://bugs.webkit.org/show_bug.cgi?id=171280
Summary
Make DFG SpeculatedType dumps easier to read.
Mark Lam
Reported
2017-04-25 10:31:16 PDT
Adding a pretty printer to insert |s between each type and changing the dumped strings to match the SpeculatedType names case-wise.
Attachments
proposed patch.
(10.61 KB, patch)
2017-04-25 10:35 PDT
,
Mark Lam
saam
: review+
Details
Formatted Diff
Diff
patch for landing.
(10.54 KB, patch)
2017-04-25 10:59 PDT
,
Mark Lam
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Mark Lam
Comment 1
2017-04-25 10:35:39 PDT
Created
attachment 308114
[details]
proposed patch.
Saam Barati
Comment 2
2017-04-25 10:41:54 PDT
Comment on
attachment 308114
[details]
proposed patch. View in context:
https://bugs.webkit.org/attachment.cgi?id=308114&action=review
> Source/JavaScriptCore/bytecode/SpeculatedType.cpp:63 > +struct PrettyPrinter { > + PrettyPrinter(PrintStream& out) > + : out(out) > + { } > + > + template<typename T> > + void print(const T& value) > + { > + if (!isFirst) > + out.print("|"); > + out.print(value); > + isFirst = false; > + } > + > + PrintStream& out; > + bool isFirst { true }; > +};
I think you can just use CommaPrinter with "|" as the input.
Mark Lam
Comment 3
2017-04-25 10:48:05 PDT
Comment on
attachment 308114
[details]
proposed patch. View in context:
https://bugs.webkit.org/attachment.cgi?id=308114&action=review
>> Source/JavaScriptCore/bytecode/SpeculatedType.cpp:63 >> +}; > > I think you can just use CommaPrinter with "|" as the input.
I can change PrettyPrinter to use CommaPrinter to print the |, but I'll still need the PrettyPrinter. Note that dumpSpeculation() has 2 streams: the real output PrintStream, and a StringPrintStream. That means I need to keep 2 CommaPrinter instances: one for each of the streams. Using the PrinterPrinter makes it easier to track which CommaPrinter instance to use.
Mark Lam
Comment 4
2017-04-25 10:59:43 PDT
Created
attachment 308116
[details]
patch for landing.
Mark Lam
Comment 5
2017-04-25 11:46:21 PDT
Thanks for the review. Landed in
r215747
: <
http://trac.webkit.org/r215747
>.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug