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

Side by Side Diff: pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart

Issue 3009463002: Handle labelled continue statements (Closed)
Patch Set: Updated cf. comments Created 3 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.serialization.resolved_ast; 5 library dart2js.serialization.resolved_ast;
6 6
7 import 'package:front_end/src/fasta/parser.dart' show Parser, ParserError; 7 import 'package:front_end/src/fasta/parser.dart' show Parser, ParserError;
8 import 'package:front_end/src/fasta/scanner.dart'; 8 import 'package:front_end/src/fasta/scanner.dart';
9 9
10 import '../common.dart'; 10 import '../common.dart';
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 List<int> labelIdList = <int>[]; 202 List<int> labelIdList = <int>[];
203 for (LabelDefinition label in jumpTarget.labels) { 203 for (LabelDefinition label in jumpTarget.labels) {
204 labelIdList.add(getLabelDefinitionId(label)); 204 labelIdList.add(getLabelDefinitionId(label));
205 } 205 }
206 encoder.setInts(Key.LABELS, labelIdList); 206 encoder.setInts(Key.LABELS, labelIdList);
207 } 207 }
208 } 208 }
209 209
210 /// Serialize [label] into [encoder]. 210 /// Serialize [label] into [encoder].
211 void serializeLabelDefinition( 211 void serializeLabelDefinition(
212 LabelDefinition labelDefinition, ObjectEncoder encoder) { 212 LabelDefinitionX labelDefinition, ObjectEncoder encoder) {
213 encoder.setInt(Key.NODE, nodeIndices[labelDefinition.label]); 213 encoder.setInt(Key.NODE, nodeIndices[labelDefinition.label]);
214 encoder.setString(Key.NAME, labelDefinition.labelName); 214 encoder.setString(Key.NAME, labelDefinition.labelName);
215 encoder.setBool(Key.IS_BREAK_TARGET, labelDefinition.isBreakTarget); 215 encoder.setBool(Key.IS_BREAK_TARGET, labelDefinition.isBreakTarget);
216 encoder.setBool(Key.IS_CONTINUE_TARGET, labelDefinition.isContinueTarget); 216 encoder.setBool(Key.IS_CONTINUE_TARGET, labelDefinition.isContinueTarget);
217 encoder.setInt(Key.JUMP_TARGET, getJumpTargetId(labelDefinition.target)); 217 encoder.setInt(Key.JUMP_TARGET, getJumpTargetId(labelDefinition.target));
218 } 218 }
219 219
220 /// Computes the [ListEncoder] for serializing data for nodes. 220 /// Computes the [ListEncoder] for serializing data for nodes.
221 ListEncoder get nodeDataEncoder { 221 ListEncoder get nodeDataEncoder {
222 if (_nodeDataEncoder == null) { 222 if (_nodeDataEncoder == null) {
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 } 709 }
710 } 710 }
711 } 711 }
712 element.resolvedAst = 712 element.resolvedAst =
713 new ParsedResolvedAst(element, root, body, elements, uri); 713 new ParsedResolvedAst(element, root, body, elements, uri);
714 } 714 }
715 } 715 }
716 716
717 const Key PARAMETER_NODE = const Key('parameter.node'); 717 const Key PARAMETER_NODE = const Key('parameter.node');
718 const Key PARAMETER_INITIALIZER = const Key('parameter.initializer'); 718 const Key PARAMETER_INITIALIZER = const Key('parameter.initializer');
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/serialization/equivalence.dart ('k') | pkg/compiler/lib/src/ssa/jump_handler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698