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

Unified Diff: frog/gen.dart

Issue 9666031: Frog: preserve initialization order. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: status Created 8 years, 9 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 | frog/minfrog » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/gen.dart
diff --git a/frog/gen.dart b/frog/gen.dart
index b5b2c7d6d70312c2ea7cfc6f296b220199665f28..f37a1912b116480f81ce7a70c766fab073e08eb5 100644
--- a/frog/gen.dart
+++ b/frog/gen.dart
@@ -1066,10 +1066,12 @@ class MethodGenerator implements TreeVisitor, CallingContext {
if (method.isConstructor && newObject is ObjectValue) {
var fields = newObject.dynamic.fields;
- for (var field in fields.getKeys()) {
- var value = fields[field];
- if (value !== null) {
- writer.writeln('this.${field.jsname} = ${value.code};');
+ for (var field in newObject.dynamic.fieldsInInitOrder) {
+ if (field !== null) {
+ var value = fields[field];
+ if (value !== null) {
+ writer.writeln('this.${field.jsname} = ${value.code};');
+ }
}
}
}
« no previous file with comments | « no previous file | frog/minfrog » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698