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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/builder.dart

Issue 17028011: Implement a list tracer phase, that tries to find element types in individual lists. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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: sdk/lib/_internal/compiler/implementation/ssa/builder.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/builder.dart (revision 24023)
+++ sdk/lib/_internal/compiler/implementation/ssa/builder.dart (working copy)
@@ -3340,11 +3340,15 @@
if (Elements.isFixedListConstructorCall(
originalElement, send, compiler)) {
isListConstructor = true;
- return backend.fixedArrayType;
+ HType inferred =
+ new HType.inferredForNode(currentElement, node, compiler);
+ return inferred.isUnknown() ? backend.fixedArrayType : inferred;
} else if (Elements.isGrowableListConstructorCall(
originalElement, send, compiler)) {
isListConstructor = true;
- return backend.extendableArrayType;
+ HType inferred =
+ new HType.inferredForNode(currentElement, node, compiler);
+ return inferred.isUnknown() ? backend.extendableArrayType : inferred;
} else if (element.isGenerativeConstructor()) {
ClassElement cls = element.getEnclosingClass();
return new HType.nonNullExact(cls.thisType, compiler);
@@ -4102,7 +4106,10 @@
visit(link.head);
inputs.add(pop());
}
- push(buildLiteralList(inputs));
+ HInstruction instruction = buildLiteralList(inputs);
+ HType type = new HType.inferredForNode(currentElement, node, compiler);
+ if (!type.isUnknown()) instruction.instructionType = type;
+ push(instruction);
}
visitConditional(Conditional node) {

Powered by Google App Engine
This is Rietveld 408576698