Bug 70986 - Add ability to check for presence of static members at compile time
Summary: Add ability to check for presence of static members at compile time
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Hahnenberg
URL:
Keywords:
Depends on:
Blocks: 70960
  Show dependency treegraph
 
Reported: 2011-10-26 18:32 PDT by Mark Hahnenberg
Modified: 2011-10-27 10:38 PDT (History)
0 users

See Also:


Attachments
Patch (2.11 KB, patch)
2011-10-26 19:06 PDT, Mark Hahnenberg
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hahnenberg 2011-10-26 18:32:22 PDT
With the imminent addition of methods from JSObject to the MethodTable, we now need to be able to determine whether or not a class has an implementation of a particular static function in order to properly fill in the MethodTable for classes that don't implement the function (i.e. classes that don't inherit directly or indirectly from JSObject).  For classes that don't have an implementation of the method, we put a null pointer in the MethodTable.  We can do this through the use of a macro-ized template taking advantage of SFINAE.
Comment 1 Mark Hahnenberg 2011-10-26 19:06:51 PDT
Created attachment 112632 [details]
Patch
Comment 2 Geoffrey Garen 2011-10-27 08:41:56 PDT
Comment on attachment 112632 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=112632&action=review

Two words: robot barf.

> Source/JavaScriptCore/runtime/ClassInfo.h:65
> +struct MemberCheck##foo { \

Let's use "member" instead of "foo".
Comment 3 Mark Hahnenberg 2011-10-27 10:38:43 PDT
Committed r98601: <http://trac.webkit.org/changeset/98601>