Skip to content
  • fpizlo@apple.com's avatar
    It should be possible to say dataLog("count = ", count, "\n") instead of... · ca5a203c
    fpizlo@apple.com authored
    It should be possible to say dataLog("count = ", count, "\n") instead of dataLogF("count = %d\n", count)
    https://bugs.webkit.org/show_bug.cgi?id=103009
    
    Reviewed by Michael Saboff.
    
    Source/JavaScriptCore: 
    
    Instead of converting all of JSC to use the new dataLog()/print() methods, I just changed
    one place: dumping of abstract values. This is mainly just to ensure that the code I
    added to WTF is actually doing things.
    
    * bytecode/CodeBlock.cpp:
    (JSC::CodeBlock::dump):
    * dfg/DFGAbstractValue.h:
    (JSC::DFG::AbstractValue::dump):
    (WTF):
    (WTF::printInternal):
    * dfg/DFGStructureAbstractValue.h:
    (JSC::DFG::StructureAbstractValue::dump):
    (WTF):
    (WTF::printInternal):
    
    Source/WTF: 
    
    Added the ability to use out.print(...) and dataLog(...) variadically and with
    WTF::printInternal(PrintStream&, const T&) overloads for any type T that you want
    to be able to pass as an argument to out.print() or dataLog(). Also added one
    example class for doing this: RawPointer, which can be used to force a pointer
    to be printed as "%p" rather than matching any overloads that you might want to
    introduce.
    
    * GNUmakefile.list.am:
    * WTF.gypi:
    * WTF.pro:
    * WTF.vcproj/WTF.vcproj:
    * WTF.xcodeproj/project.pbxproj:
    * wtf/CMakeLists.txt:
    * wtf/DataLog.h:
    (WTF):
    (WTF::dataLog):
    * wtf/PrintStream.cpp:
    (WTF::printInternal):
    (WTF):
    * wtf/PrintStream.h:
    (PrintStream):
    (WTF::PrintStream::print):
    (WTF):
    * wtf/RawPointer.h: Added.
    (WTF):
    (RawPointer):
    (WTF::RawPointer::RawPointer):
    (WTF::RawPointer::value):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136066 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    ca5a203c