[Webkit-unassigned] [Bug 117289] Make CachedResource virtual methods overridden in derived classes private

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 6 13:35:32 PDT 2013


--- Comment #5 from Darin Adler <darin at apple.com>  2013-06-06 13:34:06 PST ---
(In reply to comment #3)
> You mean making all of them FINAL or just the public ones? because the private ones will always do a a virtual function dispatch.

They should all be FINAL.

Even the private ones might be called from inside the class. Making them private doesn’t make them uncallable. We want all virtual functions to be FINAL unless we override them. This creates opportunities for the compiler to do optimizations it otherwise couldn’t do.

One shortcut is that we can get the same optimization without marking any virtual functions FINAL if the entire class is marked FINAL.

But we should be in the habit of marking almost every virtual function FINAL.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list