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

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

Issue 2828693003: Add local type inference logic for integer literals. (Closed)
Patch Set: Minor clean-ups Created 3 years, 8 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) 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:analyzer/src/generated/sdk.dart' show DartSdk; 9 import 'package:analyzer/src/generated/sdk.dart' show DartSdk;
10 10
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 Future<Result<Program>> run( 114 Future<Result<Program>> run(
115 TestDescription description, ClosureConversionContext context) async { 115 TestDescription description, ClosureConversionContext context) async {
116 Program platform = await context.createPlatform(); 116 Program platform = await context.createPlatform();
117 Ticker ticker = new Ticker(); 117 Ticker ticker = new Ticker();
118 DillTarget dillTarget = new DillTarget(ticker, context.uriTranslator); 118 DillTarget dillTarget = new DillTarget(ticker, context.uriTranslator);
119 dillTarget.loader 119 dillTarget.loader
120 ..input = Uri.parse("org.dartlang:platform") // Make up a name. 120 ..input = Uri.parse("org.dartlang:platform") // Make up a name.
121 ..setProgram(platform); 121 ..setProgram(platform);
122 KernelTarget sourceTarget = 122 KernelTarget sourceTarget =
123 new KernelTarget(dillTarget, context.uriTranslator); 123 new KernelTarget(dillTarget, context.uriTranslator, false);
124 124
125 Program p; 125 Program p;
126 try { 126 try {
127 sourceTarget.read(description.uri); 127 sourceTarget.read(description.uri);
128 await dillTarget.writeOutline(null); 128 await dillTarget.writeOutline(null);
129 await sourceTarget.writeOutline(null); 129 await sourceTarget.writeOutline(null);
130 p = await sourceTarget.writeProgram(null); 130 p = await sourceTarget.writeProgram(null);
131 } on InputError catch (e, s) { 131 } on InputError catch (e, s) {
132 return fail(null, e.error, s); 132 return fail(null, e.error, s);
133 } 133 }
(...skipping 12 matching lines...) Expand all
146 try { 146 try {
147 program = closure_conversion.transformProgram(program); 147 program = closure_conversion.transformProgram(program);
148 return pass(program); 148 return pass(program);
149 } catch (e, s) { 149 } catch (e, s) {
150 return crash(e, s); 150 return crash(e, s);
151 } 151 }
152 } 152 }
153 } 153 }
154 154
155 main(List<String> arguments) => runMe(arguments, createContext, "testing.json"); 155 main(List<String> arguments) => runMe(arguments, createContext, "testing.json");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698