28 #ifndef V8_STRING_STREAM_H_
29 #define V8_STRING_STREAM_H_
39 virtual char*
allocate(
unsigned bytes) = 0;
44 virtual char*
grow(
unsigned* bytes) = 0;
53 char*
grow(
unsigned* bytes);
65 char*
allocate(
unsigned bytes) {
return space_; }
66 char*
grow(
unsigned* bytes);
78 explicit FmtElm(
double value) : type_(DOUBLE) {
79 data_.u_double_ = value;
81 FmtElm(
const char* value) : type_(C_STR) {
82 data_.u_c_str_ = value;
85 data_.u_lc_str_ = &value;
93 FmtElm(
void* value) : type_(POINTER) {
94 data_.u_pointer_ = value;
99 enum Type { INT, DOUBLE, C_STR, LC_STR, OBJ,
HANDLE, POINTER };
116 allocator_(allocator),
128 bool Put(
String* str,
int start,
int end);
130 void Add(
const char* format);
132 void Add(
const char* format,
FmtElm arg0);
135 void Add(
const char* format,
169 static bool IsMentionedObjectCacheClear();
176 void PrintObject(
Object* obj);
183 bool full()
const {
return (capacity_ - length_) == 1; }
184 int space()
const {
return capacity_ - length_; }
192 #endif // V8_STRING_STREAM_H_
char * allocate(unsigned bytes)
static const int kInitialCapacity
void PrintSecurityTokenIfChanged(Object *function)
void PrintMentionedObjectCache()
typedef HANDLE(__stdcall *DLL_FUNC_TYPE(CreateToolhelp32Snapshot))(DWORD dwFlags
void PrintPrototype(JSFunction *fun, Object *receiver)
void PrintUsingMap(JSObject *js_object)
char * allocate(unsigned bytes)
char * grow(unsigned *bytes)
Handle< String > ToString()
void Add(Vector< const char > format, Vector< FmtElm > elms)
void PrintFixedArray(FixedArray *array, unsigned int limit)
char * grow(unsigned *bytes)
NoAllocationStringAllocator(char *memory, unsigned size)
virtual char * allocate(unsigned bytes)=0
void PrintByteArray(ByteArray *ba)
FmtElm(const char *value)
FmtElm(Handle< Object > value)
void PrintName(Object *o)
const Vector< const uc16 > * u_lc_str_
void PrintFunction(Object *function, Object *receiver, Code **code)
virtual char * grow(unsigned *bytes)=0
void OutputToFile(FILE *out)
static void ClearMentionedObjectCache()
virtual ~StringAllocator()
FmtElm(const Vector< const uc16 > &value)
SmartArrayPointer< const char > ToCString() const
void DeleteArray(T *array)
StringStream(StringAllocator *allocator)