|Complexity of 'SI + interfaces' vs. 'MI' email@example.com (Gioele Barabucci) (2004-10-17)|
|From:||Gioele Barabucci <firstname.lastname@example.org>|
|Date:||17 Oct 2004 16:19:25 -0400|
|Keywords:||OOP, optimize, question|
|Posted-Date:||17 Oct 2004 16:19:25 EDT|
How can a compiler take advance of the fact that an OO language has
only single inheritance + interfaces instead of multiple inheritance
(a-la Java)? Surely it is freed from the "diamond problem": it will
always know from which class a method is inherited.
But can the compiler exploit this situation to produce better
(simpler, smaller and faster) code? Can the adjustment-table in vtable
be eliminated? Can the thunk functions be simplified?
What optimizations (I'm mostly interested in runtime ones) can be
implemented once some assumption are relaxed or strengthened?
[Seems to me it's mostly leaving out code for complications that
can't happen. The adjustment table certainly goes away. -John]
Return to the
Search the comp.compilers archives again.