Closed
Bug 500078
Opened 15 years ago
Closed 15 years ago
dehydra: patch to add access data for static member declarations
Categories
(Developer Infrastructure :: Source Code Analysis, enhancement)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: daniel, Unassigned)
Details
Attachments
(1 file)
1.63 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1) Gecko/20090615 Firefox/3.5 Build Identifier: HEAD from June 20th, 2009 This patch adds an "access" property for all global declarations, not just non-static members of classes and structs. I use this in building C++ -> Java bindings to identify static methods that should have native lang accessors. Reproducible: Always Steps to Reproduce: This is a feature enhancement, not a bug.
Reporter | ||
Comment 1•15 years ago
|
||
The big flaw with this patch is that it copies several static constants from dehyra_types.c that are inaccessible from dehydra.c I'm willing to adjust the patch if someone tells me what would be best (i.e. should I make the constants non-static and put a declaration into a headerfile somewhere?)
Updated•15 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 2•15 years ago
|
||
(In reply to comment #1) > Created an attachment (id=384771) [details] > patch against dehydra.c > > The big flaw with this patch is that it copies several static constants from > dehyra_types.c that are inaccessible from dehydra.c I'm willing to adjust the > patch if someone tells me what would be best (i.e. should I make the constants > non-static and put a declaration into a headerfile somewhere?) Yeah make them non-static and put them into dehydra.h I don't see how this would affect things outside of class scope. Can you attach a testcase C++ file that works better with your patch?
Reporter | ||
Comment 3•15 years ago
|
||
I can attach a testcase, sure (tomorrow) It is only in class scope. The "TREE_CODE(decl_context) == RECORD_TYPE" matches only things like structs and classes. The issue, apparently is that static members of a class or struct appear as top level definitions. This is why they don't appear in the "members" array of the type for the class and instead appear as a separate top level declaration event. Someone had already added code to populate the "memberOf" property of static definitions. I'm adding only the additional property of "access" right at the same place.
Comment 4•15 years ago
|
||
Thanks for the bugreport + fix. cleanedup+testcased+pushed http://hg.mozilla.org/users/tglek_mozilla.com/dehydra-gcc/rev/e3d49bb8ce4f
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Core → Firefox Build System
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•