| OLD | NEW |
| 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 11 matching lines...) Expand all Loading... |
| 22 Initializer, | 22 Initializer, |
| 23 IntLiteral, | 23 IntLiteral, |
| 24 Library, | 24 Library, |
| 25 MethodInvocation, | 25 MethodInvocation, |
| 26 Name, | 26 Name, |
| 27 Procedure, | 27 Procedure, |
| 28 ProcedureKind, | 28 ProcedureKind, |
| 29 Program, | 29 Program, |
| 30 PropertyGet, | 30 PropertyGet, |
| 31 ReturnStatement, | 31 ReturnStatement, |
| 32 Source, |
| 32 Statement, | 33 Statement, |
| 33 StaticInvocation, | 34 StaticInvocation, |
| 34 Supertype, | 35 Supertype, |
| 35 VariableDeclaration, | 36 VariableDeclaration, |
| 36 VariableGet; | 37 VariableGet; |
| 37 | 38 |
| 38 import '../../core_types.dart' show CoreTypes; | 39 import '../../core_types.dart' show CoreTypes; |
| 39 | 40 |
| 40 import '../../frontend/accessors.dart' | 41 import '../../frontend/accessors.dart' |
| 41 show | 42 show |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 name: "Context", | 177 name: "Context", |
| 177 supertype: new Supertype(coreTypes.objectClass, const <DartType>[]), | 178 supertype: new Supertype(coreTypes.objectClass, const <DartType>[]), |
| 178 constructors: [constructor], | 179 constructors: [constructor], |
| 179 fields: fields, | 180 fields: fields, |
| 180 procedures: procedures, | 181 procedures: procedures, |
| 181 fileUri: fileUri); | 182 fileUri: fileUri); |
| 182 Library mock = new Library(Uri.parse(fileUri), | 183 Library mock = new Library(Uri.parse(fileUri), |
| 183 name: "mock", classes: [contextClass])..fileUri = fileUri; | 184 name: "mock", classes: [contextClass])..fileUri = fileUri; |
| 184 program.libraries.add(mock); | 185 program.libraries.add(mock); |
| 185 mock.parent = program; | 186 mock.parent = program; |
| 186 program.uriToLineStarts[mock.fileUri] = <int>[0]; | 187 program.uriToSource[mock.fileUri] = new Source(<int>[0], ""); |
| 187 return contextClass; | 188 return contextClass; |
| 188 } | 189 } |
| OLD | NEW |