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 #include "platform/assert.h" | 5 #include "platform/assert.h" |
6 | 6 |
7 #include "vm/dart_entry.h" | 7 #include "vm/dart_entry.h" |
8 #include "vm/debugger.h" | 8 #include "vm/debugger.h" |
9 #include "vm/json_stream.h" | 9 #include "vm/json_stream.h" |
10 #include "vm/message.h" | 10 #include "vm/message.h" |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 o.PrintToJSONStream(this, ref); | 235 o.PrintToJSONStream(this, ref); |
236 } | 236 } |
237 | 237 |
238 | 238 |
239 void JSONStream::PrintValue(SourceBreakpoint* bpt) { | 239 void JSONStream::PrintValue(SourceBreakpoint* bpt) { |
240 PrintCommaIfNeeded(); | 240 PrintCommaIfNeeded(); |
241 bpt->PrintToJSONStream(this); | 241 bpt->PrintToJSONStream(this); |
242 } | 242 } |
243 | 243 |
244 | 244 |
| 245 void JSONStream::PrintValue(Isolate* isolate, bool ref) { |
| 246 PrintCommaIfNeeded(); |
| 247 isolate->PrintToJSONStream(this, ref); |
| 248 } |
| 249 |
| 250 |
245 void JSONStream::PrintPropertyBool(const char* name, bool b) { | 251 void JSONStream::PrintPropertyBool(const char* name, bool b) { |
246 PrintPropertyName(name); | 252 PrintPropertyName(name); |
247 PrintValueBool(b); | 253 PrintValueBool(b); |
248 } | 254 } |
249 | 255 |
250 | 256 |
251 void JSONStream::PrintProperty(const char* name, intptr_t i) { | 257 void JSONStream::PrintProperty(const char* name, intptr_t i) { |
252 PrintPropertyName(name); | 258 PrintPropertyName(name); |
253 PrintValue(i); | 259 PrintValue(i); |
254 } | 260 } |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 intptr_t len2 = OS::VSNPrint(p, len+1, format, args); | 402 intptr_t len2 = OS::VSNPrint(p, len+1, format, args); |
397 va_end(args); | 403 va_end(args); |
398 ASSERT(len == len2); | 404 ASSERT(len == len2); |
399 stream_->buffer_.AddChar('"'); | 405 stream_->buffer_.AddChar('"'); |
400 stream_->AddEscapedUTF8String(p); | 406 stream_->AddEscapedUTF8String(p); |
401 stream_->buffer_.AddChar('"'); | 407 stream_->buffer_.AddChar('"'); |
402 free(p); | 408 free(p); |
403 } | 409 } |
404 | 410 |
405 } // namespace dart | 411 } // namespace dart |
OLD | NEW |