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

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
« no previous file with comments | « no previous file | tests/corelib_2/corelib_2.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..6e37b9ca8d4ca83c394282fa763729931b75c342 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,13 @@ 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
+ .getThisType(contextClass)
+ .typeArguments
+ .length) {
return null;
}
if (needsSubstitutionForTypeVariableAccess(contextClass)) {
« no previous file with comments | « no previous file | tests/corelib_2/corelib_2.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698