Change UString constructors to match those in WTF::String.
This changes behaviour of UString((char*)0) to create null
strings, akin to UString() rather than UString::empty().
(This matches String). Remove unused constructors from
UString, and add null-terminated UTF-16 constructor, to
match String. Move String's constructor into the .cpp to
match UString.
Reviewed by Sam Weinig
* JavaScriptCore.exp:
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::calculatedFunctionName):
* runtime/RegExpKey.h:
(JSC::RegExpKey::RegExpKey):
* runtime/SmallStrings.cpp:
(JSC::SmallStrings::createSingleCharacterString):
* runtime/UString.cpp:
(JSC::UString::UString):
* runtime/UString.h:
(JSC::UString::UString):
(JSC::UString::swap):
(JSC::UString::adopt):
(JSC::UString::operator[]):
* wtf/text/WTFString.h:
(WTF::String::String):
(WTF::String::adopt):
(WTF::String::operator[]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/runtime/RegExpKey.h b/JavaScriptCore/runtime/RegExpKey.h
index dccad08..e2ea100 100644
--- a/JavaScriptCore/runtime/RegExpKey.h
+++ b/JavaScriptCore/runtime/RegExpKey.h
@@ -58,6 +58,12 @@
{
}
+ RegExpKey(int flags, const RefPtr<StringImpl>& pattern)
+ : flagsValue(flags)
+ , pattern(pattern)
+ {
+ }
+
RegExpKey(const UString& flags, const UString& pattern)
: pattern(pattern.impl())
{