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

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

Issue 2974223002: Support is tests (Closed)
Patch Set: Cleanup Created 3 years, 5 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/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 91be5bd500ed0c979120958799a747e22c718374..bced3688757b1b19b1c2cf527644cfe670609b2b 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -256,7 +256,7 @@ class SsaAstGraphBuilder extends ast.Visitor
closedWorld.nativeData,
closedWorld.interceptorData);
loopHandler = new SsaLoopHandler(this);
- typeBuilder = new TypeBuilder(this);
+ typeBuilder = new TypeBuilderImpl(this);
}
MemberElement get targetElement => target;
@@ -2469,8 +2469,9 @@ class SsaAstGraphBuilder extends ast.Visitor
HInstruction call = pop();
return new HIs.compound(type, expression, call, commonMasks.boolType);
} else if (type.isTypeVariable) {
+ ResolutionTypeVariableType typeVariable = type;
HInstruction runtimeType =
- typeBuilder.addTypeVariableReference(type, sourceElement);
+ typeBuilder.addTypeVariableReference(typeVariable, sourceElement);
MethodElement helper = commonElements.checkSubtypeOfRuntimeType;
List<HInstruction> inputs = <HInstruction>[expression, runtimeType];
pushInvokeStatic(null, helper, inputs, typeMask: commonMasks.boolType);
@@ -6852,3 +6853,12 @@ class AstInliningState extends InliningState {
this.oldElementInferenceResults)
: super(function);
}
+
+class TypeBuilderImpl extends TypeBuilder {
+ TypeBuilderImpl(GraphBuilder builder) : super(builder);
+
+ @override
+ InterfaceType getThisType(covariant ClassElement cls) {
+ return cls.thisType;
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698