OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 library test.kernel.closures.suite; | 5 library test.kernel.closures.suite; |
6 | 6 |
7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
8 | 8 |
9 import 'package:kernel/core_types.dart' show CoreTypes; | 9 import 'package:kernel/core_types.dart' show CoreTypes; |
10 | 10 |
11 import 'package:testing/testing.dart' | 11 import 'package:testing/testing.dart' |
12 show Chain, ChainContext, Result, Step, runMe; | 12 show Chain, ChainContext, Result, Step, runMe; |
13 | 13 |
14 import 'package:kernel/ast.dart' show Program, Library; | 14 import 'package:kernel/ast.dart' show Program, Library; |
15 | 15 |
| 16 import 'package:kernel/target/targets.dart' show Target; |
| 17 |
16 import 'package:kernel/transformations/argument_extraction_for_redirecting.dart' | 18 import 'package:kernel/transformations/argument_extraction_for_redirecting.dart' |
17 as argument_extraction; | 19 as argument_extraction; |
18 | 20 |
19 import 'package:kernel/transformations/closure_conversion.dart' | 21 import 'package:kernel/transformations/closure_conversion.dart' |
20 as closure_conversion; | 22 as closure_conversion; |
21 | 23 |
22 import 'package:front_end/src/fasta/testing/kernel_chain.dart' | 24 import 'package:front_end/src/fasta/testing/kernel_chain.dart' |
23 show | 25 show |
24 Compile, | 26 Compile, |
25 CompileContext, | 27 CompileContext, |
26 Print, | 28 Print, |
27 MatchExpectation, | 29 MatchExpectation, |
28 WriteDill, | 30 WriteDill, |
29 ReadDill, | 31 ReadDill, |
30 Verify; | 32 Verify; |
31 | 33 |
32 const String STRONG_MODE = " strong mode "; | 34 const String STRONG_MODE = " strong mode "; |
33 | 35 |
34 class ClosureConversionContext extends ChainContext implements CompileContext { | 36 class ClosureConversionContext extends ChainContext implements CompileContext { |
35 final bool strongMode; | 37 final bool strongMode; |
36 | 38 |
| 39 Target get target => null; |
| 40 |
37 final List<Step> steps; | 41 final List<Step> steps; |
38 | 42 |
39 ClosureConversionContext(this.strongMode, bool updateExpectations) | 43 ClosureConversionContext(this.strongMode, bool updateExpectations) |
40 : steps = <Step>[ | 44 : steps = <Step>[ |
41 const Compile(), | 45 const Compile(), |
42 const Print(), | 46 const Print(), |
43 const Verify(true), | 47 const Verify(true), |
44 const ArgumentExtraction(), | 48 const ArgumentExtraction(), |
45 const Print(), | 49 const Print(), |
46 const Verify(true), | 50 const Verify(true), |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 .firstWhere((Library library) => library.importUri.scheme != "dart"); | 107 .firstWhere((Library library) => library.importUri.scheme != "dart"); |
104 closure_conversion.transformLibraries(coreTypes, <Library>[library]); | 108 closure_conversion.transformLibraries(coreTypes, <Library>[library]); |
105 return pass(program); | 109 return pass(program); |
106 } catch (e, s) { | 110 } catch (e, s) { |
107 return crash(e, s); | 111 return crash(e, s); |
108 } | 112 } |
109 } | 113 } |
110 } | 114 } |
111 | 115 |
112 main(List<String> arguments) => runMe(arguments, createContext, "testing.json"); | 116 main(List<String> arguments) => runMe(arguments, createContext, "testing.json"); |
OLD | NEW |