13 #define snprintf sprintf_s
23 int n = snprintf(buf,
sizeof(buf), format, x);
24 return (n < 0) ? *this :
write(buf, n);
69 if (std::isinf(x))
return *
this << (x < 0 ?
"-inf" :
"inf");
70 if (std::isnan(x))
return *
this <<
"nan";
71 return print(
"%g", x);
76 return print(
"%p", x);
128 size_t new_size =
size_ + n;
129 if (new_size <
size_)
return *
this;
144 if (requested_capacity <=
capacity_)
return;
145 size_t new_capacity =
147 char * new_data =
allocate(new_capacity);
156 if (
f_) fwrite(s, n, 1,
f_);
175 const char* format = pred(c) ?
"%c" : (c <= 0xff) ?
"\\x%02x" :
"\\u%04x";
176 snprintf(buf,
sizeof(buf), format, c);
virtual OFStream & flush() OVERRIDE
virtual OFStream & write(const char *s, size_t n) OVERRIDE
OStream & operator<<(OStream &(*manipulator)(OStream &os))
virtual OStream & flush()=0
OStream & print(const char *format, T x)
virtual OStream & write(const char *s, size_t n)=0
virtual OStringStream & flush() OVERRIDE
static char * allocate(size_t n)
static void deallocate(char *s, size_t n)
void reserve(size_t requested_capacity)
virtual OStringStream & write(const char *s, size_t n) OVERRIDE
static bool IsOK(uint16_t c)
static bool IsSpace(uint16_t c)
static bool IsPrint(uint16_t c)
OStream & endl(OStream &os)
OStream & hex(OStream &os)
OStream & operator<<(OStream &os, const BasicBlockProfiler &p)
static OStream & PrintUC16(OStream &os, uint16_t c, bool(*pred)(uint16_t))
OStream & flush(OStream &os)
OStream & dec(OStream &os)
Debugger support for the V8 JavaScript engine.
#define T(name, string, precedence)