OLD | NEW |
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 void CloseArray(); | 71 void CloseArray(); |
72 | 72 |
73 void PrintValueBool(bool b); | 73 void PrintValueBool(bool b); |
74 void PrintValue(intptr_t i); | 74 void PrintValue(intptr_t i); |
75 void PrintValue64(int64_t i); | 75 void PrintValue64(int64_t i); |
76 void PrintValue(double d); | 76 void PrintValue(double d); |
77 void PrintValue(const char* s); | 77 void PrintValue(const char* s); |
78 void PrintfValue(const char* format, ...) PRINTF_ATTRIBUTE(2, 3); | 78 void PrintfValue(const char* format, ...) PRINTF_ATTRIBUTE(2, 3); |
79 void PrintValue(const Object& o, bool ref = true); | 79 void PrintValue(const Object& o, bool ref = true); |
80 void PrintValue(SourceBreakpoint* bpt); | 80 void PrintValue(SourceBreakpoint* bpt); |
| 81 void PrintValue(Isolate* isolate, bool ref = true); |
81 | 82 |
82 void PrintPropertyBool(const char* name, bool b); | 83 void PrintPropertyBool(const char* name, bool b); |
83 void PrintProperty(const char* name, intptr_t i); | 84 void PrintProperty(const char* name, intptr_t i); |
84 void PrintProperty64(const char* name, int64_t i); | 85 void PrintProperty64(const char* name, int64_t i); |
85 void PrintProperty(const char* name, double d); | 86 void PrintProperty(const char* name, double d); |
86 void PrintProperty(const char* name, const char* s); | 87 void PrintProperty(const char* name, const char* s); |
87 void PrintfProperty(const char* name, const char* format, ...) | 88 void PrintfProperty(const char* name, const char* format, ...) |
88 PRINTF_ATTRIBUTE(3, 4); | 89 PRINTF_ATTRIBUTE(3, 4); |
89 void PrintProperty(const char* name, const Object& o, bool ref = true); | 90 void PrintProperty(const char* name, const Object& o, bool ref = true); |
90 | 91 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 } | 174 } |
174 | 175 |
175 void AddValue(bool b) const { stream_->PrintValueBool(b); } | 176 void AddValue(bool b) const { stream_->PrintValueBool(b); } |
176 void AddValue(intptr_t i) const { stream_->PrintValue(i); } | 177 void AddValue(intptr_t i) const { stream_->PrintValue(i); } |
177 void AddValue64(int64_t i) const { stream_->PrintValue64(i); } | 178 void AddValue64(int64_t i) const { stream_->PrintValue64(i); } |
178 void AddValue(double d) const { stream_->PrintValue(d); } | 179 void AddValue(double d) const { stream_->PrintValue(d); } |
179 void AddValue(const char* s) const { stream_->PrintValue(s); } | 180 void AddValue(const char* s) const { stream_->PrintValue(s); } |
180 void AddValue(const Object& obj, bool ref = true) const { | 181 void AddValue(const Object& obj, bool ref = true) const { |
181 stream_->PrintValue(obj, ref); | 182 stream_->PrintValue(obj, ref); |
182 } | 183 } |
| 184 void AddValue(Isolate* isolate, bool ref = true) const { |
| 185 stream_->PrintValue(isolate, ref); |
| 186 } |
183 void AddValue(SourceBreakpoint* bpt) const { | 187 void AddValue(SourceBreakpoint* bpt) const { |
184 stream_->PrintValue(bpt); | 188 stream_->PrintValue(bpt); |
185 } | 189 } |
186 void AddValueF(const char* format, ...) const PRINTF_ATTRIBUTE(2, 3); | 190 void AddValueF(const char* format, ...) const PRINTF_ATTRIBUTE(2, 3); |
187 | 191 |
188 private: | 192 private: |
189 JSONStream* stream_; | 193 JSONStream* stream_; |
190 | 194 |
191 friend class JSONObject; | 195 friend class JSONObject; |
192 | 196 |
193 DISALLOW_ALLOCATION(); | 197 DISALLOW_ALLOCATION(); |
194 DISALLOW_COPY_AND_ASSIGN(JSONArray); | 198 DISALLOW_COPY_AND_ASSIGN(JSONArray); |
195 }; | 199 }; |
196 | 200 |
197 } // namespace dart | 201 } // namespace dart |
198 | 202 |
199 #endif // VM_JSON_STREAM_H_ | 203 #endif // VM_JSON_STREAM_H_ |
OLD | NEW |