v8
3.14.5(node0.10.28)
V8 is Google's open source JavaScript engine
|
#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< String > | ToString () |
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 |
Definition at line 113 of file string-stream.h.
|
inlineexplicit |
Definition at line 115 of file string-stream.h.
|
inline |
Definition at line 123 of file string-stream.h.
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().
Definition at line 232 of file string-stream.cc.
References StringStream::Add(), and v8::internal::CStrVector().
Definition at line 239 of file string-stream.cc.
References StringStream::Add(), and v8::internal::CStrVector().
Definition at line 247 of file string-stream.cc.
References StringStream::Add(), and v8::internal::CStrVector().
|
static |
Definition at line 289 of file string-stream.cc.
References v8::internal::NULL.
Referenced by Isolate::PrintStack(), Isolate::StackTraceString(), and THREADED_TEST().
|
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.
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().
|
inline |
Definition at line 143 of file string-stream.h.
References StringStream::OutputToFile().
Referenced by Isolate::PrintStack(), Isolate::StackTraceString(), and ToBooleanStub::Types::TraceTransition().
void PrintByteArray | ( | ByteArray * | ba | ) |
Definition at line 395 of file string-stream.cc.
References StringStream::Add(), ByteArray::get(), and FixedArrayBase::length().
Referenced by StringStream::PrintMentionedObjectCache().
void PrintFixedArray | ( | FixedArray * | array, |
unsigned int | limit | ||
) |
Definition at line 379 of file string-stream.cc.
References StringStream::Add(), FixedArray::get(), HEAP, and StringStream::Put().
Referenced by StringStream::PrintMentionedObjectCache().
Definition at line 486 of file string-stream.cc.
References StringStream::Add(), HeapObject::cast(), JSFunction::cast(), JSFunction::code(), HEAP, HeapObject::map(), StringStream::PrintName(), and StringStream::PrintPrototype().
Referenced by JavaScriptFrame::Print().
void PrintMentionedObjectCache | ( | ) |
Definition at line 417 of file string-stream.cc.
References StringStream::Add(), JSObject::cast(), FixedArray::cast(), ByteArray::cast(), JSValue::cast(), JSArray::cast(), JSObject::HasFastObjectElements(), StringStream::length(), FixedArrayBase::length(), Object::Number(), StringStream::PrintByteArray(), StringStream::PrintFixedArray(), StringStream::PrintUsingMap(), and Object::ShortPrint().
Referenced by Isolate::PrintStack().
void PrintName | ( | Object * | o | ) |
Definition at line 329 of file string-stream.cc.
References StringStream::Add(), String::cast(), String::length(), and StringStream::Put().
Referenced by JavaScriptFrame::Print(), StringStream::PrintFunction(), StringStream::PrintPrototype(), and SharedFunctionInfo::SourceCodePrint().
void PrintPrototype | ( | JSFunction * | fun, |
Object * | receiver | ||
) |
Definition at line 533 of file string-stream.cc.
References StringStream::Add(), JSObject::cast(), String::cast(), String::Equals(), HEAP, String::length(), StringStream::PrintName(), StringStream::Put(), and JSObject::SlowReverseLookup().
Referenced by StringStream::PrintFunction().
void PrintSecurityTokenIfChanged | ( | Object * | function | ) |
Definition at line 451 of file string-stream.cc.
References StringStream::Add(), HeapObject::cast(), JSFunction::cast(), Heap::Contains(), JSFunction::context(), Isolate::heap(), HeapObject::map(), Context::native_context(), and JSFunction::unchecked_context().
Referenced by JavaScriptFrame::Print().
void PrintUsingMap | ( | JSObject * | js_object | ) |
Definition at line 343 of file string-stream.cc.
References StringStream::Add(), String::cast(), JSObject::FastPropertyAt(), v8::internal::FIELD, DescriptorArray::GetDetails(), DescriptorArray::GetFieldIndex(), DescriptorArray::GetKey(), HEAP, String::length(), HeapObject::map(), DescriptorArray::number_of_descriptors(), Map::NumberOfOwnDescriptors(), StringStream::Put(), and Object::ShortPrint().
Referenced by StringStream::PrintMentionedObjectCache().
bool Put | ( | char | c | ) |
Definition at line 53 of file string-stream.cc.
References ASSERT, and StringAllocator::grow().
Referenced by StringStream::Add(), HeapObject::HeapObjectShortPrint(), Log::Initialize(), JSObject::JSObjectShortPrint(), StringStream::PrintFixedArray(), StringStream::PrintName(), StringStream::PrintPrototype(), StringStream::PrintUsingMap(), StringStream::Put(), SharedFunctionInfo::SourceCodePrint(), and String::StringShortPrint().
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 | ||
) |
Definition at line 313 of file string-stream.cc.
References CharacterStream::GetNext(), CharacterStream::has_more(), StringStream::Put(), and StringInputBuffer::Seek().
|
inline |
Definition at line 160 of file string-stream.h.
SmartArrayPointer< const char > ToCString | ( | ) | const |
Definition at line 255 of file string-stream.cc.
Referenced by FlagList::argv(), HGraph::DeadCodeElimination(), Deoptimizer::GetOutputInfo(), Log::Initialize(), HEnvironment::PrintToStd(), and TEST().
Definition at line 284 of file string-stream.cc.
References FACTORY.
Referenced by Isolate::StackTraceString().
|
static |
Definition at line 173 of file string-stream.h.