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

Side by Side Diff: tests/compiler/dart2js/memory_compiler.dart

Issue 1536043002: - Fix more bad uses of Platform.packageRoot. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 dart2js.test.memory_compiler; 5 library dart2js.test.memory_compiler;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:compiler/compiler.dart' show 9 import 'package:compiler/compiler.dart' show
10 DiagnosticHandler; 10 DiagnosticHandler;
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 handler = (Uri uri, int begin, int end, String message, Diagnostic kind) {}; 258 handler = (Uri uri, int begin, int end, String message, Diagnostic kind) {};
259 } 259 }
260 return handler; 260 return handler;
261 } 261 }
262 262
263 Future<MirrorSystem> mirrorSystemFor(Map<String,String> memorySourceFiles, 263 Future<MirrorSystem> mirrorSystemFor(Map<String,String> memorySourceFiles,
264 {DiagnosticHandler diagnosticHandler, 264 {DiagnosticHandler diagnosticHandler,
265 List<String> options: const [], 265 List<String> options: const [],
266 bool showDiagnostics: true}) { 266 bool showDiagnostics: true}) {
267 Uri libraryRoot = Uri.base.resolve('sdk/'); 267 Uri libraryRoot = Uri.base.resolve('sdk/');
268 Uri packageRoot = Uri.base.resolveUri( 268 Uri packageRoot = Uri.base.resolve(Platform.packageRoot);
269 new Uri.file('${Platform.packageRoot}/'));
270 269
271 var provider = new MemorySourceFileProvider(memorySourceFiles); 270 var provider = new MemorySourceFileProvider(memorySourceFiles);
272 var handler = 271 var handler =
273 createDiagnosticHandler(diagnosticHandler, provider, showDiagnostics); 272 createDiagnosticHandler(diagnosticHandler, provider, showDiagnostics);
274 273
275 List<Uri> libraries = <Uri>[]; 274 List<Uri> libraries = <Uri>[];
276 memorySourceFiles.forEach((String path, _) { 275 memorySourceFiles.forEach((String path, _) {
277 libraries.add(new Uri(scheme: 'memory', path: path)); 276 libraries.add(new Uri(scheme: 'memory', path: path));
278 }); 277 });
279 278
280 return analyze(libraries, libraryRoot, packageRoot, 279 return analyze(libraries, libraryRoot, packageRoot,
281 provider, handler, options); 280 provider, handler, options);
282 } 281 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698