OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_STRING_STREAM_H_ | 5 #ifndef V8_STRING_STREAM_H_ |
6 #define V8_STRING_STREAM_H_ | 6 #define V8_STRING_STREAM_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "src/allocation.h" | 10 #include "src/allocation.h" |
9 #include "src/base/smart-pointers.h" | 11 #include "src/base/smart-pointers.h" |
10 #include "src/handles.h" | 12 #include "src/handles.h" |
11 #include "src/vector.h" | 13 #include "src/vector.h" |
12 | 14 |
13 namespace v8 { | 15 namespace v8 { |
14 namespace internal { | 16 namespace internal { |
15 | 17 |
16 // Forward declarations. | 18 // Forward declarations. |
17 class ByteArray; | 19 class ByteArray; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 FmtElm arg1, | 130 FmtElm arg1, |
129 FmtElm arg2, | 131 FmtElm arg2, |
130 FmtElm arg3, | 132 FmtElm arg3, |
131 FmtElm arg4); | 133 FmtElm arg4); |
132 | 134 |
133 // Getting the message out. | 135 // Getting the message out. |
134 void OutputToFile(FILE* out); | 136 void OutputToFile(FILE* out); |
135 void OutputToStdOut() { OutputToFile(stdout); } | 137 void OutputToStdOut() { OutputToFile(stdout); } |
136 void Log(Isolate* isolate); | 138 void Log(Isolate* isolate); |
137 Handle<String> ToString(Isolate* isolate); | 139 Handle<String> ToString(Isolate* isolate); |
138 base::SmartArrayPointer<const char> ToCString() const; | 140 std::unique_ptr<const char[]> ToCString() const; |
139 int length() const { return length_; } | 141 int length() const { return length_; } |
140 | 142 |
141 // Object printing support. | 143 // Object printing support. |
142 void PrintName(Object* o); | 144 void PrintName(Object* o); |
143 void PrintFixedArray(FixedArray* array, unsigned int limit); | 145 void PrintFixedArray(FixedArray* array, unsigned int limit); |
144 void PrintByteArray(ByteArray* ba); | 146 void PrintByteArray(ByteArray* ba); |
145 void PrintUsingMap(JSObject* js_object); | 147 void PrintUsingMap(JSObject* js_object); |
146 void PrintPrototype(JSFunction* fun, Object* receiver); | 148 void PrintPrototype(JSFunction* fun, Object* receiver); |
147 void PrintSecurityTokenIfChanged(Object* function); | 149 void PrintSecurityTokenIfChanged(Object* function); |
148 // NOTE: Returns the code in the output parameter. | 150 // NOTE: Returns the code in the output parameter. |
(...skipping 26 matching lines...) Expand all Loading... |
175 bool full() const { return (capacity_ - length_) == 1; } | 177 bool full() const { return (capacity_ - length_) == 1; } |
176 int space() const { return capacity_ - length_; } | 178 int space() const { return capacity_ - length_; } |
177 | 179 |
178 DISALLOW_IMPLICIT_CONSTRUCTORS(StringStream); | 180 DISALLOW_IMPLICIT_CONSTRUCTORS(StringStream); |
179 }; | 181 }; |
180 | 182 |
181 } // namespace internal | 183 } // namespace internal |
182 } // namespace v8 | 184 } // namespace v8 |
183 | 185 |
184 #endif // V8_STRING_STREAM_H_ | 186 #endif // V8_STRING_STREAM_H_ |
OLD | NEW |