v8
3.25.30(node0.11.13)
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 | 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< String > | ToString (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 |
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 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().
Definition at line 231 of file string-stream.cc.
References StringStream::Add(), and v8::internal::CStrVector().
Definition at line 238 of file string-stream.cc.
References StringStream::Add(), and v8::internal::CStrVector().
Definition at line 246 of file string-stream.cc.
References StringStream::Add(), and v8::internal::CStrVector().
Definition at line 254 of file string-stream.cc.
References StringStream::Add(), and v8::internal::CStrVector().
|
static |
Definition at line 297 of file string-stream.cc.
References v8::internal::NULL.
Referenced by Isolate::PrintStack(), Isolate::StackTraceString(), and THREADED_TEST().
|
inline |
Definition at line 153 of file string-stream.h.
Referenced by StringStream::Add(), and StringStream::PrintMentionedObjectCache().
Definition at line 270 of file string-stream.cc.
References LOG.
Referenced by Isolate::PrintStack().
void OutputToFile | ( | FILE * | out | ) |
Definition at line 275 of file string-stream.cc.
References v8::internal::PrintF().
Referenced by StringStream::OutputToStdOut(), Isolate::PrintStack(), and Object::ShortPrint().
|
inline |
Definition at line 149 of file string-stream.h.
References StringStream::OutputToFile().
Referenced by Isolate::StackTraceString(), HydrogenCodeStub::TraceTransition(), and BinaryOpIC::Transition().
void PrintByteArray | ( | ByteArray * | ba | ) |
Definition at line 399 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 383 of file string-stream.cc.
References StringStream::Add(), FixedArray::get(), HeapObject::GetHeap(), and StringStream::Put().
Referenced by StringStream::PrintMentionedObjectCache().
Definition at line 490 of file string-stream.cc.
References StringStream::Add(), HeapObject::cast(), JSFunction::cast(), JSFunction::code(), Heap::Contains(), HeapObject::GetHeap(), v8::internal::map, HeapObject::map(), StringStream::PrintName(), and StringStream::PrintPrototype().
Referenced by JavaScriptFrame::Print().
void PrintMentionedObjectCache | ( | Isolate * | isolate | ) |
Definition at line 421 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 334 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 528 of file string-stream.cc.
References StringStream::Add(), JSObject::cast(), String::cast(), String::Equals(), HeapObject::GetIsolate(), Isolate::heap(), String::length(), v8::internal::name, StringStream::PrintName(), StringStream::Put(), and JSObject::SlowReverseLookup().
Referenced by StringStream::PrintFunction().
void PrintSecurityTokenIfChanged | ( | Object * | function | ) |
Definition at line 455 of file string-stream.cc.
References StringStream::Add(), HeapObject::cast(), JSFunction::cast(), Heap::Contains(), JSFunction::context(), HeapObject::GetIsolate(), Isolate::heap(), v8::internal::map, HeapObject::map(), Context::native_context(), and obj.
Referenced by JavaScriptFrame::Print().
void PrintUsingMap | ( | JSObject * | js_object | ) |
Definition at line 348 of file string-stream.cc.
References StringStream::Add(), String::cast(), Heap::Contains(), v8::internal::FIELD, DescriptorArray::GetDetails(), DescriptorArray::GetFieldIndex(), HeapObject::GetHeap(), DescriptorArray::GetKey(), String::length(), v8::internal::map, HeapObject::map(), Map::NumberOfOwnDescriptors(), StringStream::Put(), JSObject::RawFastPropertyAt(), and Object::ShortPrint().
Referenced by StringStream::PrintMentionedObjectCache().
bool Put | ( | char | c | ) |
Definition at line 51 of file string-stream.cc.
References ASSERT, and StringAllocator::grow().
Referenced by StringStream::Add(), SimpleListPrinter::Add(), HeapObject::HeapObjectShortPrint(), JSObject::JSObjectShortPrint(), StringStream::PrintFixedArray(), StringStream::PrintName(), StringStream::PrintPrototype(), StringStream::PrintUsingMap(), StringStream::Put(), SharedFunctionInfo::SourceCodePrint(), and String::StringShortPrint().
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 | ||
) |
Definition at line 318 of file string-stream.cc.
References StringCharacterStream::GetNext(), StringCharacterStream::HasMore(), and StringStream::Put().
|
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().
Definition at line 291 of file string-stream.cc.
References Isolate::factory(), and Factory::NewStringFromUtf8().
Referenced by Isolate::StackTraceString().
|
static |
Definition at line 179 of file string-stream.h.