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

Side by Side Diff: lib/compiler/implementation/apiimpl.dart

Issue 10909015: Unify the name of the flag and make it settable from command line. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 | « no previous file | lib/compiler/implementation/dart2js.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) 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 #library('leg_apiimpl'); 5 #library('leg_apiimpl');
6 6
7 #import('dart:uri'); 7 #import('dart:uri');
8 8
9 #import('../compiler.dart', prefix: 'api'); 9 #import('../compiler.dart', prefix: 'api');
10 #import('leg.dart', prefix: 'leg'); 10 #import('leg.dart', prefix: 'leg');
(...skipping 13 matching lines...) Expand all
24 24
25 Compiler(this.provider, this.handler, this.libraryRoot, this.packageRoot, 25 Compiler(this.provider, this.handler, this.libraryRoot, this.packageRoot,
26 List<String> options) 26 List<String> options)
27 : this.options = options, 27 : this.options = options,
28 super( 28 super(
29 tracer: new ssa.HTracer(), 29 tracer: new ssa.HTracer(),
30 enableTypeAssertions: hasOption(options, '--enable-checked-mode'), 30 enableTypeAssertions: hasOption(options, '--enable-checked-mode'),
31 enableUserAssertions: hasOption(options, '--enable-checked-mode'), 31 enableUserAssertions: hasOption(options, '--enable-checked-mode'),
32 enableMinification: hasOption(options, '--minify'), 32 enableMinification: hasOption(options, '--minify'),
33 emitJavascript: !hasOption(options, '--output-type=dart'), 33 emitJavascript: !hasOption(options, '--output-type=dart'),
34 cutDeclarationTypes: hasOption(options, '--cutDeclarationTypes')); 34 cutDeclarationTypes: hasOption(options, '--cut-declaration-types'));
35 35
36 static bool hasOption(List<String> options, String option) { 36 static bool hasOption(List<String> options, String option) {
37 return options.indexOf(option) >= 0; 37 return options.indexOf(option) >= 0;
38 } 38 }
39 39
40 String lookupLibraryPath(String dartLibraryName) { 40 String lookupLibraryPath(String dartLibraryName) {
41 LibraryInfo info = LIBRARIES[dartLibraryName]; 41 LibraryInfo info = LIBRARIES[dartLibraryName];
42 if (info === null) return null; 42 if (info === null) return null;
43 if (!info.isDart2jsLibrary) return null; 43 if (!info.isDart2jsLibrary) return null;
44 String path = info.dart2jsPath; 44 String path = info.dart2jsPath;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 handler(translateUri(span.uri, null), span.begin, span.end, 145 handler(translateUri(span.uri, null), span.begin, span.end,
146 message, kind); 146 message, kind);
147 } 147 }
148 } 148 }
149 149
150 bool get isMockCompilation { 150 bool get isMockCompilation {
151 return mockableLibraryUsed 151 return mockableLibraryUsed
152 && (options.indexOf('--allow-mock-compilation') !== -1); 152 && (options.indexOf('--allow-mock-compilation') !== -1);
153 } 153 }
154 } 154 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698