mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Backout changeset 9e38c5518605, fc59bd8d49ba, d0ba1abde985, and acf91f25f228 (bugs 796119, 796279, and 797106) because of broken reftests on 64-bit platforms
This commit is contained in:
parent
c2fddb8f07
commit
bd2885b68c
@ -17,7 +17,6 @@
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "nsUTF8Utils.h"
|
||||
#include "mozilla/SSE.h"
|
||||
#include "nsTextFragmentImpl.h"
|
||||
|
||||
#define TEXTFRAG_WHITE_AFTER_NEWLINE 50
|
||||
#define TEXTFRAG_MAX_NEWLINES 7
|
||||
@ -118,10 +117,18 @@ nsTextFragment::operator=(const nsTextFragment& aOther)
|
||||
static inline int32_t
|
||||
FirstNon8BitUnvectorized(const PRUnichar *str, const PRUnichar *end)
|
||||
{
|
||||
typedef Non8BitParameters<sizeof(size_t)> p;
|
||||
const size_t mask = p::mask;
|
||||
const uint32_t alignMask = p::alignMask;
|
||||
const uint32_t numUnicharsPerWord = p::numUnicharsPerWord;
|
||||
#if PR_BYTES_PER_WORD == 4
|
||||
const size_t mask = 0xff00ff00;
|
||||
const uint32_t alignMask = 0x3;
|
||||
const uint32_t numUnicharsPerWord = 2;
|
||||
#elif PR_BYTES_PER_WORD == 8
|
||||
const size_t mask = 0xff00ff00ff00ff00;
|
||||
const uint32_t alignMask = 0x7;
|
||||
const uint32_t numUnicharsPerWord = 4;
|
||||
#else
|
||||
#error Unknown platform!
|
||||
#endif
|
||||
|
||||
const int32_t len = end - str;
|
||||
int32_t i = 0;
|
||||
|
||||
|
@ -1,24 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef nsTextFragmentImpl_h__
|
||||
#define nsTextFragmentImpl_h__
|
||||
|
||||
#include "mozilla/StandardInteger.h"
|
||||
|
||||
template<size_t size> struct Non8BitParameters;
|
||||
template<> struct Non8BitParameters<4> {
|
||||
static const size_t mask = 0xff00ff00;
|
||||
static const uint32_t alignMask = 0x3;
|
||||
static const uint32_t numUnicharsPerWord = 2;
|
||||
};
|
||||
|
||||
template<> struct Non8BitParameters<8> {
|
||||
static const size_t mask = 0xff00ff00ff00ff0;
|
||||
static const uint32_t alignMask = 0x7;
|
||||
static const uint32_t numUnicharsPerWord = 4;
|
||||
};
|
||||
|
||||
#endif
|
@ -8,7 +8,6 @@
|
||||
#include <emmintrin.h>
|
||||
#include "nscore.h"
|
||||
#include "nsAlgorithm.h"
|
||||
#include "nsTextFragmentImpl.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace SSE2 {
|
||||
@ -24,9 +23,17 @@ int32_t
|
||||
FirstNon8Bit(const PRUnichar *str, const PRUnichar *end)
|
||||
{
|
||||
const uint32_t numUnicharsPerVector = 8;
|
||||
typedef Non8BitParameters<sizeof(size_t)> p;
|
||||
const size_t mask = p::mask;
|
||||
const uint32_t numUnicharsPerWord = p::numUnicharsPerWord;
|
||||
|
||||
#if PR_BYTES_PER_WORD == 4
|
||||
const size_t mask = 0xff00ff00;
|
||||
const uint32_t numUnicharsPerWord = 2;
|
||||
#elif PR_BYTES_PER_WORD == 8
|
||||
const size_t mask = 0xff00ff00ff00ff00;
|
||||
const uint32_t numUnicharsPerWord = 4;
|
||||
#else
|
||||
#error Unknown platform!
|
||||
#endif
|
||||
|
||||
const int32_t len = end - str;
|
||||
int32_t i = 0;
|
||||
|
||||
|
@ -85,10 +85,6 @@ enum {
|
||||
eCSSAliasCount
|
||||
};
|
||||
|
||||
// Use a macro in the definitions below to ensure compile-time constants
|
||||
// in all the necessary places.
|
||||
#define CSS_MAX(x, y) ((x) > (y) ? (x) : (y))
|
||||
|
||||
enum {
|
||||
// We want the largest sizeof(#aliasname_). To find that, we use the
|
||||
// auto-incrementing behavior of C++ enums (a value without an
|
||||
@ -102,7 +98,7 @@ enum {
|
||||
#define CSS_PROP_ALIAS(aliasname_, propid_, aliasmethod_, pref_) \
|
||||
eMaxCSSAliasNameSizeBefore_##aliasmethod_, \
|
||||
eMaxCSSAliasNameSizeWith_##aliasmethod_ = \
|
||||
CSS_MAX(sizeof(#aliasname_), eMaxCSSAliasNameSizeBefore_##aliasmethod_) - 1,
|
||||
PR_MAX(sizeof(#aliasname_), eMaxCSSAliasNameSizeBefore_##aliasmethod_) - 1,
|
||||
#include "nsCSSPropAliasList.h"
|
||||
#undef CSS_PROP_ALIAS
|
||||
|
||||
@ -110,20 +106,18 @@ enum {
|
||||
};
|
||||
|
||||
struct CSSPropertyAlias {
|
||||
const char name[CSS_MAX(eMaxCSSAliasNameSize, 1)];
|
||||
const char name[PR_MAX(eMaxCSSAliasNameSize, 1)];
|
||||
const nsCSSProperty id;
|
||||
bool enabled;
|
||||
};
|
||||
|
||||
static CSSPropertyAlias gAliases[CSS_MAX(eCSSAliasCount, 1)] = {
|
||||
static CSSPropertyAlias gAliases[PR_MAX(eCSSAliasCount, 1)] = {
|
||||
#define CSS_PROP_ALIAS(aliasname_, propid_, aliasmethod_, pref_) \
|
||||
{ #aliasname_, eCSSProperty_##propid_, true },
|
||||
#include "nsCSSPropAliasList.h"
|
||||
#undef CSS_PROP_ALIAS
|
||||
};
|
||||
|
||||
#undef CSS_MAX
|
||||
|
||||
void
|
||||
nsCSSProps::AddRefTable(void)
|
||||
{
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
#include "nscore.h"
|
||||
#include <mozilla/StandardInteger.h>
|
||||
#include "prtypes.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -6,6 +6,7 @@
|
||||
#define mozilla_BinaryPath_h
|
||||
|
||||
#include "nsXPCOMPrivate.h" // for MAXPATHLEN
|
||||
#include "prtypes.h"
|
||||
#ifdef XP_WIN
|
||||
#include <windows.h>
|
||||
#elif defined(XP_MACOSX)
|
||||
|
@ -6,6 +6,7 @@
|
||||
#ifndef _nsXULAppAPI_h__
|
||||
#define _nsXULAppAPI_h__
|
||||
|
||||
#include "prtypes.h"
|
||||
#include "nsID.h"
|
||||
#include "xrecore.h"
|
||||
#include "nsXPCOM.h"
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <ctype.h>
|
||||
#include "plstr.h"
|
||||
#include "nscore.h"
|
||||
#include "prtypes.h"
|
||||
#include "nsCppSharedAllocator.h"
|
||||
#include "nsCRTGlue.h"
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
#ifndef nsHashtable_h__
|
||||
#define nsHashtable_h__
|
||||
|
||||
#include "prtypes.h"
|
||||
#include "pldhash.h"
|
||||
#include "prlock.h"
|
||||
#include "nscore.h"
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
|
||||
#include "nsStringEnumerator.h"
|
||||
#include "prtypes.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsString.h"
|
||||
#include "nsReadableUtils.h"
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include "prprf.h"
|
||||
#endif
|
||||
|
||||
#include "prtypes.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
/**
|
||||
|
@ -34,6 +34,7 @@
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "prtypes.h"
|
||||
#include "nsAlgorithm.h"
|
||||
#include "nsQuickSort.h"
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
#ifndef nsQuickSort_h___
|
||||
#define nsQuickSort_h___
|
||||
|
||||
#include "prtypes.h"
|
||||
#include "nscore.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "prtypes.h"
|
||||
#include "nsAlgorithm.h"
|
||||
#include "nscore.h"
|
||||
#include "nsQuickSort.h"
|
||||
@ -1348,9 +1349,7 @@ private:
|
||||
// __attribute__((aligned(foo))).
|
||||
union {
|
||||
char mAutoBuf[sizeof(nsTArrayHeader) + N * sizeof(elem_type)];
|
||||
// Do the max operation inline to ensure that it is a compile-time constant.
|
||||
mozilla::AlignedElem<(MOZ_ALIGNOF(Header) > MOZ_ALIGNOF(elem_type))
|
||||
? MOZ_ALIGNOF(Header) : MOZ_ALIGNOF(elem_type)> mAlign;
|
||||
mozilla::AlignedElem<PR_MAX(MOZ_ALIGNOF(Header), MOZ_ALIGNOF(elem_type))> mAlign;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
#define nsTHashtable_h__
|
||||
|
||||
#include "nscore.h"
|
||||
#include "prtypes.h"
|
||||
#include "pldhash.h"
|
||||
#include "nsDebug.h"
|
||||
#include NEW_H
|
||||
|
@ -31,7 +31,7 @@ extern "C" {
|
||||
|
||||
/* Table size limit, do not equal or exceed (see min&maxAlphaFrac, below). */
|
||||
#undef PL_DHASH_SIZE_LIMIT
|
||||
#define PL_DHASH_SIZE_LIMIT ((uint32_t)1 << 24)
|
||||
#define PL_DHASH_SIZE_LIMIT PR_BIT(24)
|
||||
|
||||
/* Minimum table size, or gross entry count (net is at most .75 loaded). */
|
||||
#ifndef PL_DHASH_MIN_SIZE
|
||||
@ -202,8 +202,7 @@ struct PLDHashTable {
|
||||
* We store hashShift rather than sizeLog2 to optimize the collision-free case
|
||||
* in SearchTable.
|
||||
*/
|
||||
#define PL_DHASH_TABLE_SIZE(table) \
|
||||
((uint32_t)1 << (PL_DHASH_BITS - (table)->hashShift))
|
||||
#define PL_DHASH_TABLE_SIZE(table) PR_BIT(PL_DHASH_BITS - (table)->hashShift)
|
||||
|
||||
/*
|
||||
* Table space at entryStore is allocated and freed using these callbacks.
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "nsISimpleEnumerator.h"
|
||||
#include "nsIDirectoryEnumerator.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "prtypes.h"
|
||||
#include "prio.h"
|
||||
|
||||
#include "nsReadableUtils.h"
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
#include "nsISimpleEnumerator.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "prtypes.h"
|
||||
#include "prio.h"
|
||||
#include "private/pprio.h" // To get PR_ImportFile
|
||||
#include "prprf.h"
|
||||
|
@ -14,6 +14,7 @@
|
||||
# define NS_InvokeByIndex NS_InvokeByIndex_P
|
||||
#endif
|
||||
|
||||
#include "prtypes.h"
|
||||
#include "nscore.h"
|
||||
#include "nsISupports.h"
|
||||
#include "xpt_struct.h"
|
||||
|
@ -8,6 +8,7 @@
|
||||
#ifndef xptiinfo_h___
|
||||
#define xptiinfo_h___
|
||||
|
||||
#include "prtypes.h"
|
||||
#include "nscore.h"
|
||||
#include "xpt_struct.h"
|
||||
|
||||
|
@ -11,6 +11,11 @@
|
||||
// for |nsCharSourceTraits|, |nsCharSinkTraits|
|
||||
#endif
|
||||
|
||||
#ifndef prtypes_h___
|
||||
#include "prtypes.h"
|
||||
// for |uint32_t|...
|
||||
#endif
|
||||
|
||||
#ifndef nsDebug_h___
|
||||
#include "nsDebug.h"
|
||||
// for NS_ASSERTION
|
||||
|
@ -21,9 +21,6 @@
|
||||
#include "nsReadableUtils.h"
|
||||
#endif
|
||||
|
||||
// For PRUnichar
|
||||
#include "prtypes.h"
|
||||
|
||||
#include NEW_H
|
||||
|
||||
// enable support for the obsolete string API if not explicitly disabled
|
||||
|
Loading…
Reference in New Issue
Block a user