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

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

Issue 2975433002: Assert that we don't mix K and J elements (Closed)
Patch Set: Updated cf. comments 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_kernel.dart
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
index aabd3d171048235173e24b1c8b131d1f15d4942b..670ff42a7c8f0cdc6e27678dca2295022a33f227 100644
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -292,7 +292,7 @@ class KernelSsaGraphBuilder extends ir.Visitor
});
// Create the runtime type information, if needed.
- bool hasRtiInput = backend.rtiNeed.classNeedsRtiField(cls);
+ bool hasRtiInput = closedWorld.rtiNeed.classNeedsRtiField(cls);
if (hasRtiInput) {
// Read the values of the type arguments and create a HTypeInfoExpression
// to set on the newly create object.
@@ -357,7 +357,8 @@ class KernelSsaGraphBuilder extends ir.Visitor
// Pass type arguments.
ir.Class currentClass = body.enclosingClass;
- if (backend.rtiNeed.classNeedsRti(_elementMap.getClass(currentClass))) {
+ if (closedWorld.rtiNeed
+ .classNeedsRti(_elementMap.getClass(currentClass))) {
for (ir.DartType typeParameter in currentClass.thisType.typeArguments) {
HInstruction argument = localsHandler.readLocal(localsHandler
.getTypeVariableAsLocal(_elementMap.getDartType(typeParameter)
@@ -2387,7 +2388,7 @@ class KernelSsaGraphBuilder extends ir.Visitor
// Factory constructors take type parameters; other static methods ignore
// them.
- if (backend.rtiNeed.classNeedsRti(function.enclosingClass)) {
+ if (closedWorld.rtiNeed.classNeedsRti(function.enclosingClass)) {
_addTypeArguments(arguments, invocation.arguments);
}
}
@@ -3065,7 +3066,7 @@ class KernelSsaGraphBuilder extends ir.Visitor
_visitArgumentsForStaticTarget(target.function, invocation.arguments);
ConstructorEntity constructor = _elementMap.getConstructor(target);
ClassEntity cls = constructor.enclosingClass;
- if (backend.rtiNeed.classNeedsRti(cls)) {
+ if (closedWorld.rtiNeed.classNeedsRti(cls)) {
_addTypeArguments(arguments, invocation.arguments);
}
TypeMask typeMask = new TypeMask.nonNullExact(cls, closedWorld);
« no previous file with comments | « pkg/compiler/lib/src/resolution/resolution_strategy.dart ('k') | pkg/compiler/lib/src/ssa/graph_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698