Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart

Issue 2620023002: Use elements/types in constants/values (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart
diff --git a/pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart b/pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart
index a6255d337a9c965083148111cddf8117f57128e4..8cbea7772e82008d98c30982a5658416d438fb49 100644
--- a/pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart
@@ -361,9 +361,10 @@ class InterceptorStubGenerator {
List<ConstantValue> constants =
handler.getConstantsForEmission(emitter.compareConstants);
for (ConstantValue constant in constants) {
- if (constant is TypeConstantValue) {
- TypeConstantValue typeConstant = constant;
- Element element = typeConstant.representedType.element;
+ if (constant is TypeConstantValue &&
+ constant.representedType is ResolutionInterfaceType) {
+ ResolutionInterfaceType type = constant.representedType;
+ Element element = type.element;
if (element is ClassElement) {
ClassElement classElement = element;
if (!analysis.needsClass(classElement)) continue;

Powered by Google App Engine
This is Rietveld 408576698