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

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

Issue 1099953004: In constant evaluation, handle final vars initialized at declaration site. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 | Annotate | Revision Log
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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.element; 8 library engine.element;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 1508 matching lines...) Expand 10 before | Expand all | Expand 10 after
1519 safelyVisitChildren(_accessors, visitor); 1519 safelyVisitChildren(_accessors, visitor);
1520 safelyVisitChildren(_enums, visitor); 1520 safelyVisitChildren(_enums, visitor);
1521 safelyVisitChildren(_functions, visitor); 1521 safelyVisitChildren(_functions, visitor);
1522 safelyVisitChildren(_typeAliases, visitor); 1522 safelyVisitChildren(_typeAliases, visitor);
1523 safelyVisitChildren(_types, visitor); 1523 safelyVisitChildren(_types, visitor);
1524 safelyVisitChildren(_variables, visitor); 1524 safelyVisitChildren(_variables, visitor);
1525 } 1525 }
1526 } 1526 }
1527 1527
1528 /** 1528 /**
1529 * A [FieldElement] for a 'const' field that has an initializer. 1529 * A [FieldElement] for a 'const' or 'final' field that has an initializer.
1530 *
1531 * TODO(paulberry): we should rename this class to reflect the fact that it's
1532 * used for both const and final fields. However, we shouldn't do so until
1533 * we've created an API for reading the values of constants; until that API is
1534 * available, clients are likely to read constant values by casting to
1535 * ConstFieldElementImpl, so it would be a breaking change to rename this
1536 * class.
1530 */ 1537 */
1531 class ConstFieldElementImpl extends FieldElementImpl with ConstVariableElement { 1538 class ConstFieldElementImpl extends FieldElementImpl with ConstVariableElement {
1532 /** 1539 /**
1533 * The result of evaluating this variable's initializer. 1540 * The result of evaluating this variable's initializer.
1534 */ 1541 */
1535 EvaluationResultImpl _result; 1542 EvaluationResultImpl _result;
1536 1543
1537 /** 1544 /**
1538 * Initialize a newly created field element to have the given [name]. 1545 * Initialize a newly created field element to have the given [name].
1539 */ 1546 */
(...skipping 8787 matching lines...) Expand 10 before | Expand all | Expand 10 after
10327 10334
10328 @override 10335 @override
10329 void visitElement(Element element) { 10336 void visitElement(Element element) {
10330 int offset = element.nameOffset; 10337 int offset = element.nameOffset;
10331 if (offset != -1) { 10338 if (offset != -1) {
10332 map[offset] = element; 10339 map[offset] = element;
10333 } 10340 }
10334 super.visitElement(element); 10341 super.visitElement(element);
10335 } 10342 }
10336 } 10343 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698