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

Unified Diff: pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart

Issue 2948773002: Rename "field" -> "accessor" in several type inference methods. (Closed)
Patch Set: Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/front_end/lib/src/fasta/type_inference/type_inference_listener.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
index 11e8bb3d222c6db8f2742592e8bfb741a206d80a..e6b316deb0ee62af509710e3d81e372a87e95cd2 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
@@ -223,10 +223,10 @@ abstract class TypeInferrerImpl extends TypeInferrer {
final InterfaceType thisType;
- /// The [FieldNode] whose initializer will be type inferred using this
+ /// The [AccessorNode] whose type will be type inferred using this
/// [TypeInferrerImpl], or `null` if this [TypeInferrerImpl] will be used to
- /// infer types outside the scope of a field initializer.
- final FieldNode fieldNode;
+ /// infer types outside the scope of top level type inference.
+ final AccessorNode accessorNode;
/// Context information for the current closure, or `null` if we are not
/// inside a closure.
@@ -238,10 +238,10 @@ abstract class TypeInferrerImpl extends TypeInferrer {
/// Not used when performing local inference.
bool isImmediatelyEvident = true;
- List<FieldNode> _dryRunDependencies;
+ List<AccessorNode> _dryRunDependencies;
TypeInferrerImpl(this.engine, this.uri, this.listener, bool topLevel,
- this.thisType, this.fieldNode)
+ this.thisType, this.accessorNode)
: coreTypes = engine.coreTypes,
strongMode = engine.strongMode,
classHierarchy = engine.classHierarchy,
@@ -351,7 +351,7 @@ abstract class TypeInferrerImpl extends TypeInferrer {
/// Ends a dry run started by [startDryRun] and returns the collected
/// dependencies.
- List<FieldNode> finishDryRun() {
+ List<AccessorNode> finishDryRun() {
var dryRunDependencies = _dryRunDependencies;
_dryRunDependencies = null;
return dryRunDependencies;
@@ -648,9 +648,9 @@ abstract class TypeInferrerImpl extends TypeInferrer {
interfaceMember is Field)) {
if (TypeInferenceEngineImpl.fullTopLevelInference) {
if (interfaceMember is KernelField) {
- var fieldNode = KernelMember.getFieldNode(interfaceMember);
- if (fieldNode != null) {
- engine.inferFieldFused(fieldNode, this.fieldNode);
+ var accessorNode = KernelMember.getAccessorNode(interfaceMember);
+ if (accessorNode != null) {
+ engine.inferAccessorFused(accessorNode, this.accessorNode);
}
}
} else {
@@ -690,13 +690,13 @@ abstract class TypeInferrerImpl extends TypeInferrer {
/// the statement type and calls the appropriate specialized "infer" method.
void inferStatement(Statement statement);
- /// Records that the field represented by [fieldNode] is a dependency of the
- /// static field for which we are currently doing a dry run of type inference.
+ /// Records that the accessor represented by [accessorNode] is a dependency of
+ /// the accessor for which we are currently doing a dry run of type inference.
///
/// May only be called if a dry run is in progress.
- void recordDryRunDependency(FieldNode fieldNode) {
- listener.recordDependency(fieldNode);
- _dryRunDependencies.add(fieldNode);
+ void recordDryRunDependency(AccessorNode accessorNode) {
+ listener.recordDependency(accessorNode);
+ _dryRunDependencies.add(accessorNode);
}
void recordNotImmediatelyEvident(int fileOffset) {
@@ -706,10 +706,10 @@ abstract class TypeInferrerImpl extends TypeInferrer {
}
/// Begins a dry run of type inference, in which the goal is to collect the
- /// dependencies of a given field.
+ /// dependencies of a given accessor.
void startDryRun() {
assert(_dryRunDependencies == null);
- _dryRunDependencies = <FieldNode>[];
+ _dryRunDependencies = <AccessorNode>[];
}
DartType wrapFutureOrType(DartType type) {
« no previous file with comments | « pkg/front_end/lib/src/fasta/type_inference/type_inference_listener.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698