| Index: runtime/vm/parser.cc
|
| diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
|
| index 8491a6894a63ae267a5dcdc418e3b79789e710bb..1abb8621a1bd8e41ee89bae504aa43693551f148 100644
|
| --- a/runtime/vm/parser.cc
|
| +++ b/runtime/vm/parser.cc
|
| @@ -44,7 +44,8 @@ DEFINE_FLAG(bool, trace_parser, false, "Trace parser operations.");
|
| DEFINE_FLAG(bool, warn_mixin_typedef, true, "Warning on legacy mixin typedef.");
|
| DECLARE_FLAG(bool, throw_on_javascript_int_overflow);
|
| DECLARE_FLAG(bool, warn_on_javascript_compatibility);
|
| -
|
| +DEFINE_FLAG(bool, enable_mirrors, true,
|
| + "Disable to make importing dart:mirrors an error.");
|
|
|
| // Quick access to the current isolate and zone.
|
| #define I (isolate())
|
| @@ -5783,6 +5784,11 @@ void Parser::ParseLibraryImportExport(intptr_t metadata_pos) {
|
| ReportError(import_pos, "private library is not accessible");
|
| }
|
|
|
| + if (!FLAG_enable_mirrors && Symbols::DartMirrors().Equals(canon_url)) {
|
| + ReportError(import_pos,
|
| + "import of dart:mirrors with --enable-mirrors=false");
|
| + }
|
| +
|
| if (is_import) {
|
| if (prefix.IsNull() || (prefix.Length() == 0)) {
|
| ASSERT(!is_deferred_import);
|
|
|