Commit 4debf737 authored by mjs's avatar mjs

* kjs/collector.cpp:

        (Collector::allocate): Clear the flags on newly allocated objects.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2788 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 65861942
2002-11-20 Maciej Stachowiak <mjs@apple.com>
* kjs/collector.cpp:
(Collector::allocate): Clear the flags on newly allocated objects.
2002-11-20 Darin Adler <darin@apple.com> 2002-11-20 Darin Adler <darin@apple.com>
- oops, checked in big regression instead of 5% speedup - oops, checked in big regression instead of 5% speedup
......
2002-11-20 Maciej Stachowiak <mjs@apple.com>
* kjs/collector.cpp:
(Collector::allocate): Clear the flags on newly allocated objects.
2002-11-20 Darin Adler <darin@apple.com> 2002-11-20 Darin Adler <darin@apple.com>
- oops, checked in big regression instead of 5% speedup - oops, checked in big regression instead of 5% speedup
......
2002-11-20 Maciej Stachowiak <mjs@apple.com>
* kjs/collector.cpp:
(Collector::allocate): Clear the flags on newly allocated objects.
2002-11-20 Darin Adler <darin@apple.com> 2002-11-20 Darin Adler <darin@apple.com>
- oops, checked in big regression instead of 5% speedup - oops, checked in big regression instead of 5% speedup
......
...@@ -101,7 +101,8 @@ void* Collector::allocate(size_t s) ...@@ -101,7 +101,8 @@ void* Collector::allocate(size_t s)
heap.usedOversizeCells++; heap.usedOversizeCells++;
heap.numLiveObjects++; heap.numLiveObjects++;
return (void *)newCell; ((ValueImp *)(newCell))->_flags = 0;
return newCell;
} }
// slab allocator // slab allocator
...@@ -142,6 +143,8 @@ void* Collector::allocate(size_t s) ...@@ -142,6 +143,8 @@ void* Collector::allocate(size_t s)
targetBlock->bitmap[wordInBitmap] |= (1 << bitInWord); targetBlock->bitmap[wordInBitmap] |= (1 << bitInWord);
targetBlock->usedCells++; targetBlock->usedCells++;
heap.numLiveObjects++; heap.numLiveObjects++;
((ValueImp *)(targetBlock->cells + cellPos))->_flags = 0;
return (void *)(targetBlock->cells + cellPos); return (void *)(targetBlock->cells + cellPos);
} }
} }
......
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