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

Unified Diff: runtime/vm/object.cc

Issue 363473004: Hide synthetic metadata field exposed in r35926. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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') | runtime/vm/object_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index bfb2bee526da27b765743d34ee1e8aa6277bf191..1c141425a227f25e4a935f5bc1f640274fad9d75 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -796,23 +796,6 @@ void Object::RegisterSingletonClassNames() {
}
-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, Heap::kOld);
- name = Symbols::New("@parent_");
- fld = Field::New(name, false, false, false, cls, 0);
- fields.SetAt(0, fld);
- cls.SetFields(fields);
-}
-
-
// 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 TypedDataInt8Array
@@ -1388,7 +1371,7 @@ RawError* Object::Init(Isolate* isolate) {
#define ADD_SET_FIELD(clazz) \
field_name = Symbols::New("cid"#clazz); \
- field = Field::New(field_name, true, false, true, cls, 0); \
+ field = Field::New(field_name, true, false, true, false, cls, 0); \
value = Smi::New(k##clazz##Cid); \
field.set_value(value); \
field.set_type(Type::Handle(Type::IntType())); \
@@ -6863,6 +6846,7 @@ RawField* Field::New(const String& name,
bool is_static,
bool is_final,
bool is_const,
+ bool is_synthetic,
const Class& owner,
intptr_t token_pos) {
ASSERT(!owner.IsNull());
@@ -6876,6 +6860,7 @@ RawField* Field::New(const String& name,
}
result.set_is_final(is_final);
result.set_is_const(is_const);
+ result.set_is_synthetic(is_synthetic);
result.set_owner(owner);
result.set_token_pos(token_pos);
result.set_has_initializer(false);
@@ -8475,6 +8460,7 @@ void Library::AddMetadata(const Class& cls,
true, // is_static
false, // is_final
false, // is_const
+ true, // is_synthetic
cls,
token_pos));
field.set_type(Type::Handle(Type::DynamicType()));
@@ -9838,6 +9824,7 @@ void Namespace::AddMetadata(intptr_t token_pos, const Class& owner_class) {
true, // is_static
false, // is_final
false, // is_const
+ true, // is_synthetic
owner_class,
token_pos));
field.set_type(Type::Handle(Type::DynamicType()));
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/object_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698