SpeculatedType dumping should not use the static char buffer[thingy] idiom
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):
(JSC::DFG::AbstractValue::dump):
- dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::injectLazyOperandSpeculation):
(JSC::DFG::ByteCodeParser::getPredictionWithoutOSRExit):
(JSC::DFG::Graph::dump):
(JSC::DFG::Graph::predictArgumentTypes):
(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::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):