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

Unified Diff: pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart

Issue 1421003004: Add CoreClasses (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comment. Created 5 years, 2 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: pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
diff --git a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
index ba14eceea57f8e7a1f2805af4a219e2cacb83a24..f2945d8a57184ad317d807c7f6bdbd7f3c341bac 100644
--- a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
@@ -180,7 +180,8 @@ class RuntimeTypeGenerator {
return backend.rti.isTrivialSubstitution(a, b);
}
- if (superclass != null && superclass != compiler.objectClass &&
+ if (superclass != null &&
+ superclass != compiler.coreClasses.objectClass &&
!haveSameTypeVariables(cls, superclass)) {
// We cannot inherit the generated substitutions, because the type
// variable layout for this class is different. Instead we generate
@@ -216,7 +217,7 @@ class RuntimeTypeGenerator {
// A class that defines a `call` method implicitly implements
// [Function] and needs checks for all typedefs that are used in is-checks.
- if (checkedClasses.contains(compiler.functionClass) ||
+ if (checkedClasses.contains(compiler.coreClasses.functionClass) ||
checkedFunctionTypes.isNotEmpty) {
Element call = cls.lookupLocalMember(Identifiers.call);
if (call == null) {
@@ -228,7 +229,7 @@ class RuntimeTypeGenerator {
// A superclass might already implement the Function interface. In such
// a case, we can avoid emiting the is test here.
if (!cls.superclass.implementsFunction(compiler)) {
- _generateInterfacesIsTests(compiler.functionClass,
+ _generateInterfacesIsTests(compiler.coreClasses.functionClass,
generateIsTest,
generateSubstitution,
generated);

Powered by Google App Engine
This is Rietveld 408576698