CSSValuePool: Made identifier value cache a fixed-size array.
authorkling@webkit.org <kling@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Apr 2012 02:49:54 +0000 (02:49 +0000)
committerkling@webkit.org <kling@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Apr 2012 02:49:54 +0000 (02:49 +0000)
commitc02ddc6352a0e4f510809424903d329af2f52810
tree2d3ffbb20326c627191ffcceeae201245e0618ec
parentb6d3a66cb7bb043154ff8b82f65639a381046db4
CSSValuePool: Made identifier value cache a fixed-size array.
<http://webkit.org/b/84219>

Reviewed by Antti Koivisto.

Change the identifier CSSPrimitiveValue cache in CSSValuePool from a HashMap to a
fixed-size array of RefPtr<CSSPrimitiveValue>s.

We have ~700 values total, so this is quite space efficient now that the CSSValuePool
is globally shared. More importantly it avoids a hash lookup every time we need an
identifier value.

* css/CSSValuePool.h:
* css/CSSValuePool.cpp:
(WebCore::CSSValuePool::createIdentifierValue):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@114474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/css/CSSValuePool.cpp
Source/WebCore/css/CSSValuePool.h