Bug 141625 - UMBRELLA: Consolidate duplicate soft-linked functions
Summary: UMBRELLA: Consolidate duplicate soft-linked functions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 141655 141791 141816 141849 141870 141872 142176 142177 142434 193568
Blocks:
  Show dependency treegraph
 
Reported: 2015-02-15 15:18 PST by David Kilzer (:ddkilzer)
Modified: 2019-01-18 03:20 PST (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2015-02-15 15:18:23 PST
Consolidating duplicate soft-linked functions would remove duplicate code created for each function, and remove/consolidate some static pointers that would cause dirty pages when the soft-linked method is used.

Here's a rough estimation of the current duplicate functions:

$ grep -r 'SOFT_LINK(' Source/WebCore | cut -d, -f2 | sed -e 's/^ *//' -e 's/ *$//' | sort | uniq -c | sort -n

   2 CMNotificationCenterAddListener
   2 CMNotificationCenterGetDefaultLocalCenter
   2 CMNotificationCenterRemoveListener
   2 CMTimeCompare
   2 CMTimeCopyAsDictionary
   2 CMTimeRangeGetEnd
   2 CloseThemeData
   2 DrawThemeBackground
   2 IsThemeActive
   2 IsThemeBackgroundPartiallyTransparent
   2 OpenThemeData
   2 QTMakeTime
   2 paintThemePart
   3 CMSampleBufferGetPresentationTimeStamp
   3 CMTimeMake
   3 CMTimebaseGetTime
   4 CMSampleBufferGetFormatDescription
   4 CMTimeGetSeconds
   4 CMTimeMakeWithSeconds
   4 UTTypeCopyPreferredTagWithClass
   4 UTTypeCreatePreferredIdentifierForTag

I'm not sure how much code space each method takes, though.
Comment 1 David Kilzer (:ddkilzer) 2015-02-15 21:37:31 PST
This strategy also saves redundant code from duplicate statements like this:

SOFT_LINK_FRAMEWORK(CoreMedia)
Comment 2 David Kilzer (:ddkilzer) 2015-02-16 13:05:09 PST
First pass at consolidating one function:

Bug 141655: Consolidate soft-linked CMTimeMakeWithSeconds() function
Comment 3 David Kilzer (:ddkilzer) 2015-03-06 10:17:34 PST
All the dependent bugs are complete.  Moving to RESOLVED/FIXED.