Bug 108578

Summary: [CPP,GObject,ObjC] Add 'static' skip to CodeGenerator{CPP,GObject,ObjC}.pm
Product: WebKit Reporter: Nils Barth <nbarth>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, haraken, japhet, ojan.autocc, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
ChangeLog wording fix none

Description Nils Barth 2013-01-31 21:42:39 PST
Legacy code generators do not support static attributes.
Fix by adding a test to skip static types.
This allows us to not use macros like "#if defined(TESTING_JS) || defined(TESTING_V8)" in IDL files.
Concretely it's just adding a suitable check to the SkipAttribute functions, and then removing macros from the test IDL file.
Comment 1 Nils Barth 2013-01-31 23:24:50 PST
Created attachment 185953 [details]
Patch

V. simple fix -- just check $attribute->isStatic
This lets us remove macros from TestObj.idl and also TestSupplemental.idl
Comment 2 Kentaro Hara 2013-01-31 23:28:10 PST
Comment on attachment 185953 [details]
Patch

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

> Source/WebCore/ChangeLog:8
> +        Since legacy code generators (CodeGenerator{CPP,GObject,ObjC}.pm)

Don't call them legacy. Their implementations are just behind.
Comment 3 Nils Barth 2013-01-31 23:30:33 PST
(In reply to comment #2)
> (From update of attachment 185953 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=185953&action=review
> 
> > Source/WebCore/ChangeLog:8
> > +        Since legacy code generators (CodeGenerator{CPP,GObject,ObjC}.pm)
> 
> Don't call them legacy. Their implementations are just behind.

Oops, sorry!
Is there a proper name, like "lagging code generators",
or should I just call them something like "CPP/GObject/ObjC"?
Comment 4 Kentaro Hara 2013-01-31 23:31:40 PST
(In reply to comment #3)
> or should I just call them something like "CPP/GObject/ObjC"?

You can just say CPP/GObject/ObjC. We shouldn't break these bindings just like we shouldn't break JSC/V8.
Comment 5 Nils Barth 2013-01-31 23:32:47 PST
(In reply to comment #4)
> (In reply to comment #3)
> > or should I just call them something like "CPP/GObject/ObjC"?
> 
> You can just say CPP/GObject/ObjC. We shouldn't break these bindings just like we shouldn't break JSC/V8.

Ok, will do.
Comment 6 Nils Barth 2013-01-31 23:38:03 PST
Created attachment 185956 [details]
ChangeLog wording fix

Fix wording re: CPP/GObject/ObjC in ChangeLog
Comment 7 Kentaro Hara 2013-01-31 23:38:38 PST
Comment on attachment 185956 [details]
ChangeLog wording fix

LGTM
Comment 8 WebKit Review Bot 2013-02-01 00:45:57 PST
Comment on attachment 185956 [details]
ChangeLog wording fix

Clearing flags on attachment: 185956

Committed r141551: <http://trac.webkit.org/changeset/141551>
Comment 9 WebKit Review Bot 2013-02-01 00:46:01 PST
All reviewed patches have been landed.  Closing bug.