diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h index 62f49c8bad..a6b0b169af 100644 --- a/js/src/jit/MIR.h +++ b/js/src/jit/MIR.h @@ -7064,10 +7064,8 @@ class MRegExpMatcher TRIVIAL_NEW_WRAPPERS NAMED_OPERANDS((0, regexp), (1, string), (2, lastIndex)) - MOZ_MUST_USE bool writeRecoverData(CompactBufferWriter& writer) const override; - bool canRecoverOnBailout() const override { - return true; + return false; } bool possiblyCalls() const override { @@ -7102,7 +7100,7 @@ class MRegExpSearcher MOZ_MUST_USE bool writeRecoverData(CompactBufferWriter& writer) const override; bool canRecoverOnBailout() const override { - return true; + return false; } bool possiblyCalls() const override { diff --git a/js/src/jit/Recover.cpp b/js/src/jit/Recover.cpp index 4d04c653be..6144462b4d 100644 --- a/js/src/jit/Recover.cpp +++ b/js/src/jit/Recover.cpp @@ -13,7 +13,6 @@ #include "jsobj.h" #include "jsstr.h" -#include "builtin/RegExp.h" #include "builtin/TypedObject.h" #include "gc/Heap.h" @@ -1082,32 +1081,6 @@ RNaNToZero::recover(JSContext* cx, SnapshotIterator& iter) const return true; } -bool -MRegExpMatcher::writeRecoverData(CompactBufferWriter& writer) const -{ - MOZ_ASSERT(canRecoverOnBailout()); - writer.writeUnsigned(uint32_t(RInstruction::Recover_RegExpMatcher)); - return true; -} - -RRegExpMatcher::RRegExpMatcher(CompactBufferReader& reader) -{} - -bool -RRegExpMatcher::recover(JSContext* cx, SnapshotIterator& iter) const -{ - RootedObject regexp(cx, &iter.read().toObject()); - RootedString input(cx, iter.read().toString()); - int32_t lastIndex = iter.read().toInt32(); - - RootedValue result(cx); - if (!RegExpMatcherRaw(cx, regexp, input, lastIndex, nullptr, &result)) - return false; - - iter.storeInstructionResult(result); - return true; -} - bool MRegExpSearcher::writeRecoverData(CompactBufferWriter& writer) const { diff --git a/js/src/jit/Recover.h b/js/src/jit/Recover.h index 1f58e6b06b..78776178b6 100644 --- a/js/src/jit/Recover.h +++ b/js/src/jit/Recover.h @@ -90,7 +90,6 @@ namespace jit { _(Random) \ _(StringSplit) \ _(NaNToZero) \ - _(RegExpMatcher) \ _(RegExpSearcher) \ _(RegExpTester) \ _(StringReplace) \ @@ -486,14 +485,6 @@ class RNaNToZero final : public RInstruction bool recover(JSContext* cx, SnapshotIterator& iter) const; }; -class RRegExpMatcher final : public RInstruction -{ - public: - RINSTRUCTION_HEADER_NUM_OP_(RegExpMatcher, 3) - - MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const; -}; - class RRegExpSearcher final : public RInstruction { public: