| Index: runtime/lib/regexp.cc
|
| diff --git a/runtime/lib/regexp.cc b/runtime/lib/regexp.cc
|
| index 7a50561109244c8f55282b3aedc2d02edff0e1f0..87795731c57db2a2461f537c3fa7cacf6ea594dc 100644
|
| --- a/runtime/lib/regexp.cc
|
| +++ b/runtime/lib/regexp.cc
|
| @@ -78,19 +78,34 @@ DEFINE_NATIVE_ENTRY(RegExp_getGroupCount, 1) {
|
| }
|
|
|
|
|
| -DEFINE_NATIVE_ENTRY(RegExp_ExecuteMatch, 3) {
|
| - // This function is intrinsified. See Intrinsifier::RegExp_ExecuteMatch.
|
| +static RawObject* ExecuteMatch(Zone* zone,
|
| + NativeArguments* arguments,
|
| + bool sticky) {
|
| const RegExp& regexp = RegExp::CheckedHandle(arguments->NativeArgAt(0));
|
| ASSERT(!regexp.IsNull());
|
| 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 || FLAG_precompiled_runtime) {
|
| + if (FLAG_interpret_irregexp) {
|
| return BytecodeRegExpMacroAssembler::Interpret(regexp, subject, start_index,
|
| - zone);
|
| + /*sticky=*/sticky, zone);
|
| }
|
|
|
| - return IRRegExpMacroAssembler::Execute(regexp, subject, start_index, zone);
|
| + return IRRegExpMacroAssembler::Execute(regexp, subject, start_index,
|
| + /*sticky=*/sticky, zone);
|
| }
|
|
|
| +
|
| +DEFINE_NATIVE_ENTRY(RegExp_ExecuteMatch, 3) {
|
| + // This function is intrinsified. See Intrinsifier::RegExp_ExecuteMatch.
|
| + return ExecuteMatch(zone, arguments, /*sticky=*/false);
|
| +}
|
| +
|
| +
|
| +DEFINE_NATIVE_ENTRY(RegExp_ExecuteMatchSticky, 3) {
|
| + // This function is intrinsified. See Intrinsifier::RegExp_ExecuteMatchSticky.
|
| + return ExecuteMatch(zone, arguments, /*sticky=*/true);
|
| +}
|
| +
|
| +
|
| } // namespace dart
|
|
|