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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 } | 267 } |
268 | 268 |
269 | 269 |
270 void JSONStream::PrintPropertyBool(const char* name, bool b) { | 270 void JSONStream::PrintPropertyBool(const char* name, bool b) { |
271 PrintPropertyName(name); | 271 PrintPropertyName(name); |
272 PrintValueBool(b); | 272 PrintValueBool(b); |
273 } | 273 } |
274 | 274 |
275 | 275 |
276 void JSONStream::PrintProperty(const char* name, intptr_t i) { | 276 void JSONStream::PrintProperty(const char* name, intptr_t i) { |
| 277 ASSERT(Utils::IsJavascriptInt(i)); |
277 PrintPropertyName(name); | 278 PrintPropertyName(name); |
278 PrintValue(i); | 279 PrintValue(i); |
279 } | 280 } |
280 | 281 |
281 | 282 |
282 void JSONStream::PrintProperty64(const char* name, int64_t i) { | 283 void JSONStream::PrintProperty64(const char* name, int64_t i) { |
| 284 ASSERT(Utils::IsJavascriptInt(i)); |
283 PrintPropertyName(name); | 285 PrintPropertyName(name); |
284 PrintValue64(i); | 286 PrintValue64(i); |
285 } | 287 } |
286 | 288 |
287 | 289 |
288 void JSONStream::PrintProperty(const char* name, double d) { | 290 void JSONStream::PrintProperty(const char* name, double d) { |
289 PrintPropertyName(name); | 291 PrintPropertyName(name); |
290 PrintValue(d); | 292 PrintValue(d); |
291 } | 293 } |
292 | 294 |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 intptr_t len2 = OS::VSNPrint(p, len+1, format, args); | 485 intptr_t len2 = OS::VSNPrint(p, len+1, format, args); |
484 va_end(args); | 486 va_end(args); |
485 ASSERT(len == len2); | 487 ASSERT(len == len2); |
486 stream_->buffer_.AddChar('"'); | 488 stream_->buffer_.AddChar('"'); |
487 stream_->AddEscapedUTF8String(p); | 489 stream_->AddEscapedUTF8String(p); |
488 stream_->buffer_.AddChar('"'); | 490 stream_->buffer_.AddChar('"'); |
489 free(p); | 491 free(p); |
490 } | 492 } |
491 | 493 |
492 } // namespace dart | 494 } // namespace dart |
OLD | NEW |