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

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

Issue 2918623004: Use backend targets to run Kernel transformations in Fasta (Closed)
Patch Set: Adjust to the recent changes in master 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/closures/suite.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 'dart:io' show File; 9 import 'dart:io' show File;
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 class FastaCompile extends Step<TestDescription, Program, InterpreterContext> { 74 class FastaCompile extends Step<TestDescription, Program, InterpreterContext> {
75 const FastaCompile(); 75 const FastaCompile();
76 76
77 String get name => "fasta compile"; 77 String get name => "fasta compile";
78 78
79 Future<Result<Program>> run( 79 Future<Result<Program>> run(
80 TestDescription description, InterpreterContext context) async { 80 TestDescription description, InterpreterContext context) async {
81 Program platform = await context.loadPlatform(); 81 Program platform = await context.loadPlatform();
82 Ticker ticker = new Ticker(); 82 Ticker ticker = new Ticker();
83 DillTarget dillTarget = new DillTarget(ticker, context.uriTranslator, "vm"); 83 DillTarget dillTarget =
84 new DillTarget(ticker, context.uriTranslator, "vm_fasta");
84 platform.unbindCanonicalNames(); 85 platform.unbindCanonicalNames();
85 dillTarget.loader.appendLibraries(platform); 86 dillTarget.loader.appendLibraries(platform);
86 KernelTarget sourceTarget = new KernelTarget(PhysicalFileSystem.instance, 87 KernelTarget sourceTarget = new KernelTarget(PhysicalFileSystem.instance,
87 dillTarget, context.uriTranslator, context.strongMode); 88 dillTarget, context.uriTranslator, context.strongMode);
88 89
89 Program p; 90 Program p;
90 try { 91 try {
91 sourceTarget.read(description.uri); 92 sourceTarget.read(description.uri);
92 await dillTarget.buildOutlines(); 93 await dillTarget.buildOutlines();
93 await sourceTarget.buildOutlines(); 94 await sourceTarget.buildOutlines();
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 final Uri uri; 154 final Uri uri;
154 155
155 /// Evaluated program log. 156 /// Evaluated program log.
156 final String log; 157 final String log;
157 158
158 EvaluationLog(this.uri, this.log); 159 EvaluationLog(this.uri, this.log);
159 } 160 }
160 161
161 main(List<String> arguments) => 162 main(List<String> arguments) =>
162 runMe(arguments, InterpreterContext.create, "testing.json"); 163 runMe(arguments, InterpreterContext.create, "testing.json");
OLDNEW
« no previous file with comments | « pkg/kernel/test/closures/suite.dart ('k') | pkg/kernel/test/reify/suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698