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

Unified Diff: dart/frog/frog_leg.dart

Issue 10123013: Make frog.py --leg work on Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add link to MS blog post about Windows file names and URIs Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | dart/lib/compiler/implementation/filenames.dart » ('j') | dart/tests/co19/co19-leg.status » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/frog_leg.dart
diff --git a/dart/frog/frog_leg.dart b/dart/frog/frog_leg.dart
index c9c8994131f9aa8c43c5605e28a25be78e7f758e..19faa3cf5ce2251bbfccd045d0496dfa380fb706 100644
--- a/dart/frog/frog_leg.dart
+++ b/dart/frog/frog_leg.dart
@@ -9,6 +9,7 @@
#import('lang.dart', prefix: 'frog');
#import('../lib/compiler/compiler.dart', prefix: 'compiler');
+#import('../lib/compiler/implementation/filenames.dart');
String relativize(Uri base, Uri uri) {
if (base.scheme == 'file' &&
@@ -45,8 +46,8 @@ bool compile(frog.World world) {
final showWarnings = frog.options.showWarnings;
final allowMockCompilation = frog.options.allowMockCompilation;
Uri cwd = new Uri(scheme: 'file', path: getCurrentDirectory());
- Uri uri = cwd.resolve(frog.options.dartScript);
- String frogLibDir = frog.options.libDir;
+ Uri uri = cwd.resolve(nativeToUriPath(frog.options.dartScript));
+ String frogLibDir = nativeToUriPath(frog.options.libDir);
if (!frogLibDir.endsWith("/")) frogLibDir = "$frogLibDir/";
Uri frogLib = new Uri(scheme: 'file', path: frogLibDir);
Uri libraryRoot = frogLib.resolve('../../');
@@ -56,7 +57,7 @@ bool compile(frog.World world) {
if (uri.scheme != 'file') {
throw new IllegalArgumentException(uri);
}
- String source = world.files.readAll(uri.path);
+ String source = world.files.readAll(uriPathToNative(uri.path));
world.dartBytesRead += source.length;
sourceFiles[uri.toString()] =
new frog.SourceFile(relativize(cwd, uri), source);
« no previous file with comments | « no previous file | dart/lib/compiler/implementation/filenames.dart » ('j') | dart/tests/co19/co19-leg.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698