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

Unified Diff: pkg/kernel/lib/transformations/closure/mock.dart

Issue 2777883002: Remove Fasta's copy of accessors.dart. (Closed)
Patch Set: Remove type checking of Rasta, not strong mode clean. Created 3 years, 9 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/kernel/lib/transformations/closure/converter.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/transformations/closure/mock.dart
diff --git a/pkg/kernel/lib/transformations/closure/mock.dart b/pkg/kernel/lib/transformations/closure/mock.dart
index 031501a5ca2fc28e7ee019e48f73e04085f641c5..8b05f663efcf4b4c1b2edc10d4ffeb71bb5563e3 100644
--- a/pkg/kernel/lib/transformations/closure/mock.dart
+++ b/pkg/kernel/lib/transformations/closure/mock.dart
@@ -34,6 +34,7 @@ import '../../ast.dart'
Statement,
StaticInvocation,
Supertype,
+ TreeNode,
VariableDeclaration,
VariableGet;
@@ -72,13 +73,13 @@ Class mockUpContext(CoreTypes coreTypes, Program program) {
/// final List list;
Field listField = new Field(new Name("list"),
type: coreTypes.listClass.rawType, isFinal: true, fileUri: fileUri);
- Accessor listFieldAccessor =
- new ThisPropertyAccessor(listField.name, listField, null);
+ Accessor listFieldAccessor = new ThisPropertyAccessor(
+ listField.name, listField, null, TreeNode.noOffset);
/// var parent;
Field parentField = new Field(new Name("parent"), fileUri: fileUri);
- Accessor parentFieldAccessor =
- new ThisPropertyAccessor(parentField.name, parentField, parentField);
+ Accessor parentFieldAccessor = new ThisPropertyAccessor(
+ parentField.name, parentField, parentField, TreeNode.noOffset);
List<Field> fields = <Field>[listField, parentField];
@@ -100,7 +101,8 @@ Class mockUpContext(CoreTypes coreTypes, Program program) {
new StaticInvocation(
listConstructor,
new Arguments(<Expression>[
- new VariableAccessor(iParameter).buildSimpleRead(),
+ new VariableAccessor(iParameter, null, TreeNode.noOffset)
+ .buildSimpleRead(),
new NullLiteral(),
], types: <DartType>[
const DynamicType()
@@ -110,8 +112,12 @@ Class mockUpContext(CoreTypes coreTypes, Program program) {
/// operator[] (int i) => list[i];
iParameter = new VariableDeclaration("i",
type: coreTypes.intClass.rawType, isFinal: true);
- Accessor accessor = IndexAccessor.make(listFieldAccessor.buildSimpleRead(),
- new VariableAccessor(iParameter).buildSimpleRead(), null, null);
+ Accessor accessor = IndexAccessor.make(
+ listFieldAccessor.buildSimpleRead(),
+ new VariableAccessor(iParameter, null, TreeNode.noOffset)
+ .buildSimpleRead(),
+ null,
+ null);
Procedure indexGet = new Procedure(
new Name("[]"),
ProcedureKind.Operator,
@@ -126,10 +132,15 @@ Class mockUpContext(CoreTypes coreTypes, Program program) {
type: coreTypes.intClass.rawType, isFinal: true);
VariableDeclaration valueParameter =
new VariableDeclaration("value", isFinal: true);
- accessor = IndexAccessor.make(listFieldAccessor.buildSimpleRead(),
- new VariableAccessor(iParameter).buildSimpleRead(), null, null);
+ accessor = IndexAccessor.make(
+ listFieldAccessor.buildSimpleRead(),
+ new VariableAccessor(iParameter, null, TreeNode.noOffset)
+ .buildSimpleRead(),
+ null,
+ null);
Expression expression = accessor.buildAssignment(
- new VariableAccessor(valueParameter).buildSimpleRead(),
+ new VariableAccessor(valueParameter, null, TreeNode.noOffset)
+ .buildSimpleRead(),
voidContext: true);
Procedure indexSet = new Procedure(
new Name("[]="),
« no previous file with comments | « pkg/kernel/lib/transformations/closure/converter.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698