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

Side by Side Diff: pkg/kernel/lib/transformations/closure/mock.dart

Issue 2767773004: Add Vector type to Kernel (Closed)
Patch Set: Add a note to return Run step in Closure Conversion test suite 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 kernel.transformations.closure.mock; 5 library kernel.transformations.closure.mock;
6 6
7 import '../../ast.dart' 7 import '../../ast.dart'
8 show 8 show
9 Arguments, 9 Arguments,
10 Block, 10 Block,
(...skipping 29 matching lines...) Expand all
40 import '../../core_types.dart' show CoreTypes; 40 import '../../core_types.dart' show CoreTypes;
41 41
42 import '../../frontend/accessors.dart' 42 import '../../frontend/accessors.dart'
43 show 43 show
44 Accessor, 44 Accessor,
45 IndexAccessor, 45 IndexAccessor,
46 PropertyAccessor, 46 PropertyAccessor,
47 ThisPropertyAccessor, 47 ThisPropertyAccessor,
48 VariableAccessor; 48 VariableAccessor;
49 49
50 /// TODO(dmitryas): make the "[]=" operator return the value.
50 /// Extend the program with this mock: 51 /// Extend the program with this mock:
51 /// 52 ///
52 /// class Context { 53 /// class Context {
53 /// final List list; 54 /// final List list;
54 /// var parent; 55 /// var parent;
55 /// Context(int i) : list = new List(i); 56 /// Context(int i) : list = new List(i);
56 /// operator[] (int i) => list[i]; 57 /// operator[] (int i) => list[i];
57 /// operator[]= (int i, value) { 58 /// operator[]= (int i, value) {
58 /// list[i] = value; 59 /// list[i] = value;
59 /// } 60 /// }
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 fields: fields, 188 fields: fields,
188 procedures: procedures, 189 procedures: procedures,
189 fileUri: fileUri); 190 fileUri: fileUri);
190 Library mock = new Library(Uri.parse(fileUri), 191 Library mock = new Library(Uri.parse(fileUri),
191 name: "mock", classes: [contextClass])..fileUri = fileUri; 192 name: "mock", classes: [contextClass])..fileUri = fileUri;
192 program.libraries.add(mock); 193 program.libraries.add(mock);
193 mock.parent = program; 194 mock.parent = program;
194 program.uriToSource[mock.fileUri] = new Source(<int>[0], const <int>[]); 195 program.uriToSource[mock.fileUri] = new Source(<int>[0], const <int>[]);
195 return contextClass; 196 return contextClass;
196 } 197 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698