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

Unified Diff: pkg/compiler/lib/src/ssa/builder_kernel.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_kernel.dart
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
index d978338f5ea3b9a04ef3b261c0b045f16cec3aad..892cf0f2e9bcb31c7b202c6ffeae96378926c9da 100644
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -1863,10 +1863,11 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
HInstruction argumentInstruction = pop();
if (argumentInstruction is HConstant) {
ConstantValue argumentConstant = argumentInstruction.constant;
- if (argumentConstant is TypeConstantValue) {
+ if (argumentConstant is TypeConstantValue &&
+ argumentConstant.representedType is ResolutionInterfaceType) {
+ ResolutionInterfaceType type = argumentConstant.representedType;
// TODO(sra): Check that type is a subclass of [Interceptor].
- ConstantValue constant =
- new InterceptorConstantValue(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