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

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

Issue 164183003: Add expandable instances and lists to the vm service. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_JSON_STREAM_H_ 5 #ifndef VM_JSON_STREAM_H_
6 #define VM_JSON_STREAM_H_ 6 #define VM_JSON_STREAM_H_
7 7
8 #include "include/dart_api.h" // for Dart_Port 8 #include "include/dart_api.h" // for Dart_Port
9 #include "platform/json.h" 9 #include "platform/json.h"
10 #include "vm/allocation.h" 10 #include "vm/allocation.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 void OpenArray(const char* property_name = NULL); 56 void OpenArray(const char* property_name = NULL);
57 void CloseArray(); 57 void CloseArray();
58 58
59 void PrintValueBool(bool b); 59 void PrintValueBool(bool b);
60 void PrintValue(intptr_t i); 60 void PrintValue(intptr_t i);
61 void PrintValue(double d); 61 void PrintValue(double d);
62 void PrintValue(const char* s); 62 void PrintValue(const char* s);
63 void PrintfValue(const char* format, ...) PRINTF_ATTRIBUTE(2, 3); 63 void PrintfValue(const char* format, ...) PRINTF_ATTRIBUTE(2, 3);
64 void PrintValue(const Object& o, bool ref = true); 64 void PrintValue(const Object& o, bool ref = true);
65 void PrintValue(const Field& f, const Instance& instance, bool ref = true);
66 void PrintValue(SourceBreakpoint* bpt); 65 void PrintValue(SourceBreakpoint* bpt);
67 66
68 void PrintPropertyBool(const char* name, bool b); 67 void PrintPropertyBool(const char* name, bool b);
69 void PrintProperty(const char* name, intptr_t i); 68 void PrintProperty(const char* name, intptr_t i);
70 void PrintProperty(const char* name, double d); 69 void PrintProperty(const char* name, double d);
71 void PrintProperty(const char* name, const char* s); 70 void PrintProperty(const char* name, const char* s);
72 void PrintfProperty(const char* name, const char* format, ...) 71 void PrintfProperty(const char* name, const char* format, ...)
73 PRINTF_ATTRIBUTE(3, 4); 72 PRINTF_ATTRIBUTE(3, 4);
74 void PrintProperty(const char* name, const Object& o, bool ref = true); 73 void PrintProperty(const char* name, const Object& o, bool ref = true);
75 74
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 stream_->CloseArray(); 149 stream_->CloseArray();
151 } 150 }
152 151
153 void AddValue(bool b) const { stream_->PrintValueBool(b); } 152 void AddValue(bool b) const { stream_->PrintValueBool(b); }
154 void AddValue(intptr_t i) const { stream_->PrintValue(i); } 153 void AddValue(intptr_t i) const { stream_->PrintValue(i); }
155 void AddValue(double d) const { stream_->PrintValue(d); } 154 void AddValue(double d) const { stream_->PrintValue(d); }
156 void AddValue(const char* s) const { stream_->PrintValue(s); } 155 void AddValue(const char* s) const { stream_->PrintValue(s); }
157 void AddValue(const Object& obj, bool ref = true) const { 156 void AddValue(const Object& obj, bool ref = true) const {
158 stream_->PrintValue(obj, ref); 157 stream_->PrintValue(obj, ref);
159 } 158 }
160 // Print a field bound to a value. Value is looked up from 'instance'.
161 void AddValue(const Field& field,
162 const Instance& instance,
163 bool ref = true) const {
164 stream_->PrintValue(field, instance, ref);
165 }
166 void AddValue(SourceBreakpoint* bpt) const { 159 void AddValue(SourceBreakpoint* bpt) const {
167 stream_->PrintValue(bpt); 160 stream_->PrintValue(bpt);
168 } 161 }
169 void AddValueF(const char* format, ...) const PRINTF_ATTRIBUTE(2, 3); 162 void AddValueF(const char* format, ...) const PRINTF_ATTRIBUTE(2, 3);
170 163
171 private: 164 private:
172 JSONStream* stream_; 165 JSONStream* stream_;
173 166
174 friend class JSONObject; 167 friend class JSONObject;
175 168
176 DISALLOW_ALLOCATION(); 169 DISALLOW_ALLOCATION();
177 DISALLOW_COPY_AND_ASSIGN(JSONArray); 170 DISALLOW_COPY_AND_ASSIGN(JSONArray);
178 }; 171 };
179 172
180 } // namespace dart 173 } // namespace dart
181 174
182 #endif // VM_JSON_STREAM_H_ 175 #endif // VM_JSON_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698