WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
174893
Created a bool pretty printer at WTF for debugging purposes
https://bugs.webkit.org/show_bug.cgi?id=174893
Summary
Created a bool pretty printer at WTF for debugging purposes
Xabier Rodríguez Calvar
Reported
2017-07-27 08:47:43 PDT
created boolToChars in WTFString.h for debugging purposes
Attachments
Patch
(2.00 KB, patch)
2017-07-27 08:48 PDT
,
Xabier Rodríguez Calvar
no flags
Details
Formatted Diff
Diff
Patch
(4.13 KB, patch)
2017-07-28 04:48 PDT
,
Xabier Rodríguez Calvar
no flags
Details
Formatted Diff
Diff
Patch
(4.62 KB, patch)
2017-07-28 08:47 PDT
,
Xabier Rodríguez Calvar
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Xabier Rodríguez Calvar
Comment 1
2017-07-27 08:48:42 PDT
Created
attachment 316548
[details]
Patch
Darin Adler
Comment 2
2017-07-27 09:18:16 PDT
Comment on
attachment 316548
[details]
Patch Seems OK to have this function in WTF. But "chars" is not an abbreviation we should use in new code, and I don’t think this necessarily should be in WTFString.h either, since it has nothing to do with WTF::String. I’d also like to see an example of using it in the patch that adds it rather than just adding the unused function.
Xabier Rodríguez Calvar
Comment 3
2017-07-27 14:42:45 PDT
(In reply to Darin Adler from
comment #2
)
> Comment on
attachment 316548
[details]
> Patch > > Seems OK to have this function in WTF. But "chars" is not an abbreviation we > should use in new code, and I don’t think this necessarily should be in > WTFString.h either, since it has nothing to do with WTF::String. I’d also > like to see an example of using it in the patch that adds it rather than > just adding the unused function.
Any suggestions on where to locate it or a better name? About the examples I guess I can just use it somewhere.
Xabier Rodríguez Calvar
Comment 4
2017-07-28 04:48:37 PDT
Created
attachment 316632
[details]
Patch
Yusuke Suzuki
Comment 5
2017-07-28 04:50:11 PDT
How about adding MAKE_PRINT_ADAPTOR instead? For example, JSC/SpeculatedType uses this mechanism to dump a special string while SpeculatedType is just uint64_t.
Xabier Rodríguez Calvar
Comment 6
2017-07-28 08:47:46 PDT
Created
attachment 316642
[details]
Patch
Xabier Rodríguez Calvar
Comment 7
2017-07-28 08:49:57 PDT
(In reply to Yusuke Suzuki from
comment #5
)
> How about adding MAKE_PRINT_ADAPTOR instead? > For example, JSC/SpeculatedType uses this mechanism to dump a special string > while SpeculatedType is just uint64_t.
I think it's overengineering for what I need. Besides, there's already PrintStream taking bool and I don't use it because I just want to avoid casting when printing log or doing what the function does but inlined. Anyway, you gave me the idea of PrintStream.h maybe being the place for the function.
WebKit Commit Bot
Comment 8
2017-07-31 02:15:02 PDT
Comment on
attachment 316642
[details]
Patch Clearing flags on attachment: 316642 Committed
r220058
: <
http://trac.webkit.org/changeset/220058
>
WebKit Commit Bot
Comment 9
2017-07-31 02:15:04 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 10
2017-07-31 02:15:42 PDT
<
rdar://problem/33621437
>
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