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

Unified Diff: pkg/compiler/lib/src/ssa/builder.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/ssa/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 8fe59bd9ac6517c84bb778e7b816720c3ae1dc71..1300788902c3bf049d3307d4cb25d4947c03f704 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -1358,8 +1358,7 @@ class SsaBuilder extends ast.Visitor
List bodyCallInputs = <HInstruction>[];
if (isNativeUpgradeFactory) {
if (interceptor == null) {
- ConstantValue constant =
- new InterceptorConstantValue(classElement.thisType);
+ ConstantValue constant = new InterceptorConstantValue(classElement);
interceptor = graph.addConstant(constant, closedWorld);
}
bodyCallInputs.add(interceptor);
@@ -2902,9 +2901,10 @@ class SsaBuilder extends ast.Visitor
HInstruction argumentInstruction = pop();
if (argumentInstruction is HConstant) {
ConstantValue argumentConstant = argumentInstruction.constant;
- if (argumentConstant is TypeConstantValue) {
- ConstantValue constant =
- new InterceptorConstantValue(argumentConstant.representedType);
+ if (argumentConstant is TypeConstantValue &&
+ argumentConstant.representedType is ResolutionInterfaceType) {
+ ResolutionInterfaceType type = argumentConstant.representedType;
+ ConstantValue constant = new InterceptorConstantValue(type.element);
HInstruction instruction = graph.addConstant(constant, closedWorld);
stack.add(instruction);
return;

Powered by Google App Engine
This is Rietveld 408576698