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

Unified Diff: lib/compiler/implementation/apiimpl.dart

Issue 10353014: Start implementing checked mode and tools support for using it. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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
Index: lib/compiler/implementation/apiimpl.dart
===================================================================
--- lib/compiler/implementation/apiimpl.dart (revision 7269)
+++ lib/compiler/implementation/apiimpl.dart (working copy)
@@ -21,9 +21,12 @@
Uri packageRoot;
List<String> options;
bool mockableLibraryUsed = false;
+ bool checkedMode = false;
ahe 2012/05/07 11:59:57 Developer mode, please.
ngeoffray 2012/05/07 13:15:42 Renamed to enableTypeAssertions.
Compiler(this.provider, this.handler, this.libraryRoot, this.options)
- : super(tracer: new ssa.HTracer());
+ : super(tracer: new ssa.HTracer()) {
+ checkedMode = options.indexOf('--enable-checked-mode') !== -1;
ahe 2012/05/07 11:59:57 I don't like this flag name. I think it should be
ngeoffray 2012/05/07 13:15:42 As discussed, keeping enable-checked-mode only for
+ }
elements.LibraryElement scanBuiltinLibrary(String path) {
Uri uri = libraryRoot.resolve(DART2JS_LIBRARY_MAP[path]);
@@ -95,4 +98,8 @@
return mockableLibraryUsed
&& (options.indexOf('--allow-mock-compilation') !== -1);
}
+
+ bool get isCheckedModeEnabled() {
ahe 2012/05/07 11:59:57 Developer mode, please.
ngeoffray 2012/05/07 13:15:42 I removed the getter.
+ return checkedMode;
+ }
}

Powered by Google App Engine
This is Rietveld 408576698