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

Unified Diff: pkg/compiler/lib/src/ssa/optimize.dart

Issue 3010943002: Add ability to look up type parameters that are associated with ClassEntities with the element envi… (Closed)
Patch Set: Created 3 years, 3 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/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)) {

Powered by Google App Engine
This is Rietveld 408576698