Devirtualize CSSValue.
authorandreas.kling@nokia.com <andreas.kling@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Nov 2011 18:27:07 +0000 (18:27 +0000)
committerandreas.kling@nokia.com <andreas.kling@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Nov 2011 18:27:07 +0000 (18:27 +0000)
commitfa8fcf5fc0fff2d5397386227a3334fa91c001c1
tree69e0bdd7d070e3f3f12abc6f27fbd5e4ddfb4835
parent0f3ae662bedc149852de6d6a50ea45af4ed2774e
Devirtualize CSSValue.
<http://webkit.org/b/71666>

Reviewed by Antti Koivisto.

Make the CSSValue destructor non-virtual (along with all the subclasses.)
This removes the vtables, and the pointers thereto in each value instance,
shrinking each object by one CPU word (4 or 8 bytes.)

We use the same trick as CSSRule to implement destruction; providing our
own deref() instead of RefCounted's, and performing a statically typed
delete in a destroy() method called when the ref count reaches 0.

Also made all the empty subclass destructors inline.

* css/CSSAspectRatioValue.cpp:
* css/CSSAspectRatioValue.h:
(WebCore::CSSAspectRatioValue::~CSSAspectRatioValue):
* css/CSSBorderImageSliceValue.cpp:
* css/CSSBorderImageSliceValue.h:
(WebCore::CSSBorderImageSliceValue::~CSSBorderImageSliceValue):
* css/CSSBorderImageValue.cpp:
* css/CSSBorderImageValue.h:
(WebCore::CSSBorderImageValue::~CSSBorderImageValue):
* css/CSSCanvasValue.h:
* css/CSSCrossfadeValue.cpp:
* css/CSSCrossfadeValue.h:
(WebCore::CSSCrossfadeValue::~CSSCrossfadeValue):
* css/CSSCursorImageValue.h:
* css/CSSFlexValue.cpp:
* css/CSSFlexValue.h:
(WebCore::CSSFlexValue::~CSSFlexValue):
* css/CSSFontFaceSrcValue.cpp:
* css/CSSFontFaceSrcValue.h:
(WebCore::CSSFontFaceSrcValue::~CSSFontFaceSrcValue):
* css/CSSFunctionValue.cpp:
* css/CSSFunctionValue.h:
(WebCore::CSSFunctionValue::~CSSFunctionValue):
* css/CSSImageGeneratorValue.h:
* css/CSSImageValue.h:
* css/CSSMutableValue.h:
(WebCore::CSSMutableValue::~CSSMutableValue):
* css/CSSParserValues.h:
* css/CSSPrimitiveValue.h:
* css/CSSUnicodeRangeValue.cpp:
* css/CSSUnicodeRangeValue.h:
(WebCore::CSSUnicodeRangeValue::~CSSUnicodeRangeValue):
* css/CSSValue.cpp:
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::deref):
(WebCore::CSSValue::~CSSValue):
* css/CSSValueList.cpp:
* css/CSSValueList.h:
(WebCore::CSSValueList::~CSSValueList):
* css/WebKitCSSFilterValue.cpp:
* css/WebKitCSSFilterValue.h:
(WebCore::WebKitCSSFilterValue::~WebKitCSSFilterValue):
* css/WebKitCSSTransformValue.cpp:
* css/WebKitCSSTransformValue.h:
(WebCore::WebKitCSSTransformValue::~WebKitCSSTransformValue):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99592 268f45cc-cd09-0410-ab3c-d52691b4dbfc
33 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/CSSAspectRatioValue.cpp
Source/WebCore/css/CSSAspectRatioValue.h
Source/WebCore/css/CSSBorderImageSliceValue.cpp
Source/WebCore/css/CSSBorderImageSliceValue.h
Source/WebCore/css/CSSBorderImageValue.cpp
Source/WebCore/css/CSSBorderImageValue.h
Source/WebCore/css/CSSCanvasValue.h
Source/WebCore/css/CSSCrossfadeValue.cpp
Source/WebCore/css/CSSCrossfadeValue.h
Source/WebCore/css/CSSCursorImageValue.h
Source/WebCore/css/CSSFlexValue.cpp
Source/WebCore/css/CSSFlexValue.h
Source/WebCore/css/CSSFontFaceSrcValue.cpp
Source/WebCore/css/CSSFontFaceSrcValue.h
Source/WebCore/css/CSSFunctionValue.cpp
Source/WebCore/css/CSSFunctionValue.h
Source/WebCore/css/CSSImageGeneratorValue.h
Source/WebCore/css/CSSImageValue.h
Source/WebCore/css/CSSMutableValue.h
Source/WebCore/css/CSSParserValues.h
Source/WebCore/css/CSSPrimitiveValue.h
Source/WebCore/css/CSSUnicodeRangeValue.cpp
Source/WebCore/css/CSSUnicodeRangeValue.h
Source/WebCore/css/CSSValue.cpp
Source/WebCore/css/CSSValue.h
Source/WebCore/css/CSSValueList.cpp
Source/WebCore/css/CSSValueList.h
Source/WebCore/css/WebKitCSSFilterValue.cpp
Source/WebCore/css/WebKitCSSFilterValue.h
Source/WebCore/css/WebKitCSSTransformValue.cpp
Source/WebCore/css/WebKitCSSTransformValue.h
Source/WebCore/svg/SVGColor.h