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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 free(p); | 320 free(p); |
321 } | 321 } |
322 | 322 |
323 | 323 |
324 void JSONStream::PrintValue(const Object& o, bool ref) { | 324 void JSONStream::PrintValue(const Object& o, bool ref) { |
325 PrintCommaIfNeeded(); | 325 PrintCommaIfNeeded(); |
326 o.PrintJSON(this, ref); | 326 o.PrintJSON(this, ref); |
327 } | 327 } |
328 | 328 |
329 | 329 |
330 void JSONStream::PrintValue(SourceBreakpoint* bpt) { | 330 void JSONStream::PrintValue(Breakpoint* bpt) { |
331 PrintCommaIfNeeded(); | 331 PrintCommaIfNeeded(); |
332 bpt->PrintJSON(this); | 332 bpt->PrintJSON(this); |
333 } | 333 } |
334 | 334 |
335 | 335 |
336 void JSONStream::PrintValue(const ServiceEvent* event) { | 336 void JSONStream::PrintValue(const ServiceEvent* event) { |
337 PrintCommaIfNeeded(); | 337 PrintCommaIfNeeded(); |
338 event->PrintJSON(this); | 338 event->PrintJSON(this); |
339 } | 339 } |
340 | 340 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 PrintValueNoEscape(s); | 408 PrintValueNoEscape(s); |
409 } | 409 } |
410 | 410 |
411 | 411 |
412 void JSONStream::PrintProperty(const char* name, const ServiceEvent* event) { | 412 void JSONStream::PrintProperty(const char* name, const ServiceEvent* event) { |
413 PrintPropertyName(name); | 413 PrintPropertyName(name); |
414 PrintValue(event); | 414 PrintValue(event); |
415 } | 415 } |
416 | 416 |
417 | 417 |
418 void JSONStream::PrintProperty(const char* name, SourceBreakpoint* bpt) { | 418 void JSONStream::PrintProperty(const char* name, Breakpoint* bpt) { |
419 PrintPropertyName(name); | 419 PrintPropertyName(name); |
420 PrintValue(bpt); | 420 PrintValue(bpt); |
421 } | 421 } |
422 | 422 |
423 | 423 |
424 void JSONStream::PrintProperty(const char* name, Metric* metric) { | 424 void JSONStream::PrintProperty(const char* name, Metric* metric) { |
425 PrintPropertyName(name); | 425 PrintPropertyName(name); |
426 PrintValue(metric); | 426 PrintValue(metric); |
427 } | 427 } |
428 | 428 |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 intptr_t len2 = OS::VSNPrint(p, len+1, format, args); | 609 intptr_t len2 = OS::VSNPrint(p, len+1, format, args); |
610 va_end(args); | 610 va_end(args); |
611 ASSERT(len == len2); | 611 ASSERT(len == len2); |
612 stream_->buffer_.AddChar('"'); | 612 stream_->buffer_.AddChar('"'); |
613 stream_->AddEscapedUTF8String(p); | 613 stream_->AddEscapedUTF8String(p); |
614 stream_->buffer_.AddChar('"'); | 614 stream_->buffer_.AddChar('"'); |
615 free(p); | 615 free(p); |
616 } | 616 } |
617 | 617 |
618 } // namespace dart | 618 } // namespace dart |
OLD | NEW |