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+

Mark Hahnenberg
Reported 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.
Attachments
Patch (2.11 KB, patch)
2011-10-26 19:06 PDT, Mark Hahnenberg
ggaren: review+
Mark Hahnenberg
Comment 1 2011-10-26 19:06:51 PDT
Geoffrey Garen
Comment 2 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".
Mark Hahnenberg
Comment 3 2011-10-27 10:38:43 PDT
Note You need to log in before you can comment on or make changes to this bug.