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

Side by Side Diff: src/string-stream.h

Issue 1311123005: Isolate::PrintStack: restore default verbose object printing (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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 | « src/heap/heap.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/base/smart-pointers.h" 9 #include "src/base/smart-pointers.h"
10 #include "src/handles.h" 10 #include "src/handles.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 Object** u_handle_; 93 Object** u_handle_;
94 void* u_pointer_; 94 void* u_pointer_;
95 } data_; 95 } data_;
96 }; 96 };
97 97
98 98
99 class StringStream final { 99 class StringStream final {
100 public: 100 public:
101 enum ObjectPrintMode { kPrintObjectConcise, kPrintObjectVerbose }; 101 enum ObjectPrintMode { kPrintObjectConcise, kPrintObjectVerbose };
102 StringStream(StringAllocator* allocator, 102 StringStream(StringAllocator* allocator,
103 ObjectPrintMode object_print_mode = kPrintObjectConcise) 103 ObjectPrintMode object_print_mode = kPrintObjectVerbose)
104 : allocator_(allocator), 104 : allocator_(allocator),
105 object_print_mode_(object_print_mode), 105 object_print_mode_(object_print_mode),
106 capacity_(kInitialCapacity), 106 capacity_(kInitialCapacity),
107 length_(0), 107 length_(0),
108 buffer_(allocator_->allocate(kInitialCapacity)) { 108 buffer_(allocator_->allocate(kInitialCapacity)) {
109 buffer_[0] = 0; 109 buffer_[0] = 0;
110 } 110 }
111 111
112 bool Put(char c); 112 bool Put(char c);
113 bool Put(String* str); 113 bool Put(String* str);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 bool full() const { return (capacity_ - length_) == 1; } 175 bool full() const { return (capacity_ - length_) == 1; }
176 int space() const { return capacity_ - length_; } 176 int space() const { return capacity_ - length_; }
177 177
178 DISALLOW_IMPLICIT_CONSTRUCTORS(StringStream); 178 DISALLOW_IMPLICIT_CONSTRUCTORS(StringStream);
179 }; 179 };
180 180
181 } } // namespace v8::internal 181 } } // namespace v8::internal
182 182
183 #endif // V8_STRING_STREAM_H_ 183 #endif // V8_STRING_STREAM_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698