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

Side by Side Diff: pkg/analyzer/lib/src/summary/resynthesize.dart

Issue 1678753002: Summarize constructor initializers. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Updates for review comments. 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 summary_resynthesizer; 5 library summary_resynthesizer;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/element/element.dart'; 10 import 'package:analyzer/dart/element/element.dart';
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 case UnlinkedConstOperation.invokeConstructor: 425 case UnlinkedConstOperation.invokeConstructor:
426 _pushInstanceCreation(); 426 _pushInstanceCreation();
427 break; 427 break;
428 case UnlinkedConstOperation.length: 428 case UnlinkedConstOperation.length:
429 Expression target = _pop(); 429 Expression target = _pop();
430 SimpleIdentifier property = AstFactory.identifier3('length'); 430 SimpleIdentifier property = AstFactory.identifier3('length');
431 property.staticElement = 431 property.staticElement =
432 resynthesizer._buildStringLengthPropertyAccessorElement(); 432 resynthesizer._buildStringLengthPropertyAccessorElement();
433 _push(AstFactory.propertyAccess(target, property)); 433 _push(AstFactory.propertyAccess(target, property));
434 break; 434 break;
435 case UnlinkedConstOperation.pushConstructorParameter:
436 // TODO(scheglov) implement
437 throw new UnimplementedError('$operation');
438 break;
435 } 439 }
436 } 440 }
437 return stack.single; 441 return stack.single;
438 } 442 }
439 443
440 TypeName _buildTypeAst(DartType type) { 444 TypeName _buildTypeAst(DartType type) {
441 if (type is DynamicTypeImpl) { 445 if (type is DynamicTypeImpl) {
442 TypeName node = AstFactory.typeName4('dynamic'); 446 TypeName node = AstFactory.typeName4('dynamic');
443 node.type = type; 447 node.type = type;
444 (node.name as SimpleIdentifier).staticElement = type.element; 448 (node.name as SimpleIdentifier).staticElement = type.element;
(...skipping 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after
1930 } 1934 }
1931 : () => this.element; 1935 : () => this.element;
1932 // TODO(paulberry): Is it a bug that we have to pass `false` for 1936 // TODO(paulberry): Is it a bug that we have to pass `false` for
1933 // isInstantiated? 1937 // isInstantiated?
1934 return new DeferredFunctionTypeImpl(computer, null, typeArguments, false); 1938 return new DeferredFunctionTypeImpl(computer, null, typeArguments, false);
1935 } else { 1939 } else {
1936 return null; 1940 return null;
1937 } 1941 }
1938 } 1942 }
1939 } 1943 }
OLDNEW
« 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