Related articles |
---|
Complexity of 'SI + interfaces' vs. 'MI' dev@gioelebarabucci.com (Gioele Barabucci) (2004-10-17) |
From: | Gioele Barabucci <dev@gioelebarabucci.com> |
Newsgroups: | comp.compilers |
Date: | 17 Oct 2004 16:19:25 -0400 |
Organization: | Tiscali Spa |
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?
--
Gioele
[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
comp.compilers page.
Search the
comp.compilers archives again.