Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: runtime/vm/object.cc

Issue 1341473002: Fix a variety of service protocol bugs. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/json_test.cc ('k') | runtime/vm/object_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after
1660 const char* vm_type = JSONType(); 1660 const char* vm_type = JSONType();
1661 bool same_type = (strcmp(protocol_type, vm_type) == 0); 1661 bool same_type = (strcmp(protocol_type, vm_type) == 0);
1662 if (ref) { 1662 if (ref) {
1663 jsobj->AddPropertyF("type", "@%s", protocol_type); 1663 jsobj->AddPropertyF("type", "@%s", protocol_type);
1664 } else { 1664 } else {
1665 jsobj->AddProperty("type", protocol_type); 1665 jsobj->AddProperty("type", protocol_type);
1666 } 1666 }
1667 if (!same_type) { 1667 if (!same_type) {
1668 jsobj->AddProperty("_vmType", vm_type); 1668 jsobj->AddProperty("_vmType", vm_type);
1669 } 1669 }
1670 if (!ref || IsInstance()) { 1670 if (!ref || IsInstance() || IsNull()) {
1671 // TODO(turnidge): Provide the type arguments here too? 1671 // TODO(turnidge): Provide the type arguments here too?
1672 const Class& cls = Class::Handle(this->clazz()); 1672 const Class& cls = Class::Handle(this->clazz());
1673 jsobj->AddProperty("class", cls); 1673 jsobj->AddProperty("class", cls);
1674 } 1674 }
1675 if (!ref) { 1675 if (!ref) {
1676 if (raw()->IsHeapObject()) { 1676 if (raw()->IsHeapObject()) {
1677 jsobj->AddProperty("size", raw()->Size()); 1677 jsobj->AddProperty("size", raw()->Size());
1678 } else { 1678 } else {
1679 jsobj->AddProperty("size", (intptr_t)0); 1679 jsobj->AddProperty("size", (intptr_t)0);
1680 } 1680 }
(...skipping 19754 matching lines...) Expand 10 before | Expand all | Expand 10 after
21435 return tag_label.ToCString(); 21435 return tag_label.ToCString();
21436 } 21436 }
21437 21437
21438 21438
21439 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 21439 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
21440 Instance::PrintJSONImpl(stream, ref); 21440 Instance::PrintJSONImpl(stream, ref);
21441 } 21441 }
21442 21442
21443 21443
21444 } // namespace dart 21444 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/json_test.cc ('k') | runtime/vm/object_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698