| Index: dart/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart
|
| diff --git a/dart/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart b/dart/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart
|
| index ac52424185f11ffced91faac42810a47d313674e..1f5919ae49266190fa05130c2aad056bd4a976f3 100644
|
| --- a/dart/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart
|
| +++ b/dart/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart
|
| @@ -42,6 +42,10 @@ class CodeEmitterTask extends CompilerTask {
|
| final Map<ClassElement, Map<String, jsAst.Expression>> additionalProperties =
|
| new Map<ClassElement, Map<String, jsAst.Expression>>();
|
|
|
| + /// Records if a type variable is read dynamically for type tests.
|
| + final Set<TypeVariableElement> readTypeVariables =
|
| + new Set<TypeVariableElement>();
|
| +
|
| // TODO(ngeoffray): remove this field.
|
| Set<ClassElement> instantiatedClasses;
|
|
|
| @@ -744,8 +748,10 @@ class CodeEmitterTask extends CompilerTask {
|
| }
|
|
|
| void generateClass(ClassElement classElement, ClassBuilder properties) {
|
| - classEmitter.generateClass(
|
| - classElement, properties, additionalProperties[classElement]);
|
| + compiler.withCurrentElement(classElement, () {
|
| + classEmitter.generateClass(
|
| + classElement, properties, additionalProperties[classElement]);
|
| + });
|
| }
|
|
|
| /**
|
| @@ -1592,4 +1598,8 @@ if (typeof $printHelperName === "function") {
|
| bool get areAnyElementsDeferred {
|
| return compiler.deferredLoadTask.areAnyElementsDeferred;
|
| }
|
| +
|
| + void registerReadTypeVariable(TypeVariableElement element) {
|
| + readTypeVariables.add(element);
|
| + }
|
| }
|
|
|