| 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 #include "vm/object.h" | 6 #include "vm/object.h" |
| 7 #include "vm/debugger.h" | 7 #include "vm/debugger.h" |
| 8 #include "vm/json_stream.h" | 8 #include "vm/json_stream.h" |
| 9 | 9 |
| 10 | 10 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 free(p); | 120 free(p); |
| 121 } | 121 } |
| 122 | 122 |
| 123 | 123 |
| 124 void JSONStream::PrintValue(const Object& o, bool ref) { | 124 void JSONStream::PrintValue(const Object& o, bool ref) { |
| 125 PrintCommaIfNeeded(); | 125 PrintCommaIfNeeded(); |
| 126 o.PrintToJSONStream(this, ref); | 126 o.PrintToJSONStream(this, ref); |
| 127 } | 127 } |
| 128 | 128 |
| 129 | 129 |
| 130 void JSONStream::PrintValue(const Field& field, | |
| 131 const Instance& instance, | |
| 132 bool ref) { | |
| 133 PrintCommaIfNeeded(); | |
| 134 field.PrintToJSONStreamWithInstance(this, instance, ref); | |
| 135 } | |
| 136 | |
| 137 | |
| 138 void JSONStream::PrintValue(SourceBreakpoint* bpt) { | 130 void JSONStream::PrintValue(SourceBreakpoint* bpt) { |
| 139 PrintCommaIfNeeded(); | 131 PrintCommaIfNeeded(); |
| 140 bpt->PrintToJSONStream(this); | 132 bpt->PrintToJSONStream(this); |
| 141 } | 133 } |
| 142 | 134 |
| 143 | 135 |
| 144 void JSONStream::PrintPropertyBool(const char* name, bool b) { | 136 void JSONStream::PrintPropertyBool(const char* name, bool b) { |
| 145 PrintPropertyName(name); | 137 PrintPropertyName(name); |
| 146 PrintValueBool(b); | 138 PrintValueBool(b); |
| 147 } | 139 } |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 intptr_t len2 = OS::VSNPrint(p, len+1, format, args); | 264 intptr_t len2 = OS::VSNPrint(p, len+1, format, args); |
| 273 va_end(args); | 265 va_end(args); |
| 274 ASSERT(len == len2); | 266 ASSERT(len == len2); |
| 275 stream_->buffer_.AddChar('"'); | 267 stream_->buffer_.AddChar('"'); |
| 276 stream_->buffer_.AddEscapedString(p); | 268 stream_->buffer_.AddEscapedString(p); |
| 277 stream_->buffer_.AddChar('"'); | 269 stream_->buffer_.AddChar('"'); |
| 278 free(p); | 270 free(p); |
| 279 } | 271 } |
| 280 | 272 |
| 281 } // namespace dart | 273 } // namespace dart |
| OLD | NEW |