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

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

Issue 2876813002: Implement generalized function types. (Closed)
Patch Set: Fixes for analyzer and dart2js. Created 3 years, 7 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 '../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 '../elements/resolution_types.dart'; 10 import '../elements/resolution_types.dart';
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 if (getOrSetOffset != null) { 529 if (getOrSetOffset != null) {
530 getOrSet = findTokenInStream(beginToken, getOrSetOffset); 530 getOrSet = findTokenInStream(beginToken, getOrSetOffset);
531 if (getOrSet == null) { 531 if (getOrSet == null) {
532 reporter.internalError( 532 reporter.internalError(
533 element, 533 element,
534 "No token found for $element in " 534 "No token found for $element in "
535 "${uri} @ $getOrSetOffset"); 535 "${uri} @ $getOrSetOffset");
536 } 536 }
537 } 537 }
538 return doParse((parser) { 538 return doParse((parser) {
539 parser.parseFunction(beginToken, getOrSet); 539 parser.parseMember(beginToken);
540 }); 540 });
541 } 541 }
542 } 542 }
543 543
544 AstKind kind = objectDecoder.getEnum(Key.SUB_KIND, AstKind.values); 544 AstKind kind = objectDecoder.getEnum(Key.SUB_KIND, AstKind.values);
545 Node root = computeNode(kind); 545 Node root = computeNode(kind);
546 TreeElementMapping elements = new TreeElementMapping(element); 546 TreeElementMapping elements = new TreeElementMapping(element);
547 AstIndexComputer indexComputer = new AstIndexComputer(); 547 AstIndexComputer indexComputer = new AstIndexComputer();
548 List<Node> nodeList = indexComputer.nodeList; 548 List<Node> nodeList = indexComputer.nodeList;
549 root.accept(indexComputer); 549 root.accept(indexComputer);
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 } 699 }
700 } 700 }
701 } 701 }
702 element.resolvedAst = 702 element.resolvedAst =
703 new ParsedResolvedAst(element, root, body, elements, uri); 703 new ParsedResolvedAst(element, root, body, elements, uri);
704 } 704 }
705 } 705 }
706 706
707 const Key PARAMETER_NODE = const Key('parameter.node'); 707 const Key PARAMETER_NODE = const Key('parameter.node');
708 const Key PARAMETER_INITIALIZER = const Key('parameter.initializer'); 708 const Key PARAMETER_INITIALIZER = const Key('parameter.initializer');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698