Index: runtime/lib/regexp.cc |
diff --git a/runtime/lib/regexp.cc b/runtime/lib/regexp.cc |
index 87795731c57db2a2461f537c3fa7cacf6ea594dc..2aad1269b2ff04b444444836e30a75497794c55c 100644 |
--- a/runtime/lib/regexp.cc |
+++ b/runtime/lib/regexp.cc |
@@ -14,7 +14,7 @@ |
namespace dart { |
-DECLARE_FLAG(bool, trace_irregexp); |
+DEFINE_FLAG(bool, trace_irregexp, false, "Trace irregexps"); |
DEFINE_NATIVE_ENTRY(RegExp_factory, 4) { |
@@ -86,13 +86,14 @@ static RawObject* ExecuteMatch(Zone* zone, |
GET_NON_NULL_NATIVE_ARGUMENT(String, subject, arguments->NativeArgAt(1)); |
GET_NON_NULL_NATIVE_ARGUMENT(Smi, start_index, arguments->NativeArgAt(2)); |
- if (FLAG_interpret_irregexp) { |
- return BytecodeRegExpMacroAssembler::Interpret(regexp, subject, start_index, |
- /*sticky=*/sticky, zone); |
+#if !defined(DART_PRECOMPILED_RUNTIME) |
rmacnak
2017/07/10 17:50:00
Not in this CL, but we should consider unburdening
Aske Simon Christensen
2017/07/11 09:11:56
It would still be available via the commandline fl
|
+ if (!FLAG_interpret_irregexp) { |
+ return IRRegExpMacroAssembler::Execute(regexp, subject, start_index, |
+ /*sticky=*/sticky, zone); |
} |
- |
- return IRRegExpMacroAssembler::Execute(regexp, subject, start_index, |
- /*sticky=*/sticky, zone); |
+#endif |
+ return BytecodeRegExpMacroAssembler::Interpret(regexp, subject, start_index, |
+ /*sticky=*/sticky, zone); |
} |