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

Unified Diff: runtime/vm/object.cc

Issue 11880004: - Start adding meta data for fields of VM internal classes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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
« no previous file with comments | « runtime/vm/object.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 16939)
+++ runtime/vm/object.cc (working copy)
@@ -496,6 +496,23 @@
}
+void Object::CreateInternalMetaData() {
+ // Initialize meta data for VM internal classes.
+ Class& cls = Class::Handle();
+ Array& fields = Array::Handle();
+ Field& fld = Field::Handle();
+ String& name = String::Handle();
+
+ // TODO(iposva): Add more of the VM classes here.
+ cls = context_class_;
+ fields = Array::New(1);
+ name = Symbols::New("parent _");
cshapiro 2013/01/11 21:23:21 Maybe use @ instead of ' ' in the identifier so we
Ivan Posva 2013/01/11 23:05:37 Done.
+ fld = Field::New(name, false, false, false, cls, 0);
+ fields.SetAt(0, fld);
+ cls. SetFields(fields);
cshapiro 2013/01/11 21:23:21 Horizontal space!
Ivan Posva 2013/01/11 23:05:37 Done.
+}
+
+
// Make unused space in an object whose type has been transformed safe
// for traversing during GC.
// The unused part of the transformed object is marked as an Array
« no previous file with comments | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698