Index: pkg/compiler/lib/src/common/codegen.dart |
diff --git a/pkg/compiler/lib/src/common/codegen.dart b/pkg/compiler/lib/src/common/codegen.dart |
index e6bf624ca826344195a15e1c4f7baf2913f2cd2e..00b49253ea2e503d2e39491961a18c8b021b4702 100644 |
--- a/pkg/compiler/lib/src/common/codegen.dart |
+++ b/pkg/compiler/lib/src/common/codegen.dart |
@@ -4,7 +4,8 @@ |
library dart2js.common.codegen; |
-import '../elements/elements.dart' show ClassElement, LocalFunctionElement; |
+import '../common_elements.dart'; |
+import '../elements/elements.dart' show LocalFunctionElement; |
import '../elements/entities.dart'; |
import '../elements/types.dart' show DartType, InterfaceType; |
import '../universe/use.dart' show ConstantUse, DynamicUse, StaticUse, TypeUse; |
@@ -109,10 +110,11 @@ class _CodegenImpact extends WorldImpactBuilderImpl implements CodegenImpact { |
// TODO(johnniwinther): Split this class into interface and implementation. |
// TODO(johnniwinther): Move this implementation to the JS backend. |
class CodegenRegistry { |
+ final ElementEnvironment _elementEnvironment; |
final MemberEntity currentElement; |
final _CodegenImpact worldImpact; |
- CodegenRegistry(this.currentElement) |
+ CodegenRegistry(this._elementEnvironment, this.currentElement) |
: this.worldImpact = new _CodegenImpact(); |
bool get isForResolution => false; |
@@ -120,8 +122,8 @@ class CodegenRegistry { |
String toString() => 'CodegenRegistry for $currentElement'; |
@deprecated |
- void registerInstantiatedClass(ClassElement element) { |
- registerInstantiation(element.rawType); |
+ void registerInstantiatedClass(ClassEntity element) { |
+ registerInstantiation(_elementEnvironment.getRawType(element)); |
} |
void registerStaticUse(StaticUse staticUse) { |