Chromium Code Reviews| Index: pkg/compiler/lib/src/ssa/optimize.dart |
| diff --git a/pkg/compiler/lib/src/ssa/optimize.dart b/pkg/compiler/lib/src/ssa/optimize.dart |
| index 22c120f65186d580e39627ea6089c82c0f3fec3f..d085978880031a8567a8d5f29147b9bf1f4fccb6 100644 |
| --- a/pkg/compiler/lib/src/ssa/optimize.dart |
| +++ b/pkg/compiler/lib/src/ssa/optimize.dart |
| @@ -9,7 +9,6 @@ import '../compiler.dart' show Compiler; |
| import '../constants/constant_system.dart'; |
| import '../constants/values.dart'; |
| import '../common_elements.dart' show CommonElements; |
| -import '../elements/elements.dart' show ClassElement; |
| import '../elements/entities.dart'; |
| import '../elements/resolution_types.dart'; |
| import '../elements/types.dart'; |
| @@ -1215,9 +1214,12 @@ class SsaInstructionSimplifier extends HBaseVisitor |
| if (nextSource is HThis) { |
| if (source == null) { |
| source = nextSource; |
| - ClassElement contextClass = |
| + ClassEntity contextClass = |
| nextSource.sourceElement.enclosingClass; |
| - if (node.inputs.length != contextClass.typeVariables.length) { |
| + if (node.inputs.length != |
| + _closedWorld.elementEnvironment |
| + .getTypeVariables(contextClass) |
| + .length) { |
|
Johnni Winther
2017/09/04 06:59:56
If we replace this by
if (node.inputs.length !=
Emily Fortuna
2017/09/05 17:13:31
ah, my mistake. I misunderstood the distinction be
|
| return null; |
| } |
| if (needsSubstitutionForTypeVariableAccess(contextClass)) { |