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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 10800002: Hide names of internal classes from the user by mapping them to the documented (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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_finalizer.cc
===================================================================
--- runtime/vm/class_finalizer.cc (revision 9728)
+++ runtime/vm/class_finalizer.cc (working copy)
@@ -339,20 +339,11 @@
// ImmutableArray, GrowableObjectArray, IntegerImplementation, Smi, Mint,
// BigInt, OneByteString, TwoByteString, FourByteString.
ObjectStore* object_store = Isolate::Current()->object_store();
- const Library& core_impl_lib = Library::Handle(Library::CoreImplLibrary());
- const String& integer_implementation_name =
- String::Handle(String::NewSymbol("IntegerImplementation"));
- const Class& integer_implementation_class =
- Class::Handle(core_impl_lib.LookupClass(integer_implementation_name));
- const String& growable_object_array_name =
- String::Handle(String::NewSymbol("GrowableObjectArray"));
- const Class& growable_object_array_class =
- Class::Handle(core_impl_lib.LookupClass(growable_object_array_name));
if ((super_class.raw() == object_store->bool_class()) ||
(super_class.raw() == object_store->double_class()) ||
(super_class.raw() == object_store->array_class()) ||
(super_class.raw() == object_store->immutable_array_class()) ||
- (super_class.raw() == growable_object_array_class.raw()) ||
+ (super_class.raw() == object_store->growable_object_array_class()) ||
(super_class.raw() == object_store->int8_array_class()) ||
(super_class.raw() == object_store->uint8_array_class()) ||
(super_class.raw() == object_store->int16_array_class()) ||
@@ -373,7 +364,7 @@
(super_class.raw() == object_store->external_uint64_array_class()) ||
(super_class.raw() == object_store->external_float32_array_class()) ||
(super_class.raw() == object_store->external_float64_array_class()) ||
- (super_class.raw() == integer_implementation_class.raw()) ||
+ (super_class.raw() == object_store->integer_implementation_class()) ||
(super_class.raw() == object_store->smi_class()) ||
(super_class.raw() == object_store->mint_class()) ||
(super_class.raw() == object_store->bigint_class()) ||
@@ -652,7 +643,7 @@
Error::Handle(), // No previous error.
cls, parameterized_type, finalization,
"type '%s' illegally refers to itself",
- String::Handle(parameterized_type.Name()).ToCString());
+ String::Handle(parameterized_type.UserVisibleName()).ToCString());
return parameterized_type.raw();
}
@@ -686,7 +677,8 @@
// In checked mode, a type with malformed type arguments is malformed.
if (FLAG_enable_type_checks) {
const Error& error = Error::Handle(type_argument.malformed_error());
- const String& type_name = String::Handle(parameterized_type.Name());
+ const String& type_name =
+ String::Handle(parameterized_type.UserVisibleName());
FinalizeMalformedType(error, cls, parameterized_type, finalization,
"type '%s' has malformed type argument",
type_name.ToCString());
@@ -714,7 +706,7 @@
Error::Handle(), // No previous error.
cls, parameterized_type, finalization,
"wrong number of type arguments in type '%s'",
- String::Handle(parameterized_type.Name()).ToCString());
+ String::Handle(parameterized_type.UserVisibleName()).ToCString());
return parameterized_type.raw();
}
// The full type argument vector consists of the type arguments of the
@@ -795,7 +787,7 @@
malformed_error,
cls, parameterized_type, kFinalize,
"type arguments of type '%s' are not within bounds",
- String::Handle(parameterized_type.Name()).ToCString());
+ String::Handle(parameterized_type.UserVisibleName()).ToCString());
return parameterized_type.raw();
}
}
« no previous file with comments | « runtime/lib/error.cc ('k') | runtime/vm/code_generator.cc » ('j') | runtime/vm/raw_object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698