Skip to content
  • fpizlo@apple.com's avatar
    SpeculatedType dumping should not use the static char buffer[thingy] idiom · 02e3563e
    fpizlo@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=103584
    
    Reviewed by Michael Saboff.
    
    Source/JavaScriptCore: 
    
    Changed SpeculatedType to be "dumpable" by saying things like:
            
    dataLog("thingy = ", SpeculationDump(thingy))
            
    Removed the old stringification functions, and changed all code that referred to them
    to use the new dataLog()/print() style.
    
    * CMakeLists.txt:
    * GNUmakefile.list.am:
    * JavaScriptCore.xcodeproj/project.pbxproj:
    * Target.pri:
    * bytecode/SpeculatedType.cpp:
    (JSC::dumpSpeculation):
    (JSC::speculationToAbbreviatedString):
    (JSC::dumpSpeculationAbbreviated):
    * bytecode/SpeculatedType.h:
    * bytecode/ValueProfile.h:
    (JSC::ValueProfileBase::dump):
    * bytecode/VirtualRegister.h:
    (WTF::printInternal):
    * dfg/DFGAbstractValue.h:
    (JSC::DFG::AbstractValue::dump):
    * dfg/DFGByteCodeParser.cpp:
    (JSC::DFG::ByteCodeParser::injectLazyOperandSpeculation):
    (JSC::DFG::ByteCodeParser::getPredictionWithoutOSRExit):
    * dfg/DFGGraph.cpp:
    (JSC::DFG::Graph::dump):
    (JSC::DFG::Graph::predictArgumentTypes):
    * dfg/DFGGraph.h:
    (Graph):
    * dfg/DFGStructureAbstractValue.h:
    * dfg/DFGVariableAccessDataDump.cpp: Added.
    (JSC::DFG::VariableAccessDataDump::VariableAccessDataDump):
    (JSC::DFG::VariableAccessDataDump::dump):
    * dfg/DFGVariableAccessDataDump.h: Added.
    (VariableAccessDataDump):
    
    Source/WTF: 
    
    Added a StringPrintStream, and made it easy to create dumpers for typedefs to primitives.
    
    * GNUmakefile.list.am:
    * WTF.gypi:
    * WTF.pro:
    * WTF.vcproj/WTF.vcproj:
    * WTF.xcodeproj/project.pbxproj:
    * wtf/CMakeLists.txt:
    * wtf/PrintStream.cpp:
    (WTF::dumpCharacter):
    * wtf/PrintStream.h:
    (WTF::printInternal):
    * wtf/StringPrintStream.cpp: Added.
    (WTF::StringPrintStream::StringPrintStream):
    (WTF::StringPrintStream::~StringPrintStream):
    (WTF::StringPrintStream::vprintf):
    (WTF::StringPrintStream::toCString):
    (WTF::StringPrintStream::increaseSize):
    * wtf/StringPrintStream.h: Added.
    (StringPrintStream):
    (WTF::toCString):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136096 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    02e3563e