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

Side by Side Diff: pkg/kernel/test/closures/suite.dart

Issue 2904203003: Don't recreate CoreTypes in transformers. Pass it in. (Closed)
Patch Set: Don't create CoreTypes in createOutlines() on InputError. 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 unified diff | Download patch
« no previous file with comments | « pkg/kernel/test/baseline_tester.dart ('k') | pkg/kernel/test/reify/suite.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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:front_end/physical_file_system.dart' show PhysicalFileSystem; 9 import 'package:front_end/physical_file_system.dart' show PhysicalFileSystem;
10 10
11 import 'package:kernel/core_types.dart' show CoreTypes;
12
11 import 'package:testing/testing.dart' 13 import 'package:testing/testing.dart'
12 show Chain, ChainContext, Result, Step, TestDescription, runMe; 14 show Chain, ChainContext, Result, Step, TestDescription, runMe;
13 15
14 import 'package:front_end/src/fasta/testing/patched_sdk_location.dart' 16 import 'package:front_end/src/fasta/testing/patched_sdk_location.dart'
15 show computePatchedSdk; 17 show computePatchedSdk;
16 18
17 import 'package:kernel/ast.dart' show Program; 19 import 'package:kernel/ast.dart' show Program;
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;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 120
119 class ClosureConversion 121 class ClosureConversion
120 extends Step<Program, Program, ClosureConversionContext> { 122 extends Step<Program, Program, ClosureConversionContext> {
121 const ClosureConversion(); 123 const ClosureConversion();
122 124
123 String get name => "closure conversion"; 125 String get name => "closure conversion";
124 126
125 Future<Result<Program>> run( 127 Future<Result<Program>> run(
126 Program program, ClosureConversionContext testContext) async { 128 Program program, ClosureConversionContext testContext) async {
127 try { 129 try {
128 program = closure_conversion.transformProgram(program); 130 CoreTypes coreTypes = new CoreTypes(program);
131 program = closure_conversion.transformProgram(coreTypes, program);
129 return pass(program); 132 return pass(program);
130 } catch (e, s) { 133 } catch (e, s) {
131 return crash(e, s); 134 return crash(e, s);
132 } 135 }
133 } 136 }
134 } 137 }
135 138
136 main(List<String> arguments) => runMe(arguments, createContext, "testing.json"); 139 main(List<String> arguments) => runMe(arguments, createContext, "testing.json");
OLDNEW
« no previous file with comments | « pkg/kernel/test/baseline_tester.dart ('k') | pkg/kernel/test/reify/suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698