mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backout changeset 788a51ef6221 (bug 800106) because of Windows XP Kraken regression
This commit is contained in:
parent
dc9b1921da
commit
fb83dd24c3
@ -36,7 +36,7 @@ static const uint8_t gASCIIToLower [128] = {
|
|||||||
// We want ToLowerCase(uint32_t) and ToLowerCaseASCII(uint32_t) to be fast
|
// We want ToLowerCase(uint32_t) and ToLowerCaseASCII(uint32_t) to be fast
|
||||||
// when they're called from within the case-insensitive comparators, so we
|
// when they're called from within the case-insensitive comparators, so we
|
||||||
// define inlined versions.
|
// define inlined versions.
|
||||||
static MOZ_ALWAYS_INLINE uint32_t
|
static NS_ALWAYS_INLINE uint32_t
|
||||||
ToLowerCase_inline(uint32_t aChar)
|
ToLowerCase_inline(uint32_t aChar)
|
||||||
{
|
{
|
||||||
if (IS_ASCII(aChar)) {
|
if (IS_ASCII(aChar)) {
|
||||||
@ -46,7 +46,7 @@ ToLowerCase_inline(uint32_t aChar)
|
|||||||
return mozilla::unicode::GetLowercase(aChar);
|
return mozilla::unicode::GetLowercase(aChar);
|
||||||
}
|
}
|
||||||
|
|
||||||
static MOZ_ALWAYS_INLINE uint32_t
|
static NS_ALWAYS_INLINE uint32_t
|
||||||
ToLowerCaseASCII_inline(const uint32_t aChar)
|
ToLowerCaseASCII_inline(const uint32_t aChar)
|
||||||
{
|
{
|
||||||
if (IS_ASCII(aChar)) {
|
if (IS_ASCII(aChar)) {
|
||||||
@ -271,7 +271,7 @@ CaseInsensitiveCompare(const PRUnichar *a,
|
|||||||
// the end of the string (as marked by aEnd), returns -1 and does not set
|
// the end of the string (as marked by aEnd), returns -1 and does not set
|
||||||
// aNext. Note that this function doesn't check that aStr < aEnd -- it assumes
|
// aNext. Note that this function doesn't check that aStr < aEnd -- it assumes
|
||||||
// you've done that already.
|
// you've done that already.
|
||||||
static MOZ_ALWAYS_INLINE uint32_t
|
static NS_ALWAYS_INLINE uint32_t
|
||||||
GetLowerUTF8Codepoint(const char* aStr, const char* aEnd, const char **aNext)
|
GetLowerUTF8Codepoint(const char* aStr, const char* aEnd, const char **aNext)
|
||||||
{
|
{
|
||||||
// Convert to unsigned char so that stuffing chars into PRUint32s doesn't
|
// Convert to unsigned char so that stuffing chars into PRUint32s doesn't
|
||||||
|
@ -65,7 +65,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<int N>
|
template<int N>
|
||||||
MOZ_ALWAYS_INLINE already_AddRefed<StatementType>
|
NS_ALWAYS_INLINE already_AddRefed<StatementType>
|
||||||
GetCachedStatement(const char (&aQuery)[N])
|
GetCachedStatement(const char (&aQuery)[N])
|
||||||
{
|
{
|
||||||
nsDependentCString query(aQuery, N - 1);
|
nsDependentCString query(aQuery, N - 1);
|
||||||
|
@ -44,7 +44,7 @@ namespace {
|
|||||||
* @return a pointer to the next word boundary after aStart
|
* @return a pointer to the next word boundary after aStart
|
||||||
*/
|
*/
|
||||||
static
|
static
|
||||||
MOZ_ALWAYS_INLINE const_char_iterator
|
NS_ALWAYS_INLINE const_char_iterator
|
||||||
nextWordBoundary(const_char_iterator const aStart,
|
nextWordBoundary(const_char_iterator const aStart,
|
||||||
const_char_iterator const aNext,
|
const_char_iterator const aNext,
|
||||||
const_char_iterator const aEnd) {
|
const_char_iterator const aEnd) {
|
||||||
@ -76,7 +76,7 @@ namespace {
|
|||||||
* findAnywhere and findOnBoundary do almost the same thing, so it's natural
|
* findAnywhere and findOnBoundary do almost the same thing, so it's natural
|
||||||
* to implement them in terms of a single function. They're both
|
* to implement them in terms of a single function. They're both
|
||||||
* performance-critical functions, however, and checking aBehavior makes them
|
* performance-critical functions, however, and checking aBehavior makes them
|
||||||
* a bit slower. Our solution is to define findInString as MOZ_ALWAYS_INLINE
|
* a bit slower. Our solution is to define findInString as NS_ALWAYS_INLINE
|
||||||
* and rely on the compiler to optimize out the aBehavior check.
|
* and rely on the compiler to optimize out the aBehavior check.
|
||||||
*
|
*
|
||||||
* @param aToken
|
* @param aToken
|
||||||
@ -91,7 +91,7 @@ namespace {
|
|||||||
* @return true if aToken was found in aSourceString, false otherwise.
|
* @return true if aToken was found in aSourceString, false otherwise.
|
||||||
*/
|
*/
|
||||||
static
|
static
|
||||||
MOZ_ALWAYS_INLINE bool
|
NS_ALWAYS_INLINE bool
|
||||||
findInString(const nsDependentCSubstring &aToken,
|
findInString(const nsDependentCSubstring &aToken,
|
||||||
const nsACString &aSourceString,
|
const nsACString &aSourceString,
|
||||||
FindInStringBehavior aBehavior)
|
FindInStringBehavior aBehavior)
|
||||||
|
@ -286,7 +286,7 @@ class ConvertUTF8toUTF16
|
|||||||
|
|
||||||
bool ErrorEncountered() const { return mErrorEncountered; }
|
bool ErrorEncountered() const { return mErrorEncountered; }
|
||||||
|
|
||||||
void MOZ_ALWAYS_INLINE write( const value_type* start, uint32_t N )
|
void NS_ALWAYS_INLINE write( const value_type* start, uint32_t N )
|
||||||
{
|
{
|
||||||
if ( mErrorEncountered )
|
if ( mErrorEncountered )
|
||||||
return;
|
return;
|
||||||
@ -345,7 +345,7 @@ class CalculateUTF8Length
|
|||||||
|
|
||||||
size_t Length() const { return mLength; }
|
size_t Length() const { return mLength; }
|
||||||
|
|
||||||
void MOZ_ALWAYS_INLINE write( const value_type* start, uint32_t N )
|
void NS_ALWAYS_INLINE write( const value_type* start, uint32_t N )
|
||||||
{
|
{
|
||||||
// ignore any further requests
|
// ignore any further requests
|
||||||
if ( mErrorEncountered )
|
if ( mErrorEncountered )
|
||||||
@ -449,7 +449,7 @@ class ConvertUTF16toUTF8
|
|||||||
|
|
||||||
size_t Size() const { return mBuffer - mStart; }
|
size_t Size() const { return mBuffer - mStart; }
|
||||||
|
|
||||||
void MOZ_ALWAYS_INLINE write( const value_type* start, uint32_t N )
|
void NS_ALWAYS_INLINE write( const value_type* start, uint32_t N )
|
||||||
{
|
{
|
||||||
buffer_type *out = mBuffer; // gcc isn't smart enough to do this!
|
buffer_type *out = mBuffer; // gcc isn't smart enough to do this!
|
||||||
|
|
||||||
@ -566,7 +566,7 @@ class CalculateUTF8Size
|
|||||||
|
|
||||||
size_t Size() const { return mSize; }
|
size_t Size() const { return mSize; }
|
||||||
|
|
||||||
void MOZ_ALWAYS_INLINE write( const value_type* start, uint32_t N )
|
void NS_ALWAYS_INLINE write( const value_type* start, uint32_t N )
|
||||||
{
|
{
|
||||||
// Assume UCS2 surrogate pairs won't be spread across fragments.
|
// Assume UCS2 surrogate pairs won't be spread across fragments.
|
||||||
for (const value_type *p = start, *end = start + N; p < end; ++p )
|
for (const value_type *p = start, *end = start + N; p < end; ++p )
|
||||||
|
Loading…
Reference in New Issue
Block a user