Bug 393364: Patch from Jason Orendorff to restore ability to compile SpiderMonkey with C++ compiler. r=me

This commit is contained in:
igor@mir2.org 2007-08-23 12:02:42 -07:00
parent db29a8ba1b
commit 6e792cb76a

View File

@ -241,8 +241,39 @@ JS_STATIC_ASSERT(ATOM_ENTRY_FLAG_MASK < JSVAL_ALIGN);
#define CLEAR_ATOM_ENTRY_FLAGS(entry, flags) \
((void)((entry)->keyAndFlags &= ~(jsuword)(flags)))
static const JSDHashTableOps DoubleHashOps;
static const JSDHashTableOps StringHashOps;
JS_STATIC_DLL_CALLBACK(JSDHashNumber)
HashDouble(JSDHashTable *table, const void *key);
JS_STATIC_DLL_CALLBACK(JSBool)
MatchDouble(JSDHashTable *table, const JSDHashEntryHdr *hdr, const void *key);
JS_STATIC_DLL_CALLBACK(JSDHashNumber)
HashString(JSDHashTable *table, const void *key);
JS_STATIC_DLL_CALLBACK(JSBool)
MatchString(JSDHashTable *table, const JSDHashEntryHdr *hdr, const void *key);
static const JSDHashTableOps DoubleHashOps = {
JS_DHashAllocTable,
JS_DHashFreeTable,
HashDouble,
MatchDouble,
JS_DHashMoveEntryStub,
JS_DHashClearEntryStub,
JS_DHashFinalizeStub,
NULL
};
static const JSDHashTableOps StringHashOps = {
JS_DHashAllocTable,
JS_DHashFreeTable,
HashString,
MatchString,
JS_DHashMoveEntryStub,
JS_DHashClearEntryStub,
JS_DHashFinalizeStub,
NULL
};
#define IS_DOUBLE_TABLE(table) ((table)->ops == &DoubleHashOps)
#define IS_STRING_TABLE(table) ((table)->ops == &StringHashOps)
@ -314,28 +345,6 @@ MatchString(JSDHashTable *table, const JSDHashEntryHdr *hdr, const void *key)
return js_EqualStrings((JSString *)ATOM_ENTRY_KEY(entry), (JSString *)key);
}
static const JSDHashTableOps DoubleHashOps = {
JS_DHashAllocTable,
JS_DHashFreeTable,
HashDouble,
MatchDouble,
JS_DHashMoveEntryStub,
JS_DHashClearEntryStub,
JS_DHashFinalizeStub,
NULL
};
static const JSDHashTableOps StringHashOps = {
JS_DHashAllocTable,
JS_DHashFreeTable,
HashString,
MatchString,
JS_DHashMoveEntryStub,
JS_DHashClearEntryStub,
JS_DHashFinalizeStub,
NULL
};
/*
* For a browser build from 2007-08-09 after the browser starts up there are
* just 55 double atoms, but over 15000 string atoms. Not to penalize more