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

Side by Side Diff: pkg/analyzer/lib/src/generated/incremental_resolver.dart

Issue 2430513004: Get rid of _inFunction in ApiElementBuilder. (Closed)
Patch Set: Created 4 years, 2 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/dart/element/builder.dart ('k') | no next file » | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 analyzer.src.generated.incremental_resolver; 5 library analyzer.src.generated.incremental_resolver;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:math' as math; 8 import 'dart:math' as math;
9 9
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 _updateEntry(); 267 _updateEntry();
268 } finally { 268 } finally {
269 logger.exit(); 269 logger.exit();
270 } 270 }
271 } 271 }
272 272
273 void _buildElements(Declaration executable, AstNode node) { 273 void _buildElements(Declaration executable, AstNode node) {
274 LoggingTimer timer = logger.startTimer(); 274 LoggingTimer timer = logger.startTimer();
275 try { 275 try {
276 ElementHolder holder = new ElementHolder(); 276 ElementHolder holder = new ElementHolder();
277 ElementBuilder builder = new ElementBuilder(holder, _definingUnit); 277 node.accept(new LocalElementBuilder(holder, _definingUnit));
278 builder.initForFunctionBodyIncrementalResolution();
279 node.accept(builder);
280 // Move local elements into the ExecutableElementImpl. 278 // Move local elements into the ExecutableElementImpl.
281 ExecutableElementImpl executableElement = 279 ExecutableElementImpl executableElement =
282 executable.element as ExecutableElementImpl; 280 executable.element as ExecutableElementImpl;
283 executableElement.localVariables = holder.localVariables; 281 executableElement.localVariables = holder.localVariables;
284 executableElement.functions = holder.functions; 282 executableElement.functions = holder.functions;
285 executableElement.labels = holder.labels; 283 executableElement.labels = holder.labels;
286 holder.validate(); 284 holder.validate();
287 } finally { 285 } finally {
288 timer.stop('build elements'); 286 timer.stop('build elements');
289 } 287 }
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 @override 1303 @override
1306 String toString() => name; 1304 String toString() => name;
1307 } 1305 }
1308 1306
1309 class _TokenPair { 1307 class _TokenPair {
1310 final _TokenDifferenceKind kind; 1308 final _TokenDifferenceKind kind;
1311 final Token oldToken; 1309 final Token oldToken;
1312 final Token newToken; 1310 final Token newToken;
1313 _TokenPair(this.kind, this.oldToken, this.newToken); 1311 _TokenPair(this.kind, this.oldToken, this.newToken);
1314 } 1312 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698