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

Unified Diff: pkg/analyzer/lib/src/summary/resynthesize.dart

Issue 1712583003: Serialize and resynthesize labels. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | « pkg/analyzer/lib/src/summary/idl.dart ('k') | pkg/analyzer/lib/src/summary/summarize_ast.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/resynthesize.dart
diff --git a/pkg/analyzer/lib/src/summary/resynthesize.dart b/pkg/analyzer/lib/src/summary/resynthesize.dart
index be97bfb0d091b1169d926c789a362dbf04581183..ed4f0da6ff2967bbecd0a6cf7750a9bf3d815fa1 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -1162,6 +1162,8 @@ class _LibraryResynthesizer {
buildAnnotations(executableElement, serializedExecutable.annotations);
executableElement.functions =
serializedExecutable.localFunctions.map(buildLocalFunction).toList();
+ executableElement.labels =
+ serializedExecutable.localLabels.map(buildLocalLabel).toList();
executableElement.localVariables =
serializedExecutable.localVariables.map(buildLocalVariable).toList();
currentTypeParameters.removeLast();
@@ -1479,6 +1481,17 @@ class _LibraryResynthesizer {
}
/**
+ * Resynthesize a [LabelElement].
+ */
+ LabelElement buildLocalLabel(UnlinkedLabel serializedLabel) {
+ return new LabelElementImpl(
+ serializedLabel.name,
+ serializedLabel.nameOffset,
+ serializedLabel.isOnSwitchStatement,
+ serializedLabel.isOnSwitchMember);
+ }
+
+ /**
* Resynthesize a [LocalVariableElement].
*/
LocalVariableElement buildLocalVariable(UnlinkedVariable serializedVariable) {
« no previous file with comments | « pkg/analyzer/lib/src/summary/idl.dart ('k') | pkg/analyzer/lib/src/summary/summarize_ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698