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

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

Issue 24075002: Expose field data, use class id, and merge all collections into "objects" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | Annotate | Revision Log
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/class_table.h" 5 #include "vm/class_table.h"
6 #include "vm/flags.h" 6 #include "vm/flags.h"
7 #include "vm/freelist.h" 7 #include "vm/freelist.h"
8 #include "vm/object.h" 8 #include "vm/object.h"
9 #include "vm/raw_object.h" 9 #include "vm/raw_object.h"
10 #include "vm/visitor.h" 10 #include "vm/visitor.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 for (intptr_t i = 1; i < top_; i++) { 89 for (intptr_t i = 1; i < top_; i++) {
90 cls = At(i); 90 cls = At(i);
91 if (cls.raw() != reinterpret_cast<RawClass*>(0)) { 91 if (cls.raw() != reinterpret_cast<RawClass*>(0)) {
92 name = cls.Name(); 92 name = cls.Name();
93 OS::Print("%" Pd ": %s\n", i, name.ToCString()); 93 OS::Print("%" Pd ": %s\n", i, name.ToCString());
94 } 94 }
95 } 95 }
96 } 96 }
97 97
98
99 void ClassTable::PrintToJSONStream(JSONStream* stream) {
100 Class& cls = Class::Handle();
101 JSONObject jsobj(stream);
102 jsobj.AddProperty("type", "ClassList");
103 {
104 JSONArray members(&jsobj, "members");
105 for (intptr_t i = 1; i < top_; i++) {
106 if (HasValidClassAt(i)) {
107 cls = At(i);
108 members.AddValue(cls);
109 }
110 }
111 }
112 }
113
98 } // namespace dart 114 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/class_table.h ('k') | runtime/vm/object.cc » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698