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

Unified Diff: pkg/kernel/lib/binary/ast_from_binary.dart

Issue 2983413002: Resynthesize constructor initializers from Kernel. (Closed)
Patch Set: 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/kernel/lib/binary/ast_from_binary.dart
diff --git a/pkg/kernel/lib/binary/ast_from_binary.dart b/pkg/kernel/lib/binary/ast_from_binary.dart
index 1e7f8762dad21bfac4914cee9da505ba20a35bdc..8a602423bcc1d715c58626d0e519b679e94adf8e 100644
--- a/pkg/kernel/lib/binary/ast_from_binary.dart
+++ b/pkg/kernel/lib/binary/ast_from_binary.dart
@@ -626,15 +626,20 @@ class BinaryBuilder {
Initializer readInitializer() {
int tag = readByte();
+ bool isSynthetic = readByte() == 1;
switch (tag) {
case Tag.InvalidInitializer:
return new InvalidInitializer();
case Tag.FieldInitializer:
- return new FieldInitializer.byReference(
- readMemberReference(), readExpression());
+ var reference = readMemberReference();
+ var value = readExpression();
+ return new FieldInitializer.byReference(reference, value)
+ ..isSynthetic = isSynthetic;
case Tag.SuperInitializer:
- return new SuperInitializer.byReference(
- readMemberReference(), readArguments());
+ var reference = readMemberReference();
+ var arguments = readArguments();
+ return new SuperInitializer.byReference(reference, arguments)
+ ..isSynthetic = isSynthetic;
case Tag.RedirectingInitializer:
return new RedirectingInitializer.byReference(
readMemberReference(), readArguments());

Powered by Google App Engine
This is Rietveld 408576698