Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: runtime/vm/zone_text_buffer.h

Issue 2686813006: Reapply "Use CodeSourceMap for stack traces (still JIT only)." (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/vm_sources.gypi ('k') | runtime/vm/zone_text_buffer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 #ifndef RUNTIME_VM_ZONE_TEXT_BUFFER_H_
6 #define RUNTIME_VM_ZONE_TEXT_BUFFER_H_
7
8 #include "vm/allocation.h"
9 #include "vm/globals.h"
10
11 namespace dart {
12
13 class Zone;
14
15 // TextBuffer maintains a dynamic character buffer with a printf-style way to
16 // append text.
17 class ZoneTextBuffer : ValueObject {
18 public:
19 ZoneTextBuffer(Zone* zone, intptr_t initial_capacity);
20 ~ZoneTextBuffer() {}
21
22 intptr_t Printf(const char* format, ...) PRINTF_ATTRIBUTE(2, 3);
23 void AddString(const char* s);
24
25 char* buffer() { return buffer_; }
26 intptr_t length() { return length_; }
27
28 private:
29 void EnsureCapacity(intptr_t len);
30 Zone* zone_;
31 char* buffer_;
32 intptr_t length_;
33 intptr_t capacity_;
34 };
35
36 } // namespace dart
37
38 #endif // RUNTIME_VM_ZONE_TEXT_BUFFER_H_
OLDNEW
« no previous file with comments | « runtime/vm/vm_sources.gypi ('k') | runtime/vm/zone_text_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698