[webkit-reviews] review granted: [Bug 121744] Give purity hints to compiler to avoid penalizing repeated calls to some functions. : [Attachment 212274] Patch idea

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Sep 21 11:47:37 PDT 2013


Darin Adler <darin at apple.com> has granted Andreas Kling <akling at apple.com>'s
request for review:
Bug 121744: Give purity hints to compiler to avoid penalizing repeated calls to
some functions.
https://bugs.webkit.org/show_bug.cgi?id=121744

Attachment 212274: Patch idea
https://bugs.webkit.org/attachment.cgi?id=212274&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=212274&action=review


Did you test? How well did this work?

> Source/WTF/wtf/Compiler.h:198
> +#define WTF_PURE_FUNCTION __attribute__ ((pure))

I never know if we should include the WTF prefixes. I would not like it if it
was WTF_OVERRIDE, for example.

Also, I seem to recall that __attribute__((__pure__)) does the same thing and
is a little more safe if someone has a macro named "pure".


More information about the webkit-reviews mailing list