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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 ASSERT(len == len2); | 230 ASSERT(len == len2); |
231 buffer_.AddChar('"'); | 231 buffer_.AddChar('"'); |
232 AddEscapedUTF8String(p); | 232 AddEscapedUTF8String(p); |
233 buffer_.AddChar('"'); | 233 buffer_.AddChar('"'); |
234 free(p); | 234 free(p); |
235 } | 235 } |
236 | 236 |
237 | 237 |
238 void JSONStream::PrintValue(const Object& o, bool ref) { | 238 void JSONStream::PrintValue(const Object& o, bool ref) { |
239 PrintCommaIfNeeded(); | 239 PrintCommaIfNeeded(); |
240 o.PrintToJSONStream(this, ref); | 240 o.PrintJSON(this, ref); |
241 } | 241 } |
242 | 242 |
243 | 243 |
244 void JSONStream::PrintValue(SourceBreakpoint* bpt) { | 244 void JSONStream::PrintValue(SourceBreakpoint* bpt) { |
245 PrintCommaIfNeeded(); | 245 PrintCommaIfNeeded(); |
246 bpt->PrintToJSONStream(this); | 246 bpt->PrintJSON(this); |
247 } | 247 } |
248 | 248 |
249 | 249 |
250 void JSONStream::PrintValue(Isolate* isolate, bool ref) { | 250 void JSONStream::PrintValue(Isolate* isolate, bool ref) { |
251 PrintCommaIfNeeded(); | 251 PrintCommaIfNeeded(); |
252 isolate->PrintToJSONStream(this, ref); | 252 isolate->PrintJSON(this, ref); |
253 } | 253 } |
254 | 254 |
255 | 255 |
256 void JSONStream::PrintPropertyBool(const char* name, bool b) { | 256 void JSONStream::PrintPropertyBool(const char* name, bool b) { |
257 PrintPropertyName(name); | 257 PrintPropertyName(name); |
258 PrintValueBool(b); | 258 PrintValueBool(b); |
259 } | 259 } |
260 | 260 |
261 | 261 |
262 void JSONStream::PrintProperty(const char* name, intptr_t i) { | 262 void JSONStream::PrintProperty(const char* name, intptr_t i) { |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 intptr_t len2 = OS::VSNPrint(p, len+1, format, args); | 411 intptr_t len2 = OS::VSNPrint(p, len+1, format, args); |
412 va_end(args); | 412 va_end(args); |
413 ASSERT(len == len2); | 413 ASSERT(len == len2); |
414 stream_->buffer_.AddChar('"'); | 414 stream_->buffer_.AddChar('"'); |
415 stream_->AddEscapedUTF8String(p); | 415 stream_->AddEscapedUTF8String(p); |
416 stream_->buffer_.AddChar('"'); | 416 stream_->buffer_.AddChar('"'); |
417 free(p); | 417 free(p); |
418 } | 418 } |
419 | 419 |
420 } // namespace dart | 420 } // namespace dart |
OLD | NEW |