| OLD | NEW |
| 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 '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common/resolution.dart'; | 8 import '../common/resolution.dart'; |
| 9 import '../constants/expressions.dart'; | 9 import '../constants/expressions.dart'; |
| 10 import '../dart_types.dart'; | 10 import '../dart_types.dart'; |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 LabelDefinitionX labelDefinition = | 580 LabelDefinitionX labelDefinition = |
| 581 new LabelDefinitionX(label, labelName, target); | 581 new LabelDefinitionX(label, labelName, target); |
| 582 labelDefinition.isBreakTarget = decoder.getBool(Key.IS_BREAK_TARGET); | 582 labelDefinition.isBreakTarget = decoder.getBool(Key.IS_BREAK_TARGET); |
| 583 labelDefinition.isContinueTarget = | 583 labelDefinition.isContinueTarget = |
| 584 decoder.getBool(Key.IS_CONTINUE_TARGET); | 584 decoder.getBool(Key.IS_CONTINUE_TARGET); |
| 585 labelDefinitions.add(labelDefinition); | 585 labelDefinitions.add(labelDefinition); |
| 586 } | 586 } |
| 587 } | 587 } |
| 588 jumpTargetLabels.forEach((JumpTargetX jumpTarget, List<int> labelIds) { | 588 jumpTargetLabels.forEach((JumpTargetX jumpTarget, List<int> labelIds) { |
| 589 if (labelIds.isEmpty) return; | 589 if (labelIds.isEmpty) return; |
| 590 LinkBuilder<LabelDefinition> linkBuilder = | 590 List<LabelDefinition> labels = <LabelDefinition>[]; |
| 591 new LinkBuilder<LabelDefinition>(); | |
| 592 for (int labelId in labelIds) { | 591 for (int labelId in labelIds) { |
| 593 linkBuilder.addLast(labelDefinitions[labelId]); | 592 labels.add(labelDefinitions[labelId]); |
| 594 } | 593 } |
| 595 jumpTarget.labels = linkBuilder.toLink(); | 594 jumpTarget.labels = labels; |
| 596 }); | 595 }); |
| 597 | 596 |
| 598 ListDecoder dataDecoder = objectDecoder.getList(Key.DATA, isOptional: true); | 597 ListDecoder dataDecoder = objectDecoder.getList(Key.DATA, isOptional: true); |
| 599 if (dataDecoder != null) { | 598 if (dataDecoder != null) { |
| 600 for (int i = 0; i < dataDecoder.length; i++) { | 599 for (int i = 0; i < dataDecoder.length; i++) { |
| 601 ObjectDecoder objectDecoder = dataDecoder.getObject(i); | 600 ObjectDecoder objectDecoder = dataDecoder.getObject(i); |
| 602 int id = objectDecoder.getInt(Key.ID); | 601 int id = objectDecoder.getInt(Key.ID); |
| 603 Node node = nodeList[id]; | 602 Node node = nodeList[id]; |
| 604 Element nodeElement = deserializeElementReference( | 603 Element nodeElement = deserializeElementReference( |
| 605 element, Key.ELEMENT, Key.NAME, objectDecoder, | 604 element, Key.ELEMENT, Key.NAME, objectDecoder, |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 } | 686 } |
| 688 } | 687 } |
| 689 } | 688 } |
| 690 element.resolvedAst = | 689 element.resolvedAst = |
| 691 new ParsedResolvedAst(element, root, body, elements, uri); | 690 new ParsedResolvedAst(element, root, body, elements, uri); |
| 692 } | 691 } |
| 693 } | 692 } |
| 694 | 693 |
| 695 const Key PARAMETER_NODE = const Key('parameter.node'); | 694 const Key PARAMETER_NODE = const Key('parameter.node'); |
| 696 const Key PARAMETER_INITIALIZER = const Key('parameter.initializer'); | 695 const Key PARAMETER_INITIALIZER = const Key('parameter.initializer'); |
| OLD | NEW |