2011-05-26 Geoffrey Garen <ggaren@apple.com>
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 May 2011 23:39:22 +0000 (23:39 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 May 2011 23:39:22 +0000 (23:39 +0000)
commit93d658504f0ccee0fc2bc43d09bceeb0c10c9527
tree91f3e28259433f9b03d122f63e8fa680bd65ddde
parentd7523c1f5c596df23f2f581e2c70a6489644a837
2011-05-26  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Oliver Hunt.

        Removed some interdependency between Heap and SmallStrings by simplifying
        the SmallStrings lifetime model
        https://bugs.webkit.org/show_bug.cgi?id=61579

        SunSpider reports no change.

        Using Weak<T> could accomplish this too, but we're not sure it will give
        us the performance we need. This is a first step, and it accomplishes
        most of the value of using Weak<T>.

        * heap/Heap.cpp:
        (JSC::Heap::destroy):
        (JSC::Heap::markRoots):
        (JSC::Heap::reset): Finalize small strings just like other weak handles.

        * runtime/SmallStrings.cpp:
        (JSC::finalize):
        (JSC::SmallStrings::finalizeSmallStrings):
        * runtime/SmallStrings.h: Make all small strings trivially weak, instead
        of having an "all for one, one for all" memory model.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@87448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/heap/Heap.cpp
Source/JavaScriptCore/runtime/SmallStrings.cpp
Source/JavaScriptCore/runtime/SmallStrings.h