Commit e56c6da0 authored by darin's avatar darin

- someone somewhere must be defining a macro named check, causing a compile failure in WebCore

	Rename check() to checkConsistency().

        * kjs/property_map.h: Rename.
        * kjs/property_map.cpp: Yes, rename.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d579f5b7
2002-11-21 Darin Adler <darin@apple.com>
- someone somewhere must be defining a macro named check, causing a compile failure in WebCore
Rename check() to checkConsistency().
* kjs/property_map.h: Rename.
* kjs/property_map.cpp: Yes, rename.
2002-11-21 Darin Adler <darin@apple.com>
- add self-check to property map in hopes of finding the cnet.com bug
......
2002-11-21 Darin Adler <darin@apple.com>
- someone somewhere must be defining a macro named check, causing a compile failure in WebCore
Rename check() to checkConsistency().
* kjs/property_map.h: Rename.
* kjs/property_map.cpp: Yes, rename.
2002-11-21 Darin Adler <darin@apple.com>
- add self-check to property map in hopes of finding the cnet.com bug
......
2002-11-21 Darin Adler <darin@apple.com>
- someone somewhere must be defining a macro named check, causing a compile failure in WebCore
Rename check() to checkConsistency().
* kjs/property_map.h: Rename.
* kjs/property_map.cpp: Yes, rename.
2002-11-21 Darin Adler <darin@apple.com>
- add self-check to property map in hopes of finding the cnet.com bug
......
......@@ -25,13 +25,13 @@
#include "object.h"
#include "reference_list.h"
#define DO_CONSISTENCY_CHECK 0
#define DO_CONSISTENCY_CHECK 1
// At the time I added this switch, the optimization still gave a 1.5% performance boost so I couldn't remove it.
#define USE_SINGLE_ENTRY 1
#if !DO_CONSISTENCY_CHECK
#define check() ((void)0)
#define checkConsistency() ((void)0)
#endif
namespace KJS {
......@@ -137,7 +137,7 @@ ValueImp *PropertyMap::get(const Identifier &name) const
void PropertyMap::put(const Identifier &name, ValueImp *value, int attributes)
{
check();
checkConsistency();
UString::Rep *rep = name._ustring.rep;
......@@ -155,7 +155,7 @@ void PropertyMap::put(const Identifier &name, ValueImp *value, int attributes)
_singleEntry.value = value;
_singleEntry.attributes = attributes;
_keyCount = 1;
check();
checkConsistency();
return;
}
}
......@@ -182,7 +182,7 @@ void PropertyMap::put(const Identifier &name, ValueImp *value, int attributes)
_table[i].attributes = attributes;
++_keyCount;
check();
checkConsistency();
}
inline void PropertyMap::insert(UString::Rep *key, ValueImp *value, int attributes)
......@@ -198,7 +198,7 @@ inline void PropertyMap::insert(UString::Rep *key, ValueImp *value, int attribut
void PropertyMap::expand()
{
check();
checkConsistency();
int oldTableSize = _tableSize;
Entry *oldTable = _table;
......@@ -223,12 +223,12 @@ void PropertyMap::expand()
free(oldTable);
check();
checkConsistency();
}
void PropertyMap::remove(const Identifier &name)
{
check();
checkConsistency();
UString::Rep *rep = name._ustring.rep;
......@@ -241,7 +241,7 @@ void PropertyMap::remove(const Identifier &name)
key->deref();
_singleEntry.key = 0;
_keyCount = 0;
check();
checkConsistency();
}
#endif
return;
......@@ -272,7 +272,7 @@ void PropertyMap::remove(const Identifier &name)
insert(key, _table[i].value, _table[i].attributes);
}
check();
checkConsistency();
}
void PropertyMap::mark() const
......@@ -350,7 +350,7 @@ void PropertyMap::restore(const SavedProperties &p)
#if DO_CONSISTENCY_CHECK
void PropertyMap::check()
void PropertyMap::checkConsistency()
{
int count = 0;
for (int j = 0; j != _tableSize; ++j) {
......
......@@ -80,7 +80,7 @@ namespace KJS {
void insert(UString::Rep *, ValueImp *value, int attributes);
void check();
void checkConsistency();
typedef PropertyMapHashTableEntry Entry;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment