| 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 3a229e385e697d437149bb76dcda6627f246316d..8b99d380dc3568bf3255268875e66277022daaf0 100644
|
| --- a/pkg/compiler/lib/src/js_backend/codegen/glue.dart
|
| +++ b/pkg/compiler/lib/src/js_backend/codegen/glue.dart
|
| @@ -7,6 +7,8 @@ library code_generator_dependencies;
|
| import '../js_backend.dart';
|
| import '../../common/registry.dart' show
|
| Registry;
|
| +import '../../common/codegen.dart' show
|
| + CodegenRegistry;
|
| import '../../compiler.dart' show
|
| Compiler;
|
| import '../../constants/values.dart';
|
| @@ -23,6 +25,7 @@ import '../../enqueue.dart' show
|
| import '../../elements/elements.dart';
|
| import '../../js_emitter/js_emitter.dart';
|
| import '../../js/js.dart' as js;
|
| +import '../../native/native.dart' show NativeBehavior;
|
| import '../../universe/selector.dart' show
|
| Selector;
|
| import '../../world.dart' show
|
| @@ -132,6 +135,10 @@ class Glue {
|
| return _backend.getInterceptedClassesOn(selector.name);
|
| }
|
|
|
| + Set<ClassElement> get interceptedClasses {
|
| + return _backend.interceptedClasses;
|
| + }
|
| +
|
| void registerSpecializedGetInterceptor(Set<ClassElement> classes) {
|
| _backend.registerSpecializedGetInterceptor(classes);
|
| }
|
| @@ -234,12 +241,15 @@ class Glue {
|
| }
|
|
|
| js.Expression generateTypeRepresentation(DartType dartType,
|
| - List<js.Expression> arguments) {
|
| + List<js.Expression> arguments,
|
| + CodegenRegistry registry) {
|
| int variableIndex = 0;
|
| js.Expression representation = _backend.rti.getTypeRepresentation(
|
| dartType,
|
| (_) => arguments[variableIndex++]);
|
| assert(variableIndex == arguments.length);
|
| + // Representation contains JavaScript Arrays.
|
| + registry.registerInstantiatedClass(_backend.jsArrayClass);
|
| return representation;
|
| }
|
|
|
| @@ -264,7 +274,10 @@ class Glue {
|
| return _compiler.world.hasAnyStrictSubtype(element);
|
| }
|
|
|
| + ClassElement get jsFixedArrayClass => _backend.jsFixedArrayClass;
|
| ClassElement get jsExtendableArrayClass => _backend.jsExtendableArrayClass;
|
| + ClassElement get jsUnmodifiableArrayClass =>
|
| + _backend.jsUnmodifiableArrayClass;
|
| ClassElement get jsMutableArrayClass => _backend.jsMutableArrayClass;
|
|
|
| bool isStringClass(ClassElement classElement) =>
|
| @@ -274,4 +287,10 @@ class Glue {
|
| bool isBoolClass(ClassElement classElement) =>
|
| classElement == _backend.jsBoolClass ||
|
| classElement == _compiler.boolClass;
|
| +
|
| + // TODO(sra): Should this be part of CodegenRegistry?
|
| + void registerNativeBehavior(NativeBehavior nativeBehavior, node) {
|
| + if (nativeBehavior == null) return;
|
| + _enqueuer.nativeEnqueuer.registerNativeBehavior(nativeBehavior, node);
|
| + }
|
| }
|
|
|