Ignore:
Timestamp:
Dec 4, 2012, 11:29:13 AM (12 years ago)
Author:
[email protected]
Message:

Replace JSValue::description() with JSValue::dump(PrintStream&)
https://bugs.webkit.org/show_bug.cgi?id=103866

Reviewed by Darin Adler.

Source/JavaScriptCore:

JSValue now has a dump() method. Anywhere that you would have wanted to use
description(), you can either do toCString(value).data(), or if the callee
is a print()/dataLog() method then you just pass the value directly.

  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  • bytecode/CodeBlock.cpp:

(JSC::valueToSourceString):
(JSC::CodeBlock::finalizeUnconditionally):

  • bytecode/ValueProfile.h:

(JSC::ValueProfileBase::dump):

  • bytecode/ValueRecovery.h:

(JSC::ValueRecovery::dump):

  • dfg/DFGAbstractValue.h:

(JSC::DFG::AbstractValue::dump):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::dump):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::dumpRegisters):

  • jsc.cpp:

(functionDescribe):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::llint_trace_value):

  • runtime/JSValue.cpp:

(JSC::JSValue::dump):

  • runtime/JSValue.h:

Source/WTF:

Make it easier to get a String from a StringPrintStream.

  • wtf/StringPrintStream.cpp:

(WTF::StringPrintStream::toString):

  • wtf/StringPrintStream.h:

(StringPrintStream):
(WTF::toString):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jsc.cpp

    r136086 r136539  
    4444#include <wtf/CurrentTime.h>
    4545#include <wtf/MainThread.h>
     46#include <wtf/StringPrintStream.h>
    4647#include <wtf/text/StringBuilder.h>
    4748
     
    312313EncodedJSValue JSC_HOST_CALL functionDescribe(ExecState* exec)
    313314{
    314     fprintf(stderr, "--> %s\n", exec->argument(0).description());
     315    fprintf(stderr, "--> %s\n", toCString(exec->argument(0)).data());
    315316    return JSValue::encode(jsUndefined());
    316317}
Note: See TracChangeset for help on using the changeset viewer.