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

Unified Diff: sdk/lib/_internal/lib/js_rti.dart

Issue 236313012: Don't hide interceptors in mirrors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 6 years, 8 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 | « sdk/lib/_internal/lib/js_number.dart ('k') | tests/compiler/dart2js/mirrors_used_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/lib/js_rti.dart
diff --git a/sdk/lib/_internal/lib/js_rti.dart b/sdk/lib/_internal/lib/js_rti.dart
index f389abbe03b590650eb54c934268c95cdb323a41..5293613a058c42d52e16a1e0e640f56cb58ff761 100644
--- a/sdk/lib/_internal/lib/js_rti.dart
+++ b/sdk/lib/_internal/lib/js_rti.dart
@@ -52,9 +52,7 @@ class TypeImpl implements Type {
String toString() {
if (_unmangledName != null) return _unmangledName;
- String unmangledName = unmangleGlobalNameIfPreservedAnyways(_typeName);
- // TODO(ahe): Handle type arguments.
- if (unmangledName == null) unmangledName = _typeName;
+ String unmangledName = unmangleAllIdentifiersIfPreservedAnyways(_typeName);
return _unmangledName = unmangledName;
}
@@ -211,9 +209,12 @@ String joinArguments(var types, int startIndex,
/**
* Returns a human-readable representation of the type of [object].
+ *
+ * In minified mode does *not* use unminified identifiers (even when present).
*/
String getRuntimeTypeString(var object) {
- String className = isJsArray(object) ? 'List' : getClassName(object);
+ String className = getClassName(object);
+ if (object == null) return className;
var typeInfo = JS('var', r'#.$builtinTypeInfo', object);
return "$className${joinArguments(typeInfo, 0)}";
}
@@ -276,6 +277,9 @@ bool checkSubtype(Object object, String isField, List checks, String asField) {
return checkArguments(substitution, arguments, checks);
}
+/// Returns the field's type name.
+///
+/// In minified mode, uses the unminified names if available.
String computeTypeName(String isField, List arguments) {
// Shorten the field name to the class name and append the textual
// representation of the type arguments.
« no previous file with comments | « sdk/lib/_internal/lib/js_number.dart ('k') | tests/compiler/dart2js/mirrors_used_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698