Index: runtime/vm/parser.cc |
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc |
index 6cc8e5421676438b17b07fdde16c095f27fbaeca..42122484b09d41c2a75e0b2c65b175cbfbbe6526 100644 |
--- a/runtime/vm/parser.cc |
+++ b/runtime/vm/parser.cc |
@@ -46,6 +46,7 @@ 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."); |
+DECLARE_FLAG(bool, lazy_dispatchers); |
// Quick access to the current isolate and zone. |
#define I (isolate()) |
@@ -1330,6 +1331,8 @@ SequenceNode* Parser::ParseImplicitClosure(const Function& func, |
SequenceNode* Parser::ParseMethodExtractor(const Function& func) { |
TRACE_PARSER("ParseMethodExtractor"); |
+ ASSERT(FLAG_lazy_dispatchers); |
+ |
ParamList params; |
const intptr_t ident_pos = func.token_pos(); |
@@ -1402,6 +1405,7 @@ void Parser::BuildDispatcherScope(const Function& func, |
SequenceNode* Parser::ParseNoSuchMethodDispatcher(const Function& func, |
Array* default_values) { |
TRACE_PARSER("ParseNoSuchMethodDispatcher"); |
+ ASSERT(FLAG_lazy_dispatchers); |
ASSERT(func.IsNoSuchMethodDispatcher()); |
intptr_t token_pos = func.token_pos(); |
@@ -1459,6 +1463,7 @@ SequenceNode* Parser::ParseNoSuchMethodDispatcher(const Function& func, |
SequenceNode* Parser::ParseInvokeFieldDispatcher(const Function& func, |
Array* default_values) { |
TRACE_PARSER("ParseInvokeFieldDispatcher"); |
+ ASSERT(FLAG_lazy_dispatchers); |
ASSERT(func.IsInvokeFieldDispatcher()); |
intptr_t token_pos = func.token_pos(); |