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

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

Issue 11090016: Change core lib, dart2js, and more for new optional parameters syntax (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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
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 5
6 /** 6 /**
7 * If true, print a warning for each method that was resolved, but not 7 * If true, print a warning for each method that was resolved, but not
8 * compiled. 8 * compiled.
9 */ 9 */
10 const bool REPORT_EXCESS_RESOLUTION = false; 10 const bool REPORT_EXCESS_RESOLUTION = false;
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 static const int PHASE_SCANNING = 0; 184 static const int PHASE_SCANNING = 0;
185 static const int PHASE_RESOLVING = 1; 185 static const int PHASE_RESOLVING = 1;
186 static const int PHASE_COMPILING = 2; 186 static const int PHASE_COMPILING = 2;
187 int phase; 187 int phase;
188 188
189 bool compilationFailed = false; 189 bool compilationFailed = false;
190 190
191 bool hasCrashed = false; 191 bool hasCrashed = false;
192 192
193 Compiler([this.tracer = const Tracer(), 193 Compiler({this.tracer: const Tracer(),
194 this.enableTypeAssertions = false, 194 this.enableTypeAssertions: false,
195 this.enableUserAssertions = false, 195 this.enableUserAssertions: false,
196 this.enableMinification = false, 196 this.enableMinification: false,
197 bool emitJavaScript = true, 197 bool emitJavaScript: true,
198 bool generateSourceMap = true, 198 bool generateSourceMap: true,
199 List<String> strips = const []]) 199 List<String> strips: const []})
200 : libraries = new Map<String, LibraryElement>(), 200 : libraries = new Map<String, LibraryElement>(),
201 progress = new Stopwatch() { 201 progress = new Stopwatch() {
202 progress.start(); 202 progress.start();
203 world = new World(this); 203 world = new World(this);
204 scanner = new ScannerTask(this); 204 scanner = new ScannerTask(this);
205 dietParser = new DietParserTask(this); 205 dietParser = new DietParserTask(this);
206 parser = new ParserTask(this); 206 parser = new ParserTask(this);
207 patchParser = new PatchParserTask(this); 207 patchParser = new PatchParserTask(this);
208 validator = new TreeValidatorTask(this); 208 validator = new TreeValidatorTask(this);
209 resolver = new ResolverTask(this); 209 resolver = new ResolverTask(this);
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 * information in the generated error message. 850 * information in the generated error message.
851 */ 851 */
852 bool invariant(Spannable spannable, var condition, {String message: null}) { 852 bool invariant(Spannable spannable, var condition, {String message: null}) {
853 // TODO(johnniwinther): Use [spannable] and [message] to provide better 853 // TODO(johnniwinther): Use [spannable] and [message] to provide better
854 // information on assertion errors. 854 // information on assertion errors.
855 if (condition is Function){ 855 if (condition is Function){
856 condition = condition(); 856 condition = condition();
857 } 857 }
858 return spannable != null && condition; 858 return spannable != null && condition;
859 } 859 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698