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

Side by Side Diff: dart/utils/compiler/build_helper.dart

Issue 9866006: Add library mapping. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « dart/lib/compiler/implementation/scanner/scanner_task.dart ('k') | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #import('dart:io'); 5 #import('dart:io');
6 #import('dart:uri'); 6 #import('dart:uri');
7 7
8 main() { 8 main() {
9 List<String> arguments = new Options().arguments; 9 List<String> arguments = new Options().arguments;
10 Uri uri = new Uri(scheme: 'file', path: '${arguments[0]}/'); 10 Uri uri = new Uri(scheme: 'file', path: '${arguments[0]}/');
(...skipping 25 matching lines...) Expand all
36 buildScript(Uri uri) { 36 buildScript(Uri uri) {
37 return """ 37 return """
38 38
39 #import('dart:io'); 39 #import('dart:io');
40 40
41 #import('${uri.resolve('../../lib/compiler/implementation/dart2js.dart').path}') ; 41 #import('${uri.resolve('../../lib/compiler/implementation/dart2js.dart').path}') ;
42 42
43 class Helper { 43 class Helper {
44 void run() { 44 void run() {
45 try { 45 try {
46 List<String> argv = 46 List<String> argv = ['--library-root=${uri.resolve('../../').path}'];
47 ['--library-root=${uri.resolve('../../lib/compiler/implementation/lib'). path}'];
48 argv.addAll(new Options().arguments); 47 argv.addAll(new Options().arguments);
49 compile(argv); 48 compile(argv);
50 } catch (var exception, var trace) { 49 } catch (var exception, var trace) {
51 try { 50 try {
52 print('Internal error: \$exception'); 51 print('Internal error: \$exception');
53 } catch (var ignored) { 52 } catch (var ignored) {
54 print('Internal error: error while printing exception'); 53 print('Internal error: error while printing exception');
55 } 54 }
56 try { 55 try {
57 print(trace); 56 print(trace);
58 } finally { 57 } finally {
59 exit(253); // 253 is recognized as a crash by our test scripts. 58 exit(253); // 253 is recognized as a crash by our test scripts.
60 } 59 }
61 } 60 }
62 } 61 }
63 } 62 }
64 63
65 void main() { 64 void main() {
66 new Helper().run(); 65 new Helper().run();
67 } 66 }
68 """; 67 """;
69 } 68 }
OLDNEW
« no previous file with comments | « dart/lib/compiler/implementation/scanner/scanner_task.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698