2011-02-17 Geoffrey Garen <ggaren@apple.com>
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Feb 2011 05:49:39 +0000 (05:49 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Feb 2011 05:49:39 +0000 (05:49 +0000)
commitc0e7a172a91a2377d83371e3f0b8988c6bcc5b31
treeda9e79d0205fb667ba02ac2a2340ade8174daac3
parent8480f2cf99df8de9e21ae02b81a986cc8ee41a2a
2011-02-17  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.

        Fixed some math errors when when using variable-sized cells
        https://bugs.webkit.org/show_bug.cgi?id=54717

        SunSpider reports no change.

        Computer Science Barbie says, "Math is not so hard afterall!"

        * runtime/JSCell.h:
        (JSC::JSCell::MarkedBlock::allocate): Round up when calculating the
        minimum number of atoms required for a cell, since rounding down
        will get you splinched.

        * runtime/MarkedBlock.cpp:
        (JSC::MarkedBlock::MarkedBlock):
        (JSC::MarkedBlock::sweep):
        * runtime/MarkedBlock.h:
        (JSC::MarkedBlock::forEach): Changed a bunch of != tests to < tests
        because m_endAtom is actually a fuzzy end -- iterating from firstAtom()
        may not hit m_endAtom exactly.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@78957 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/JSCell.h
Source/JavaScriptCore/runtime/MarkedBlock.cpp
Source/JavaScriptCore/runtime/MarkedBlock.h