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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/namer.dart

Issue 236313012: Don't hide interceptors in mirrors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minor cleanups. 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
Index: sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
index 7a33d97692815cf9fa685560c7dac7eac3a63bf4..40c308adcfc83d629d3f2c3a66a99223fc5f7ec5 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
@@ -726,38 +726,7 @@ class Namer implements ClosureNamer {
/// Returns the runtime name for [element]. The result is not safe as an id.
String getRuntimeTypeName(Element element) {
if (identical(element, compiler.dynamicClass)) return 'dynamic';
- JavaScriptBackend backend = compiler.backend;
- element = backend.getImplementationClass(element);
- String name = getPrimitiveInterceptorRuntimeName(element);
- // TODO(ahe): Creating a string here is unfortunate. It is slow (due to
- // string concatenation in the implementation), and may prevent
- // segmentation of '$'.
- return name != null ? name : getNameForRti(element);
- }
-
- /**
- * Return a string to be used as the runtime name of this class (instead of
- * the class name) or [:null:] if the class name should be used.
- */
- String getPrimitiveInterceptorRuntimeName(Element cls) {
- JavaScriptBackend backend = compiler.backend;
- if (cls == backend.jsIntClass) {
- return 'int';
- } else if (cls == backend.jsNumberClass) {
- return 'num';
- } else if (cls == backend.jsBoolClass) {
- return 'bool';
- } else if (cls == backend.jsDoubleClass) {
- return 'double';
- } else if (cls == backend.jsStringClass) {
- return 'String';
- } else if (cls == backend.jsArrayClass) {
- return 'List';
- } else if (cls == backend.jsNullClass) {
- return 'Null';
- } else {
- return null;
- }
+ return getNameForRti(element);
}
/**

Powered by Google App Engine
This is Rietveld 408576698