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

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

Issue 769263002: Add support for enabling DCHECKs in release mode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 6 years 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/scanner-character-streams.cc ('k') | src/string-stream.cc » ('j') | 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/handles.h" 8 #include "src/handles.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 // Reset the stream. 127 // Reset the stream.
128 void Reset() { 128 void Reset() {
129 length_ = 0; 129 length_ = 0;
130 buffer_[0] = 0; 130 buffer_[0] = 0;
131 } 131 }
132 132
133 // Mentioned object cache support. 133 // Mentioned object cache support.
134 void PrintMentionedObjectCache(Isolate* isolate); 134 void PrintMentionedObjectCache(Isolate* isolate);
135 static void ClearMentionedObjectCache(Isolate* isolate); 135 static void ClearMentionedObjectCache(Isolate* isolate);
136 #ifdef DEBUG 136 #if DCHECK_IS_ON
137 static bool IsMentionedObjectCacheClear(Isolate* isolate); 137 static bool IsMentionedObjectCacheClear(Isolate* isolate);
138 #endif 138 #endif
139 139
140 static const int kInitialCapacity = 16; 140 static const int kInitialCapacity = 16;
141 141
142 private: 142 private:
143 void PrintObject(Object* obj); 143 void PrintObject(Object* obj);
144 144
145 StringAllocator* allocator_; 145 StringAllocator* allocator_;
146 unsigned capacity_; 146 unsigned capacity_;
147 unsigned length_; // does not include terminating 0-character 147 unsigned length_; // does not include terminating 0-character
148 char* buffer_; 148 char* buffer_;
149 149
150 bool full() const { return (capacity_ - length_) == 1; } 150 bool full() const { return (capacity_ - length_) == 1; }
151 int space() const { return capacity_ - length_; } 151 int space() const { return capacity_ - length_; }
152 152
153 DISALLOW_IMPLICIT_CONSTRUCTORS(StringStream); 153 DISALLOW_IMPLICIT_CONSTRUCTORS(StringStream);
154 }; 154 };
155 155
156 } } // namespace v8::internal 156 } } // namespace v8::internal
157 157
158 #endif // V8_STRING_STREAM_H_ 158 #endif // V8_STRING_STREAM_H_
OLDNEW
« no previous file with comments | « src/scanner-character-streams.cc ('k') | src/string-stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698