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 '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 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 | 573 |
574 ListDecoder jumpTargetsDecoder = | 574 ListDecoder jumpTargetsDecoder = |
575 objectDecoder.getList(Key.JUMP_TARGETS, isOptional: true); | 575 objectDecoder.getList(Key.JUMP_TARGETS, isOptional: true); |
576 if (jumpTargetsDecoder != null) { | 576 if (jumpTargetsDecoder != null) { |
577 for (int i = 0; i < jumpTargetsDecoder.length; i++) { | 577 for (int i = 0; i < jumpTargetsDecoder.length; i++) { |
578 ObjectDecoder decoder = jumpTargetsDecoder.getObject(i); | 578 ObjectDecoder decoder = jumpTargetsDecoder.getObject(i); |
579 ExecutableElement executableContext = | 579 ExecutableElement executableContext = |
580 decoder.getElement(Key.EXECUTABLE_CONTEXT); | 580 decoder.getElement(Key.EXECUTABLE_CONTEXT); |
581 Node statement = nodeList[decoder.getInt(Key.NODE)]; | 581 Node statement = nodeList[decoder.getInt(Key.NODE)]; |
582 int nestingLevel = decoder.getInt(Key.NESTING_LEVEL); | 582 int nestingLevel = decoder.getInt(Key.NESTING_LEVEL); |
583 JumpTarget jumpTarget = | 583 JumpTargetX jumpTarget = |
584 new JumpTargetX(statement, nestingLevel, executableContext); | 584 new JumpTargetX(statement, nestingLevel, executableContext); |
585 jumpTarget.isBreakTarget = decoder.getBool(Key.IS_BREAK_TARGET); | 585 jumpTarget.isBreakTarget = decoder.getBool(Key.IS_BREAK_TARGET); |
586 jumpTarget.isContinueTarget = decoder.getBool(Key.IS_CONTINUE_TARGET); | 586 jumpTarget.isContinueTarget = decoder.getBool(Key.IS_CONTINUE_TARGET); |
587 jumpTargetLabels[jumpTarget] = | 587 jumpTargetLabels[jumpTarget] = |
588 decoder.getInts(Key.LABELS, isOptional: true); | 588 decoder.getInts(Key.LABELS, isOptional: true); |
589 jumpTargets.add(jumpTarget); | 589 jumpTargets.add(jumpTarget); |
590 } | 590 } |
591 } | 591 } |
592 | 592 |
593 ListDecoder labelDefinitionsDecoder = | 593 ListDecoder labelDefinitionsDecoder = |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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'); |
OLD | NEW |