| Index: runtime/vm/intrinsifier_mips.cc
|
| diff --git a/runtime/vm/intrinsifier_mips.cc b/runtime/vm/intrinsifier_mips.cc
|
| index e312650237dad0aef3e1890dc03645d815bf2110..09cef4eeadcdca1f41c0b14308b1213b547a5d94 100644
|
| --- a/runtime/vm/intrinsifier_mips.cc
|
| +++ b/runtime/vm/intrinsifier_mips.cc
|
| @@ -8,9 +8,11 @@
|
| #include "vm/intrinsifier.h"
|
|
|
| #include "vm/assembler.h"
|
| +#include "vm/dart_entry.h"
|
| #include "vm/flow_graph_compiler.h"
|
| #include "vm/object.h"
|
| #include "vm/object_store.h"
|
| +#include "vm/regexp_assembler.h"
|
| #include "vm/symbols.h"
|
|
|
| namespace dart {
|
| @@ -1669,6 +1671,47 @@ void Intrinsifier::TwoByteString_equality(Assembler* assembler) {
|
| StringEquality(assembler, kTwoByteStringCid);
|
| }
|
|
|
| +
|
| +#ifndef USE_JSCRE
|
| +void Intrinsifier::JSRegExp_ExecuteMatch(Assembler* assembler) {
|
| + static const intptr_t kRegExpParamOffset = + 2 * kWordSize;
|
| + static const intptr_t kStringParamOffset = + 1 * kWordSize;
|
| + // const Smi& start_index is located at (+ 0 * kWordSize).
|
| +
|
| + // Register assignments are as follows:
|
| + // T0: The appropriate specialized matcher function.
|
| + // T1: The regexp object.
|
| + // T2: Temp.
|
| + // T3: Temp, Pointer to the function's code which we then tail-call.
|
| +
|
| + __ lw(T1, Address(SP, kRegExpParamOffset));
|
| + __ lw(T3, Address(SP, kStringParamOffset));
|
| +
|
| + // Load the specialized function pointer into T0. Leverage the fact the
|
| + // string CIDs as well as stored function pointers are in sequence.
|
| +
|
| + __ LoadClassId(T2, T3);
|
| + __ AddImmediate(T2, -kOneByteStringCid);
|
| + __ sll(T2, T2, kWordSizeLog2);
|
| + __ addu(T2, T2, T1);
|
| + __ lw(T0, FieldAddress(T2, JSRegExp::function_offset(kOneByteStringCid)));
|
| +
|
| + // Registers have been set up for the lazy compile stub at this point.
|
| + // It expects the function in T0, the argument descriptor in S4, and
|
| + // IC-Data in S5. Explicitly null out IC-Data to ensure its validity.
|
| +
|
| + static const intptr_t arg_count = RegExpMacroAssembler::kParamCount;
|
| + __ LoadObject(S4, Array::Handle(ArgumentsDescriptor::New(arg_count)));
|
| + __ xor_(S5, S5, S5);
|
| +
|
| + // Tail-call the function.
|
| + __ lw(T3, FieldAddress(T0, Function::instructions_offset()));
|
| + __ AddImmediate(T3, Instructions::HeaderSize() - kHeapObjectTag);
|
| + __ jr(T3);
|
| +}
|
| +#endif
|
| +
|
| +
|
| // On stack: user tag (+0).
|
| void Intrinsifier::UserTag_makeCurrent(Assembler* assembler) {
|
| // T1: Isolate.
|
|
|