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

Unified Diff: runtime/vm/object.cc

Issue 189293002: Revert "Access to imports in the VM's runtime mirrors. Extend test coverage of the source mirrors." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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/parser.h » ('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 a4c362b552e46ab460f73e6e62f9ab7ac6e1f840..ba744e3d0adb5cdafbc9a40acbbeaecf67fa17a3 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -8947,45 +8947,6 @@ void LibraryPrefix::PrintToJSONStream(JSONStream* stream, bool ref) const {
}
-void Namespace::set_metadata_field(const Field& value) const {
- StorePointer(&raw_ptr()->metadata_field_, value.raw());
-}
-
-
-void Namespace::AddMetadata(intptr_t token_pos, const Class& owner_class) {
- ASSERT(Field::Handle(metadata_field()).IsNull());
- Field& field = Field::Handle(Field::New(Symbols::TopLevel(),
- true, // is_static
- false, // is_final
- false, // is_const
- owner_class,
- token_pos));
- field.set_type(Type::Handle(Type::DynamicType()));
- field.set_value(Array::empty_array());
- set_metadata_field(field);
-}
-
-
-RawObject* Namespace::GetMetadata() const {
- Field& field = Field::Handle(metadata_field());
- if (field.IsNull()) {
- // There is no metadata for this object.
- return Object::empty_array().raw();
- }
- Object& metadata = Object::Handle();
- metadata = field.value();
- if (field.value() == Object::empty_array().raw()) {
- metadata = Parser::ParseMetadata(Class::Handle(field.owner()),
- field.token_pos());
- if (metadata.IsArray()) {
- ASSERT(Array::Cast(metadata).raw() != Object::empty_array().raw());
- field.set_value(Array::Cast(metadata));
- }
- }
- return metadata.raw();
-}
-
-
const char* Namespace::ToCString() const {
const char* kFormat = "Namespace for library '%s'";
const Library& lib = Library::Handle(library());
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698