| Index: runtime/vm/regexp_assembler_ir.cc
|
| diff --git a/runtime/vm/regexp_assembler_ir.cc b/runtime/vm/regexp_assembler_ir.cc
|
| index bdf5dad7a722958196e4a4d851d18025254ede9c..3098c649d805eda988457b2b45c4b4692e91d0a4 100644
|
| --- a/runtime/vm/regexp_assembler_ir.cc
|
| +++ b/runtime/vm/regexp_assembler_ir.cc
|
| @@ -14,7 +14,6 @@
|
| #include "vm/resolver.h"
|
| #include "vm/runtime_entry.h"
|
| #include "vm/stack_frame.h"
|
| -#include "vm/unibrow-inl.h"
|
| #include "vm/unicode.h"
|
|
|
| #define Z zone()
|
| @@ -38,20 +37,10 @@
|
|
|
| namespace dart {
|
|
|
| -DEFINE_FLAG(bool, trace_irregexp, false, "Trace irregexps");
|
| -
|
| -
|
| static const intptr_t kInvalidTryIndex = CatchClauseNode::kInvalidTryIndex;
|
| static const intptr_t kMinStackSize = 512;
|
|
|
|
|
| -void PrintUtf16(uint16_t c) {
|
| - const char* format =
|
| - (0x20 <= c && c <= 0x7F) ? "%c" : (c <= 0xff) ? "\\x%02x" : "\\u%04x";
|
| - OS::Print(format, c);
|
| -}
|
| -
|
| -
|
| /*
|
| * This assembler uses the following main local variables:
|
| * - stack_: A pointer to a growable list which we use as an all-purpose stack
|
| @@ -355,45 +344,6 @@ RawArray* IRRegExpMacroAssembler::Execute(const RegExp& regexp,
|
| }
|
|
|
|
|
| -static RawBool* CaseInsensitiveCompareUC16(RawString* str_raw,
|
| - RawSmi* lhs_index_raw,
|
| - RawSmi* rhs_index_raw,
|
| - RawSmi* length_raw) {
|
| - const String& str = String::Handle(str_raw);
|
| - const Smi& lhs_index = Smi::Handle(lhs_index_raw);
|
| - const Smi& rhs_index = Smi::Handle(rhs_index_raw);
|
| - const Smi& length = Smi::Handle(length_raw);
|
| -
|
| - // TODO(zerny): Optimize as single instance. V8 has this as an
|
| - // isolate member.
|
| - unibrow::Mapping<unibrow::Ecma262Canonicalize> canonicalize;
|
| -
|
| - for (intptr_t i = 0; i < length.Value(); i++) {
|
| - int32_t c1 = str.CharAt(lhs_index.Value() + i);
|
| - int32_t c2 = str.CharAt(rhs_index.Value() + i);
|
| - if (c1 != c2) {
|
| - int32_t s1[1] = {c1};
|
| - canonicalize.get(c1, '\0', s1);
|
| - if (s1[0] != c2) {
|
| - int32_t s2[1] = {c2};
|
| - canonicalize.get(c2, '\0', s2);
|
| - if (s1[0] != s2[0]) {
|
| - return Bool::False().raw();
|
| - }
|
| - }
|
| - }
|
| - }
|
| - return Bool::True().raw();
|
| -}
|
| -
|
| -
|
| -DEFINE_RAW_LEAF_RUNTIME_ENTRY(
|
| - CaseInsensitiveCompareUC16,
|
| - 4,
|
| - false /* is_float */,
|
| - reinterpret_cast<RuntimeFunction>(&CaseInsensitiveCompareUC16));
|
| -
|
| -
|
| LocalVariable* IRRegExpMacroAssembler::Parameter(const String& name,
|
| intptr_t index) const {
|
| LocalVariable* local =
|
|
|