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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_emitter/type_test_emitter.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
Index: sdk/lib/_internal/compiler/implementation/js_emitter/type_test_emitter.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_emitter/type_test_emitter.dart b/sdk/lib/_internal/compiler/implementation/js_emitter/type_test_emitter.dart
index b46b6fb5dd49ec20300183d7c29d8de630cf5f56..af6c82ebfab97fc72248ce496fb0941cb1818fc9 100644
--- a/sdk/lib/_internal/compiler/implementation/js_emitter/type_test_emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_emitter/type_test_emitter.dart
@@ -49,7 +49,6 @@ class TypeTestEmitter extends CodeEmitterHelper {
// Avoid emitting [:$isObject:] on all classes but [Object].
return;
}
- other = backend.getImplementationClass(other);
builder.addProperty(namer.operatorIs(other), js('true'));
}
@@ -232,7 +231,8 @@ class TypeTestEmitter extends CodeEmitterHelper {
Map<FunctionType, bool> getFunctionTypeChecksOn(DartType type) {
Map<FunctionType, bool> functionTypeMap = new Map<FunctionType, bool>();
for (FunctionType functionType in checkedFunctionTypes) {
- int maybeSubtype = compiler.types.computeSubtypeRelation(type, functionType);
+ int maybeSubtype =
+ compiler.types.computeSubtypeRelation(type, functionType);
if (maybeSubtype == Types.IS_SUBTYPE) {
functionTypeMap[functionType] = true;
} else if (maybeSubtype == Types.MAYBE_SUBTYPE) {
@@ -288,8 +288,7 @@ class TypeTestEmitter extends CodeEmitterHelper {
if (destination != outputUnit) continue;
// TODO(9556). The properties added to 'holder' should be generated
// directly as properties of the class object, not added later.
- jsAst.Expression holder
- = namer.elementAccess(backend.getImplementationClass(cls));
+ jsAst.Expression holder = namer.elementAccess(cls);
for (TypeCheck check in typeChecks[cls]) {
ClassElement cls = check.cls;
@@ -324,7 +323,7 @@ class TypeTestEmitter extends CodeEmitterHelper {
Set<ClassElement> result = new Set<ClassElement>();
for (ClassElement cls in typeChecks) {
for (TypeCheck check in typeChecks[cls]) {
- result.add(backend.getImplementationClass(cls));
+ result.add(cls);
break;
}
}
@@ -352,13 +351,8 @@ class TypeTestEmitter extends CodeEmitterHelper {
// TODO(karlklose): merge this case with 2 when unifying argument and
// object checks.
RuntimeTypes rti = backend.rti;
- rti.getRequiredArgumentClasses(backend).forEach((ClassElement c) {
- // Types that we represent with JS native types (like int and String) do
- // not need a class definition as we use the interceptor classes instead.
- if (!rti.isJsNative(c)) {
- addClassWithSuperclasses(c);
- }
- });
+ rti.getRequiredArgumentClasses(backend)
+ .forEach(addClassWithSuperclasses);
// 2. Add classes that are referenced by substitutions in object checks and
// their superclasses.

Powered by Google App Engine
This is Rietveld 408576698