Bug 141625

Summary: UMBRELLA: Consolidate duplicate soft-linked functions
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, benjamin, bfulgham, eric.carlson, jeremyj-wk, jer.noble, jonlee, kling
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 141655, 141791, 141816, 141849, 141870, 141872, 142176, 142177, 142434, 193568    
Bug Blocks:    

David Kilzer (:ddkilzer)
Reported 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.
Attachments
David Kilzer (:ddkilzer)
Comment 1 2015-02-15 21:37:31 PST
This strategy also saves redundant code from duplicate statements like this: SOFT_LINK_FRAMEWORK(CoreMedia)
David Kilzer (:ddkilzer)
Comment 2 2015-02-16 13:05:09 PST
First pass at consolidating one function: Bug 141655: Consolidate soft-linked CMTimeMakeWithSeconds() function
David Kilzer (:ddkilzer)
Comment 3 2015-03-06 10:17:34 PST
All the dependent bugs are complete. Moving to RESOLVED/FIXED.
Note You need to log in before you can comment on or make changes to this bug.