v8  3.14.5(node0.10.28)
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 OutputToFile (FILE *out)
 
void OutputToStdOut ()
 
void Log ()
 
Handle< StringToString ()
 
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 ()
 

Static Public Member Functions

static void ClearMentionedObjectCache ()
 

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 97 of file string-stream.cc.

References ASSERT, ASSERT_EQ, StringStream::length(), Vector< T >::length(), 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(), FlagList::argv(), HGraph::DeadCodeElimination(), Failure::FailurePrint(), HeapNumber::HeapNumberPrint(), HeapObject::HeapObjectShortPrint(), Log::Initialize(), JSObject::JSObjectShortPrint(), JavaScriptFrame::Print(), ArgumentsAdaptorFrame::Print(), ToBooleanStub::Types::Print(), StringStream::PrintByteArray(), HValue::PrintChangesTo(), LInstruction::PrintDataTo(), LGap::PrintDataTo(), LGoto::PrintDataTo(), LParallelMove::PrintDataTo(), LLabel::PrintDataTo(), LAccessArgumentsAt::PrintDataTo(), LCmpIDAndBranch::PrintDataTo(), LUnaryMathOperation::PrintDataTo(), LIsNilAndBranch::PrintDataTo(), LIsObjectAndBranch::PrintDataTo(), LIsStringAndBranch::PrintDataTo(), LIsSmiAndBranch::PrintDataTo(), LStringCompareAndBranch::PrintDataTo(), HControlInstruction::PrintDataTo(), LBranch::PrintDataTo(), HDeoptimize::PrintDataTo(), HGoto::PrintDataTo(), HCompareMap::PrintDataTo(), HChange::PrintDataTo(), HSimulate::PrintDataTo(), HEnterInlined::PrintDataTo(), LLoadContextSlot::PrintDataTo(), LStoreContextSlot::PrintDataTo(), LCallConstantFunction::PrintDataTo(), LInvokeFunction::PrintDataTo(), LCallKeyed::PrintDataTo(), LCallNamed::PrintDataTo(), HUnaryCall::PrintDataTo(), LCallGlobal::PrintDataTo(), HBinaryCall::PrintDataTo(), LCallKnownGlobal::PrintDataTo(), LCallNew::PrintDataTo(), HCallConstantFunction::PrintDataTo(), HCallNamed::PrintDataTo(), HCallGlobal::PrintDataTo(), HCallKnownGlobal::PrintDataTo(), HCallRuntime::PrintDataTo(), LStoreNamedField::PrintDataTo(), LStoreNamedGeneric::PrintDataTo(), HJSArrayLength::PrintDataTo(), LStoreKeyedGeneric::PrintDataTo(), HUnaryMathOperation::PrintDataTo(), HLoadElements::PrintDataTo(), HCheckMaps::PrintDataTo(), HCheckFunction::PrintDataTo(), HCheckInstanceType::PrintDataTo(), LTypeofIsAndBranch::PrintDataTo(), HCheckPrototypeMaps::PrintDataTo(), HConstant::PrintDataTo(), HBinaryOperation::PrintDataTo(), HAccessArgumentsAt::PrintDataTo(), HBoundsCheck::PrintDataTo(), HCompareGeneric::PrintDataTo(), HCompareIDAndBranch::PrintDataTo(), HCompareObjectEqAndBranch::PrintDataTo(), HIsNilAndBranch::PrintDataTo(), HStringCompareAndBranch::PrintDataTo(), HHasInstanceTypeAndBranch::PrintDataTo(), HClassOfTestAndBranch::PrintDataTo(), HTypeofIsAndBranch::PrintDataTo(), HInstanceOf::PrintDataTo(), HBitwise::PrintDataTo(), HParameter::PrintDataTo(), HCallStub::PrintDataTo(), HLoadGlobalCell::PrintDataTo(), HLoadGlobalGeneric::PrintDataTo(), HStoreGlobalCell::PrintDataTo(), HStoreGlobalGeneric::PrintDataTo(), HLoadContextSlot::PrintDataTo(), HStoreContextSlot::PrintDataTo(), HLoadNamedField::PrintDataTo(), HLoadNamedFieldPolymorphic::PrintDataTo(), HLoadNamedGeneric::PrintDataTo(), HLoadKeyedFastElement::PrintDataTo(), HLoadKeyedFastDoubleElement::PrintDataTo(), HLoadKeyedSpecializedArrayElement::PrintDataTo(), HLoadKeyedGeneric::PrintDataTo(), HStoreNamedField::PrintDataTo(), HStoreNamedGeneric::PrintDataTo(), HStoreKeyedFastElement::PrintDataTo(), HStoreKeyedFastDoubleElement::PrintDataTo(), HStoreKeyedSpecializedArrayElement::PrintDataTo(), HStoreKeyedGeneric::PrintDataTo(), HTransitionElementsKind::PrintDataTo(), HIn::PrintDataTo(), HCheckMapValue::PrintDataTo(), HForInCacheArray::PrintDataTo(), HLoadFieldByIndex::PrintDataTo(), StringStream::PrintFixedArray(), StringStream::PrintFunction(), StringStream::PrintMentionedObjectCache(), StringStream::PrintName(), ToBooleanStub::PrintName(), HValue::PrintNameTo(), StringStream::PrintPrototype(), HValue::PrintRangeTo(), StringStream::PrintSecurityTokenIfChanged(), Isolate::PrintStack(), LOperand::PrintTo(), LInstruction::PrintTo(), LPointerMap::PrintTo(), LEnvironment::PrintTo(), HEnvironment::PrintTo(), HPhi::PrintTo(), HValue::PrintTypeTo(), StringStream::PrintUsingMap(), Smi::SmiPrint(), SharedFunctionInfo::SourceCodePrint(), String::StringShortPrint(), TEST(), ToBooleanStub::Types::TraceTransition(), and RegExpUnparser::VisitCharacterRange().

void Add ( const char *  format)

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

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

void Add ( Vector< const char >  format)

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

References StringStream::Add().

void Add ( const char *  format,
FmtElm  arg0 
)

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

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

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

Definition at line 232 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 239 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 247 of file string-stream.cc.

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

void ClearMentionedObjectCache ( )
static

Definition at line 289 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 147 of file string-stream.h.

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

void Log ( )

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

References ISOLATE, and LOG.

Referenced by Isolate::PrintStack().

void OutputToFile ( FILE *  out)

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

References v8::internal::PrintF().

Referenced by StringStream::OutputToStdOut(), and Object::ShortPrint().

void OutputToStdOut ( )
inline
void PrintByteArray ( ByteArray ba)
void PrintFixedArray ( FixedArray array,
unsigned int  limit 
)
void PrintFunction ( Object function,
Object receiver,
Code **  code 
)
bool Put ( String str)

Definition at line 308 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 160 of file string-stream.h.

Handle< String > ToString ( )

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

References FACTORY.

Referenced by Isolate::StackTraceString().

Field Documentation

const int kInitialCapacity = 16
static

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


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