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

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

Issue 2653633002: Further improve precision of the type of node that hold type inference data. (Closed)
Patch Set: dartfmt 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ff152319f8de407862507eb536109543e3aa0887..115ec2d82fab70cbda4583d299e92d044970ed19 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -5232,16 +5232,20 @@ class SsaBuilder extends ast.Visitor
instruction = setRtiIfNeeded(instruction, node);
}
- TypeMask type = _inferredTypeOfNewList(node);
+ TypeMask type = _inferredTypeOfListLiteral(node);
if (!type.containsAll(closedWorld)) {
instruction.instructionType = type;
}
stack.add(instruction);
}
- _inferredTypeOfNewList(ast.Node node) =>
+ _inferredTypeOfNewList(ast.Send node) =>
_resultOf(sourceElement).typeOfNewList(node) ?? commonMasks.dynamicType;
+ _inferredTypeOfListLiteral(ast.LiteralList node) =>
+ _resultOf(sourceElement).typeOfListLiteral(node) ??
+ commonMasks.dynamicType;
+
visitConditional(ast.Conditional node) {
SsaBranchBuilder brancher = new SsaBranchBuilder(this, compiler, node);
brancher.handleConditional(() => visit(node.condition),
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698