Bug 714264 - Move declarations around such that it's possible to include jsprvtd.h before Vector.h or HashTable.h. r=luke

--HG--
extra : rebase_source : e981944be5edf5c772df986d0898494b9bc53a3e
This commit is contained in:
Jeff Walden 2012-01-02 16:34:25 -06:00
parent 527c0cdf82
commit c9f5077db7
3 changed files with 17 additions and 23 deletions

View File

@ -48,6 +48,8 @@
namespace js {
class TempAllocPolicy;
/* Integral types for all hash functions. */
typedef uint32_t HashNumber;
@ -958,7 +960,10 @@ struct IsPodType<HashMapEntry<K, V> >
* called by HashMap must not call back into the same HashMap object.
* N.B: Due to the lack of exception handling, the user must call |init()|.
*/
template <class Key, class Value, class HashPolicy, class AllocPolicy>
template <class Key,
class Value,
class HashPolicy = DefaultHasher<Key>,
class AllocPolicy = TempAllocPolicy>
class HashMap
{
public:
@ -1200,7 +1205,7 @@ class HashMap
* HashSet must not call back into the same HashSet object.
* N.B: Due to the lack of exception handling, the user must call |init()|.
*/
template <class T, class HashPolicy, class AllocPolicy>
template <class T, class HashPolicy = DefaultHasher<T>, class AllocPolicy = TempAllocPolicy>
class HashSet
{
typedef typename HashPolicy::Lookup Lookup;

View File

@ -54,7 +54,11 @@
namespace js {
template <class T, size_t N, class AllocPolicy>
class TempAllocPolicy;
template <class T,
size_t MinInlineCapacity = 0,
class AllocPolicy = TempAllocPolicy>
class Vector;
/*

View File

@ -55,9 +55,13 @@
*/
#include "jsapi.h"
#include "jsutil.h"
#ifdef __cplusplus
#include "js/HashTable.h"
#include "js/Vector.h"
#endif
JS_BEGIN_EXTERN_C
/*
@ -188,25 +192,6 @@ class RuntimeAllocPolicy;
class GlobalObject;
template <class T,
size_t MinInlineCapacity = 0,
class AllocPolicy = TempAllocPolicy>
class Vector;
template <class>
struct DefaultHasher;
template <class Key,
class Value,
class HashPolicy = DefaultHasher<Key>,
class AllocPolicy = TempAllocPolicy>
class HashMap;
template <class T,
class HashPolicy = DefaultHasher<T>,
class AllocPolicy = TempAllocPolicy>
class HashSet;
template <typename K,
typename V,
size_t InlineElems>