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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/class_table.cc
diff --git a/runtime/vm/class_table.cc b/runtime/vm/class_table.cc
index 2cf1ac1fcf4d53286e7b95945de538ebd8112857..e85053a6d9cf5eb652c9f35946ae7343a929f40e 100644
--- a/runtime/vm/class_table.cc
+++ b/runtime/vm/class_table.cc
@@ -95,4 +95,20 @@ void ClassTable::Print() {
}
}
+
+void ClassTable::PrintToJSONStream(JSONStream* stream) {
+ Class& cls = Class::Handle();
+ JSONObject jsobj(stream);
+ jsobj.AddProperty("type", "ClassList");
+ {
+ JSONArray members(&jsobj, "members");
+ for (intptr_t i = 1; i < top_; i++) {
+ if (HasValidClassAt(i)) {
+ cls = At(i);
+ members.AddValue(cls);
+ }
+ }
+ }
+}
+
} // namespace dart
« 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