Closed Bug 2053134 Opened 4 months ago Closed 3 months ago

Simplify idl-analyze.py by having in-tree C++ header generator annotate functions with binding data

Categories

(Webtools :: Searchfox, enhancement)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nicolas.guichard, Assigned: nicolas.guichard)

References

Details

Attachments

(3 external files)

Since bug 1865048, the Mozsearch Clang plugin has support for custom annotations __attribute__((annotate("binding_to/bound_as", "LANGUAGE", "KIND", "SEARCHFOX SYMBOL"))). The code generator which generates C++ headers from IDL files could add those annotations which would remove the need for idl-analyze.py to read the C++ analysis to map identifiers to symbols.

Since bug 1865048, the Mozsearch Clang plugin can read custom
annotations to get a better understanding of cross-language bindings.

The CustomAttributes action of the main Clang plugin removes all
annotations and used to run before the Mozsearch Clang plugin.

This re-orders the execution of the actions so that the Mozsearch
plugin has a chance to read those annotations before they are stipped
away.

To enforce the order, all action registrations are moved to a new
Registration.cpp file.

This adds the enum value required to also support bindings between C++
and IDL.

This updates the XPIDL C++ header generator to add Mozsearch binding
annotations to the generated declarations.

Those get picked up by the Mozsearch Clang plugin to link between the
C++ classes/functions and their matching XPIDL definition.

See Also: → 2053875
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Flags: qe-verify+
Resolution: --- → FIXED
Regressions: 2055322
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: