summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/runtime/RegExpKey.h
diff options
context:
space:
mode:
Diffstat (limited to 'JavaScriptCore/runtime/RegExpKey.h')
-rw-r--r--JavaScriptCore/runtime/RegExpKey.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/JavaScriptCore/runtime/RegExpKey.h b/JavaScriptCore/runtime/RegExpKey.h
index e5ab438..2bbdb07 100644
--- a/JavaScriptCore/runtime/RegExpKey.h
+++ b/JavaScriptCore/runtime/RegExpKey.h
@@ -76,13 +76,8 @@ struct RegExpKey {
return flagsValue;
}
};
-} // namespace JSC
-
-namespace WTF {
-template<typename T> struct DefaultHash;
-template<typename T> struct RegExpHash;
-inline bool operator==(const JSC::RegExpKey& a, const JSC::RegExpKey& b)
+inline bool operator==(const RegExpKey& a, const RegExpKey& b)
{
if (a.flagsValue != b.flagsValue)
return false;
@@ -93,6 +88,12 @@ inline bool operator==(const JSC::RegExpKey& a, const JSC::RegExpKey& b)
return equal(a.pattern.get(), b.pattern.get());
}
+} // namespace JSC
+
+namespace WTF {
+template<typename T> struct DefaultHash;
+template<typename T> struct RegExpHash;
+
template<> struct RegExpHash<JSC::RegExpKey> {
static unsigned hash(const JSC::RegExpKey& key) { return key.pattern->hash(); }
static bool equal(const JSC::RegExpKey& a, const JSC::RegExpKey& b) { return a == b; }