[DGD] DGDMP 1.1.10

Felix A. Croes felix at dworkin.nl
Tue Jun 9 20:50:31 CEST 2009


Shentino <shentino at gmail.com> wrote:

> Error was "Too many objects inherited"
>
> I only have (11 + 11 + 2) = 22 inheritables involved, yet I was able to
> create an inheritance tree that triggered this.

The error prevents overflow.

DGD flattens the inheritance tree into an array.  For implementation
reasons, when C and D both inherit A and B, an object E which inherits
C and D must have the slices ({ A, B, C }) and ({ A, B, D }) in its
inheritance array, so inherited objects may appear there twice, or
indeed many more times.

DGD uses a byte to index the inheritance array.  DGDMP can use two
bytes for the index.

I've thought for a while about ways to improve on this, but all of
them trade interpreter speed for a supposedly common-case optimization
that can still be defeated easily by a specially crafted inheritance
tree, even with a 16 bit index.

Regards,
Felix Croes



More information about the DGD mailing list