Bug 1055402 - Remove RegExp.test cache, add a more robust match only mode to irregexp, r=jandem.

This commit is contained in:
Brian Hackett
2014-09-12 07:12:49 -07:00
parent 69b233a1d6
commit 4484c5f4e8
22 changed files with 226 additions and 318 deletions

View File

@@ -402,22 +402,6 @@ js::AtomizeString(ExclusiveContext *cx, JSString *str,
: AtomizeAndCopyChars(cx, linear->twoByteChars(nogc), linear->length(), ib);
}
JSAtom *
js::AtomizeSubstring(ExclusiveContext *cx, JSString *str, size_t start, size_t length,
InternBehavior ib /* = DoNotInternAtom */)
{
JS_ASSERT(start + length <= str->length());
JSLinearString *linear = str->ensureLinear(cx);
if (!linear)
return nullptr;
JS::AutoCheckCannotGC nogc;
return linear->hasLatin1Chars()
? AtomizeAndCopyChars(cx, linear->latin1Chars(nogc) + start, length, ib)
: AtomizeAndCopyChars(cx, linear->twoByteChars(nogc) + start, length, ib);
}
JSAtom *
js::Atomize(ExclusiveContext *cx, const char *bytes, size_t length, InternBehavior ib)
{