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

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

Issue 1115993005: Clone AST nodes of default formal parameters prior to constant evaluation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | 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 2047 matching lines...) Expand 10 before | Expand all | Expand 10 after
2058 * to work when the argument types are type variables. 2058 * to work when the argument types are type variables.
2059 */ 2059 */
2060 DartType substitute2( 2060 DartType substitute2(
2061 List<DartType> argumentTypes, List<DartType> parameterTypes); 2061 List<DartType> argumentTypes, List<DartType> parameterTypes);
2062 } 2062 }
2063 2063
2064 /** 2064 /**
2065 * A [FieldFormalParameterElementImpl] for parameters that have an initializer. 2065 * A [FieldFormalParameterElementImpl] for parameters that have an initializer.
2066 */ 2066 */
2067 class DefaultFieldFormalParameterElementImpl 2067 class DefaultFieldFormalParameterElementImpl
2068 extends FieldFormalParameterElementImpl { 2068 extends FieldFormalParameterElementImpl with ConstVariableElement {
Brian Wilkerson 2015/05/05 22:43:02 I can't check the code right now, but if "ConstVar
Paul Berry 2015/05/06 15:35:14 They're not instantiated directly, but they're use
Brian Wilkerson 2015/05/06 15:46:06 Given that ConstVariableElement and PotentiallyCon
2069 /** 2069 /**
2070 * The result of evaluating this variable's initializer. 2070 * The result of evaluating this variable's initializer.
2071 */ 2071 */
2072 EvaluationResultImpl _result; 2072 EvaluationResultImpl _result;
2073 2073
2074 /** 2074 /**
2075 * Initialize a newly created parameter element to have the given [name]. 2075 * Initialize a newly created parameter element to have the given [name].
2076 */ 2076 */
2077 DefaultFieldFormalParameterElementImpl(Identifier name) : super(name); 2077 DefaultFieldFormalParameterElementImpl(Identifier name) : super(name);
2078 2078
2079 @override 2079 @override
2080 EvaluationResultImpl get evaluationResult => _result; 2080 EvaluationResultImpl get evaluationResult => _result;
2081 2081
2082 @override 2082 @override
2083 void set evaluationResult(EvaluationResultImpl result) { 2083 void set evaluationResult(EvaluationResultImpl result) {
2084 this._result = result; 2084 this._result = result;
2085 } 2085 }
2086 } 2086 }
2087 2087
2088 /** 2088 /**
2089 * A [ParameterElement] for parameters that have an initializer. 2089 * A [ParameterElement] for parameters that have an initializer.
2090 */ 2090 */
2091 class DefaultParameterElementImpl extends ParameterElementImpl { 2091 class DefaultParameterElementImpl extends ParameterElementImpl
2092 with ConstVariableElement {
2092 /** 2093 /**
2093 * The result of evaluating this variable's initializer. 2094 * The result of evaluating this variable's initializer.
2094 */ 2095 */
2095 EvaluationResultImpl _result; 2096 EvaluationResultImpl _result;
2096 2097
2097 /** 2098 /**
2098 * Initialize a newly created parameter element to have the given [name]. 2099 * Initialize a newly created parameter element to have the given [name].
2099 */ 2100 */
2100 DefaultParameterElementImpl(Identifier name) : super.forNode(name); 2101 DefaultParameterElementImpl(Identifier name) : super.forNode(name);
2101 2102
(...skipping 6234 matching lines...) Expand 10 before | Expand all | Expand 10 after
8336 * A parameter will only define other parameters if it is a function typed 8337 * A parameter will only define other parameters if it is a function typed
8337 * parameter. 8338 * parameter.
8338 */ 8339 */
8339 List<ParameterElement> get parameters; 8340 List<ParameterElement> get parameters;
8340 } 8341 }
8341 8342
8342 /** 8343 /**
8343 * A concrete implementation of a [ParameterElement]. 8344 * A concrete implementation of a [ParameterElement].
8344 */ 8345 */
8345 class ParameterElementImpl extends VariableElementImpl 8346 class ParameterElementImpl extends VariableElementImpl
8346 implements ParameterElement { 8347 with PotentiallyConstVariableElement implements ParameterElement {
8347 /** 8348 /**
8348 * An empty list of parameter elements. 8349 * An empty list of parameter elements.
8349 */ 8350 */
8350 @deprecated // Use ParameterElement.EMPTY_LIST 8351 @deprecated // Use ParameterElement.EMPTY_LIST
8351 static const List<ParameterElement> EMPTY_ARRAY = const <ParameterElement>[]; 8352 static const List<ParameterElement> EMPTY_ARRAY = const <ParameterElement>[];
8352 8353
8353 /** 8354 /**
8354 * A list containing all of the parameters defined by this parameter element. 8355 * A list containing all of the parameters defined by this parameter element.
8355 * There will only be parameters if this parameter is a function typed 8356 * There will only be parameters if this parameter is a function typed
8356 * parameter. 8357 * parameter.
(...skipping 2000 matching lines...) Expand 10 before | Expand all | Expand 10 after
10357 10358
10358 @override 10359 @override
10359 void visitElement(Element element) { 10360 void visitElement(Element element) {
10360 int offset = element.nameOffset; 10361 int offset = element.nameOffset;
10361 if (offset != -1) { 10362 if (offset != -1) {
10362 map[offset] = element; 10363 map[offset] = element;
10363 } 10364 }
10364 super.visitElement(element); 10365 super.visitElement(element);
10365 } 10366 }
10366 } 10367 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/constant.dart ('k') | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698