Commit c562dc6b authored by mjs's avatar mjs

Reduced the size of ValueImp by 8 bytes for a .5% speedup.

        * kjs/value.h: Removed destructed flag. Made refcount and flag 16
	bits each.
        * kjs/value.cpp:
        (ValueImp::~ValueImp): Don't set destructed flag.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c1486f33
2002-11-20 Maciej Stachowiak <mjs@apple.com>
Reduced the size of ValueImp by 8 bytes for a .5% speedup.
* kjs/value.h: Removed destructed flag. Made refcount and flag 16
bits each.
* kjs/value.cpp:
(ValueImp::~ValueImp): Don't set destructed flag.
2002-11-20 Darin Adler <darin@apple.com>
* kjs/types.cpp: Keep ref count for the whole lists of nodes.
......
2002-11-20 Maciej Stachowiak <mjs@apple.com>
Reduced the size of ValueImp by 8 bytes for a .5% speedup.
* kjs/value.h: Removed destructed flag. Made refcount and flag 16
bits each.
* kjs/value.cpp:
(ValueImp::~ValueImp): Don't set destructed flag.
2002-11-20 Darin Adler <darin@apple.com>
* kjs/types.cpp: Keep ref count for the whole lists of nodes.
......
2002-11-20 Maciej Stachowiak <mjs@apple.com>
Reduced the size of ValueImp by 8 bytes for a .5% speedup.
* kjs/value.h: Removed destructed flag. Made refcount and flag 16
bits each.
* kjs/value.cpp:
(ValueImp::~ValueImp): Don't set destructed flag.
2002-11-20 Darin Adler <darin@apple.com>
* kjs/types.cpp: Keep ref count for the whole lists of nodes.
......
......@@ -53,7 +53,6 @@ ValueImp::ValueImp() :
ValueImp::~ValueImp()
{
//fprintf(stderr,"ValueImp::~ValueImp %p\n",(void*)this);
_flags |= VI_DESTRUCTED;
}
void ValueImp::mark()
......
......@@ -95,7 +95,6 @@ namespace KJS {
ValueImp* ref() { if (!SimpleNumber::is(this)) refcount++; return this; }
bool deref() { if (SimpleNumber::is(this)) return false; else return (!--refcount); }
unsigned int refcount;
virtual void mark();
bool marked() const;
......@@ -127,7 +126,11 @@ namespace KJS {
bool dispatchToUInt32(unsigned&) const;
Object dispatchToObject(ExecState *exec) const;
unsigned short int refcount;
private:
unsigned short int _flags;
virtual Type type() const = 0;
// The conversion operations
......@@ -142,13 +145,9 @@ namespace KJS {
enum {
VI_MARKED = 1,
VI_GCALLOWED = 2,
VI_CREATED = 4,
VI_DESTRUCTED = 8
VI_CREATED = 4
}; // VI means VALUEIMPL
ValueImpPrivate *_vd;
unsigned int _flags;
// Give a compile time error if we try to copy one of these.
ValueImp(const ValueImp&);
ValueImp& operator=(const ValueImp&);
......
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