| Index: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
|
| index 3bc06c91da6a14d4f45bf466365ad3a304afe449..adc4847d32747f9b5eb82e6ed723756722aa63bd 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
|
| @@ -947,6 +947,12 @@ class JavaScriptBackend extends Backend {
|
| return new JavaScriptItemCompilationContext();
|
| }
|
|
|
| + void addBackendRtiDependencies(World world) {
|
| + if (jsArrayClass != null) {
|
| + world.registerRtiDependency(jsArrayClass, compiler.listClass);
|
| + }
|
| + }
|
| +
|
| void enqueueHelpers(ResolutionEnqueuer world) {
|
| jsIndexingBehaviorInterface =
|
| compiler.findHelper(const SourceString('JavaScriptIndexingBehavior'));
|
| @@ -988,6 +994,14 @@ class JavaScriptBackend extends Backend {
|
| enqueueInResolution(getTraceFromException());
|
| }
|
|
|
| + void registerSetRuntimeType() {
|
| + enqueueInResolution(getSetRuntimeTypeInfo());
|
| + }
|
| +
|
| + void registerGetRuntimeTypeArgument() {
|
| + enqueueInResolution(getGetRuntimeTypeArgument());
|
| + }
|
| +
|
| void registerRuntimeType() {
|
| enqueueInResolution(getSetRuntimeTypeInfo());
|
| enqueueInResolution(getGetRuntimeTypeInfo());
|
| @@ -995,11 +1009,13 @@ class JavaScriptBackend extends Backend {
|
| }
|
|
|
| void registerIsCheck(DartType type, Enqueuer world) {
|
| - if (!type.isRaw) {
|
| + bool isTypeVariable = type.kind == TypeKind.TYPE_VARIABLE;
|
| + if (!type.isRaw || isTypeVariable) {
|
| enqueueInResolution(getSetRuntimeTypeInfo());
|
| enqueueInResolution(getGetRuntimeTypeInfo());
|
| enqueueInResolution(getGetRuntimeTypeArgument());
|
| enqueueInResolution(getCheckArguments());
|
| + if (isTypeVariable) enqueueInResolution(getGetObjectIsSubtype());
|
| }
|
| // [registerIsCheck] is also called for checked mode checks, so we
|
| // need to register checked mode helpers.
|
| @@ -1444,6 +1460,10 @@ class JavaScriptBackend extends Backend {
|
| return compiler.findHelper(const SourceString('checkArguments'));
|
| }
|
|
|
| + Element getGetObjectIsSubtype() {
|
| + return compiler.findHelper(const SourceString('objectIsSubtype'));
|
| + }
|
| +
|
| Element getThrowNoSuchMethod() {
|
| return compiler.findHelper(const SourceString('throwNoSuchMethod'));
|
| }
|
|
|