summaryrefslogtreecommitdiffstats
path: root/js/src/vm/RegExpObject.h
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2019-07-20 20:43:11 +0000
committerGitHub <noreply@github.com>2019-07-20 20:43:11 +0000
commit779ef307af82035d987744bc5d6fc74e9fb6fac7 (patch)
treef52eaf7c1392997b75b176c82218edba4e856eef /js/src/vm/RegExpObject.h
parent9dce66f58910b0d1363be3a8e3b5232d79692516 (diff)
parent4a0061a3e0976d4001e23d66af04b06af792675f (diff)
downloadUXP-779ef307af82035d987744bc5d6fc74e9fb6fac7.tar
UXP-779ef307af82035d987744bc5d6fc74e9fb6fac7.tar.gz
UXP-779ef307af82035d987744bc5d6fc74e9fb6fac7.tar.lz
UXP-779ef307af82035d987744bc5d6fc74e9fb6fac7.tar.xz
UXP-779ef307af82035d987744bc5d6fc74e9fb6fac7.zip
Merge pull request #1192 from g4jc/parser_tuneup
Issues #816 / #802 - SpiderMonkey Tuneup
Diffstat (limited to 'js/src/vm/RegExpObject.h')
-rw-r--r--js/src/vm/RegExpObject.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/js/src/vm/RegExpObject.h b/js/src/vm/RegExpObject.h
index dc428a973..f1ea101ed 100644
--- a/js/src/vm/RegExpObject.h
+++ b/js/src/vm/RegExpObject.h
@@ -483,7 +483,8 @@ class RegExpObject : public NativeObject
static bool isOriginalFlagGetter(JSNative native, RegExpFlag* mask);
- bool getShared(JSContext* cx, RegExpGuard* g);
+ static MOZ_MUST_USE bool getShared(JSContext* cx, Handle<RegExpObject*> regexp,
+ RegExpGuard* g);
void setShared(RegExpShared& shared) {
MOZ_ASSERT(!maybeShared());
@@ -500,7 +501,8 @@ class RegExpObject : public NativeObject
void initAndZeroLastIndex(HandleAtom source, RegExpFlag flags, ExclusiveContext* cx);
#ifdef DEBUG
- bool dumpBytecode(JSContext* cx, bool match_only, HandleLinearString input);
+ static MOZ_MUST_USE bool dumpBytecode(JSContext* cx, Handle<RegExpObject*> regexp,
+ bool match_only, HandleLinearString input);
#endif
private:
@@ -508,7 +510,8 @@ class RegExpObject : public NativeObject
* Precondition: the syntax for |source| has already been validated.
* Side effect: sets the private field.
*/
- bool createShared(JSContext* cx, RegExpGuard* g);
+ static MOZ_MUST_USE bool createShared(JSContext* cx, Handle<RegExpObject*> regexp,
+ RegExpGuard* g);
RegExpShared* maybeShared() const {
return static_cast<RegExpShared*>(NativeObject::getPrivate(PRIVATE_SLOT));
}
@@ -531,7 +534,7 @@ inline bool
RegExpToShared(JSContext* cx, HandleObject obj, RegExpGuard* g)
{
if (obj->is<RegExpObject>())
- return obj->as<RegExpObject>().getShared(cx, g);
+ return RegExpObject::getShared(cx, obj.as<RegExpObject>(), g);
return Proxy::regexp_toShared(cx, obj, g);
}