created boolToChars in WTFString.h for debugging purposes
Created attachment 316548 [details] Patch
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.
(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.
Created attachment 316632 [details] Patch
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.
Created attachment 316642 [details] Patch
(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.
Comment on attachment 316642 [details] Patch Clearing flags on attachment: 316642 Committed r220058: <http://trac.webkit.org/changeset/220058>
All reviewed patches have been landed. Closing bug.
<rdar://problem/33621437>