Chromium Code Reviews| 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; |
| + } |
| } |