C++ ABI patents
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

C++ ABI patents



Looks like this hasn't appeared on the list yet.

------- Start of forwarded message -------
Are you folks aware of the various C++ ABI patents out there?  Microsoft
has a bunch, one of which seems to cover all existing C++ implementations
(5410705), and IBM has at least one.  Here's what I came up with when I was
investigating last August; there may be more now.

----------------------

 > 5794041, Law et al., C++ object model alternatives, IBM

Covers sharing a vptr with a virtual base when either the derived or base
classes have no other data members.  Note that Sun's C++ ABI document talks
about this optimization.  It was written in 1994, while the IBM patent was
filed in 1996.

The patent also covers some minor optimizations to avoid adjusting 'this'
in some cases, by pushing vtable entries down into derived classes.

 > 5754862, Jones et al., Method and system for accessing virtual base
 > classes, Microsoft

Covers use of a vbase table.

 > 5617569, Gray et al., Method and system for implementing pointers to
 > members in a compiler for an object-oriented programming language,
 > Microsoft

Extends 5432936.  Also covers implementing pointers to member functions
using vbase offsets and calling virtual functions using thunks which check
the vtable rather than checking the vtable directly.

 > 5603030, Gray et al., Method and system for destruction of objects using
 > multiple destructor functions in an object-oriented computer system,
 > Microsoft

Covers using multiple destructors for the different cases (should{,n't}
delete, should{,n't} destroy vbases, array), a useful optimization.

Sun's ABI also seems to touch on this, but this patent was filed in 1993.

 > 5410705, Jones et al., Method for generating an object data structure
 > layout for a class in a compiler for an object-oriented programming
 > language, Microsoft 

This patent claims basic object layout, including sharing a vptr with a
non-virtual base, like we've been doing all along.  Shows how far they're
willing to go, and how ignorant the PTO is.

 > 5371891, Gray et al., Method for object construction in a compiler for
 > an object-oriented programming language, Microsoft

This describes Microsoft's solution for calling virtual functions in
virtual bases from constructors, by storing the offset in the vbase
itself.  But claim 59 seems broad enough to cover any solution to this
problem.

 > 5297284, Jones et al., Method and system for implementing virtual
 > functions and virtual base classes and setting a this pointer for an
 > object-oriented programming language, Microsoft

This is the one everyone knows about; it covers the thunk optimization
(setting up Derived::f to take Base*).

------- End of forwarded message -------