| Index: pkg/compiler/lib/src/js_backend/codegen/glue.dart
|
| diff --git a/pkg/compiler/lib/src/js_backend/codegen/glue.dart b/pkg/compiler/lib/src/js_backend/codegen/glue.dart
|
| index 0c8310c2a8959e7a149cd5509bc0cfedf9f74658..f5bb4f1c25c68f10836be87b22711a041a5f74e3 100644
|
| --- a/pkg/compiler/lib/src/js_backend/codegen/glue.dart
|
| +++ b/pkg/compiler/lib/src/js_backend/codegen/glue.dart
|
| @@ -11,6 +11,7 @@ import '../../js/js.dart' as js;
|
| import '../../constants/values.dart';
|
| import '../../elements/elements.dart';
|
| import '../../constants/expressions.dart';
|
| +import '../../dart_types.dart';
|
|
|
| /// Encapsulates the dependencies of the function-compiler to the compiler,
|
| /// backend and emitter.
|
| @@ -117,4 +118,38 @@ class Glue {
|
| return new js.VariableUse(
|
| _backend.namer.globalObjectFor(_backend.interceptorsLibrary));
|
| }
|
| +
|
| + FunctionElement getCreateRuntimeType() {
|
| + return _backend.getCreateRuntimeType();
|
| + }
|
| +
|
| + FunctionElement getRuntimeTypeToString() {
|
| + return _backend.getRuntimeTypeToString();
|
| + }
|
| +
|
| + FunctionElement getTypeArgumentWithSubstitution() {
|
| + return _backend.getGetRuntimeTypeArgument();
|
| + }
|
| +
|
| + FunctionElement getTypeArgumentByIndex() {
|
| + return _backend.getGetTypeArgumentByIndex();
|
| + }
|
| +
|
| + js.Expression getSubstitutionName(ClassElement cls) {
|
| + return js.string(_namer.substitutionName(cls));
|
| + }
|
| +
|
| + int getTypeVariableIndex(TypeVariableType variable) {
|
| + return RuntimeTypes.getTypeVariableIndex(variable.element);
|
| + }
|
| +
|
| + bool needsSubstitutionForTypeVariableAccess(ClassElement cls) {
|
| + ClassWorld classWorld = _compiler.world;
|
| + if (classWorld.isUsedAsMixin(cls)) return true;
|
| +
|
| + Iterable<ClassElement> subclasses = _compiler.world.strictSubclassesOf(cls);
|
| + return subclasses.any((ClassElement subclass) {
|
| + return !_backend.rti.isTrivialSubstitution(subclass, cls);
|
| + });
|
| + }
|
| }
|
|
|