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

Unified Diff: lib/compiler/implementation/ssa/codegen.dart

Issue 10638013: Improve tracking of the type of fields after object construction (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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: lib/compiler/implementation/ssa/codegen.dart
diff --git a/lib/compiler/implementation/ssa/codegen.dart b/lib/compiler/implementation/ssa/codegen.dart
index 85382d96fa9aee8420ab31baf8cedf13c6cda73c..81ad82161bd254971a66c369381e174596810a63 100644
--- a/lib/compiler/implementation/ssa/codegen.dart
+++ b/lib/compiler/implementation/ssa/codegen.dart
@@ -1723,6 +1723,13 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
}
visitFieldSet(HFieldSet node) {
+ if (work.element.isGenerativeConstructorBody() &&
+ node.element.enclosingElement.isClass() &&
+ node.value.hasGuaranteedType() &&
+ node.block.dominates(currentGraph.exit)) {
ngeoffray 2012/07/09 21:17:41 We should probably have a helper method for this i
+ backend.updateFieldConstructorSetters(node.element,
+ node.value.guaranteedType);
+ }
String name = compiler.namer.getName(node.element);
beginExpression(JSPrecedence.ASSIGNMENT_PRECEDENCE);
use(node.receiver, JSPrecedence.MEMBER_PRECEDENCE);

Powered by Google App Engine
This is Rietveld 408576698