v8  3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
StringStream Class Reference

#include <string-stream.h>

Public Member Functions

 StringStream (StringAllocator *allocator)
 
 ~StringStream ()
 
bool Put (char c)
 
bool Put (String *str)
 
bool Put (String *str, int start, int end)
 
void Add (Vector< const char > format, Vector< FmtElm > elms)
 
void Add (const char *format)
 
void Add (Vector< const char > format)
 
void Add (const char *format, FmtElm arg0)
 
void Add (const char *format, FmtElm arg0, FmtElm arg1)
 
void Add (const char *format, FmtElm arg0, FmtElm arg1, FmtElm arg2)
 
void Add (const char *format, FmtElm arg0, FmtElm arg1, FmtElm arg2, FmtElm arg3)
 
void Add (const char *format, FmtElm arg0, FmtElm arg1, FmtElm arg2, FmtElm arg3, FmtElm arg4)
 
void OutputToFile (FILE *out)
 
void OutputToStdOut ()
 
void Log (Isolate *isolate)
 
Handle< StringToString (Isolate *isolate)
 
SmartArrayPointer< const char > ToCString () const
 
int length () const
 
void PrintName (Object *o)
 
void PrintFixedArray (FixedArray *array, unsigned int limit)
 
void PrintByteArray (ByteArray *ba)
 
void PrintUsingMap (JSObject *js_object)
 
void PrintPrototype (JSFunction *fun, Object *receiver)
 
void PrintSecurityTokenIfChanged (Object *function)
 
void PrintFunction (Object *function, Object *receiver, Code **code)
 
void Reset ()
 
void PrintMentionedObjectCache (Isolate *isolate)
 

Static Public Member Functions

static void ClearMentionedObjectCache (Isolate *isolate)
 

Static Public Attributes

static const int kInitialCapacity = 16
 

Detailed Description

Definition at line 113 of file string-stream.h.

Constructor & Destructor Documentation

StringStream ( StringAllocator allocator)
inlineexplicit

Definition at line 115 of file string-stream.h.

~StringStream ( )
inline

Definition at line 123 of file string-stream.h.

Member Function Documentation

void Add ( Vector< const char >  format,
Vector< FmtElm elms 
)

Definition at line 95 of file string-stream.cc.

References ASSERT, ASSERT_EQ, StringStream::length(), Vector< T >::length(), obj, StringStream::Put(), OS::SNPrintF(), Vector< T >::start(), FmtElm::u_c_str_, FmtElm::u_double_, FmtElm::u_int_, FmtElm::u_lc_str_, FmtElm::u_obj_, FmtElm::u_pointer_, and UNREACHABLE.

Referenced by StringStream::Add(), SimpleListPrinter::Add(), ArrayConstructorStubBase::BasePrintName(), Failure::FailurePrint(), HeapNumber::HeapNumberPrint(), HeapObject::HeapObjectShortPrint(), JSObject::JSObjectShortPrint(), JavaScriptFrame::Print(), ArgumentsAdaptorFrame::Print(), ToBooleanStub::Types::Print(), CompareNilICStub::PrintBaseName(), StringStream::PrintByteArray(), HValue::PrintChangesTo(), LInstruction::PrintDataTo(), LGap::PrintDataTo(), HInstruction::PrintDataTo(), HControlInstruction::PrintDataTo(), HUnaryCall::PrintDataTo(), HBinaryCall::PrintDataTo(), HBinaryOperation::PrintDataTo(), HCompareNumericAndBranch::PrintDataTo(), HCompareObjectEqAndBranch::PrintDataTo(), HStringCompareAndBranch::PrintDataTo(), StringStream::PrintFixedArray(), StringStream::PrintFunction(), StringStream::PrintMentionedObjectCache(), StringStream::PrintName(), HValue::PrintNameTo(), StringStream::PrintPrototype(), HValue::PrintRangeTo(), StringStream::PrintSecurityTokenIfChanged(), Isolate::PrintStack(), LOperand::PrintTo(), LInstruction::PrintTo(), HInstruction::PrintTo(), HValue::PrintTypeTo(), StringStream::PrintUsingMap(), Smi::SmiPrint(), SharedFunctionInfo::SourceCodePrint(), String::StringShortPrint(), TEST(), HydrogenCodeStub::TraceTransition(), and BinaryOpIC::Transition().

void Add ( const char *  format)

Definition at line 214 of file string-stream.cc.

References StringStream::Add(), and v8::internal::CStrVector().

void Add ( Vector< const char >  format)

Definition at line 219 of file string-stream.cc.

References StringStream::Add().

void Add ( const char *  format,
FmtElm  arg0 
)

Definition at line 224 of file string-stream.cc.

References StringStream::Add(), and v8::internal::CStrVector().

void Add ( const char *  format,
FmtElm  arg0,
FmtElm  arg1 
)

Definition at line 231 of file string-stream.cc.

References StringStream::Add(), and v8::internal::CStrVector().

void Add ( const char *  format,
FmtElm  arg0,
FmtElm  arg1,
FmtElm  arg2 
)

Definition at line 238 of file string-stream.cc.

References StringStream::Add(), and v8::internal::CStrVector().

void Add ( const char *  format,
FmtElm  arg0,
FmtElm  arg1,
FmtElm  arg2,
FmtElm  arg3 
)

Definition at line 246 of file string-stream.cc.

References StringStream::Add(), and v8::internal::CStrVector().

void Add ( const char *  format,
FmtElm  arg0,
FmtElm  arg1,
FmtElm  arg2,
FmtElm  arg3,
FmtElm  arg4 
)

Definition at line 254 of file string-stream.cc.

References StringStream::Add(), and v8::internal::CStrVector().

void ClearMentionedObjectCache ( Isolate isolate)
static

Definition at line 297 of file string-stream.cc.

References v8::internal::NULL.

Referenced by Isolate::PrintStack(), Isolate::StackTraceString(), and THREADED_TEST().

int length ( ) const
inline

Definition at line 153 of file string-stream.h.

Referenced by StringStream::Add(), and StringStream::PrintMentionedObjectCache().

void Log ( Isolate isolate)

Definition at line 270 of file string-stream.cc.

References LOG.

Referenced by Isolate::PrintStack().

void OutputToFile ( FILE *  out)
void OutputToStdOut ( )
inline
void PrintByteArray ( ByteArray ba)
void PrintFixedArray ( FixedArray array,
unsigned int  limit 
)
bool Put ( String str)

Definition at line 313 of file string-stream.cc.

References String::length(), and StringStream::Put().

bool Put ( String str,
int  start,
int  end 
)
void Reset ( )
inline

Definition at line 166 of file string-stream.h.

SmartArrayPointer< const char > ToCString ( ) const

Definition at line 262 of file string-stream.cc.

References OS::MemCopy().

Referenced by Deoptimizer::GetOutputInfo(), and TEST().

Handle< String > ToString ( Isolate isolate)

Definition at line 291 of file string-stream.cc.

References Isolate::factory(), and Factory::NewStringFromUtf8().

Referenced by Isolate::StackTraceString().

Field Documentation

const int kInitialCapacity = 16
static

Definition at line 179 of file string-stream.h.


The documentation for this class was generated from the following files: