Bug 70986

Summary: Add ability to check for presence of static members at compile time
Product: WebKit Reporter: Mark Hahnenberg <mhahnenberg>
Component: JavaScriptCoreAssignee: Mark Hahnenberg <mhahnenberg>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 70960    
Attachments:
Description Flags
Patch ggaren: review+

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>