Re: virtual functions and optimization at compile time

Joachim Durchholz <joachim.durchholz@web.de>
3 Dec 2003 17:54:02 -0500

          From comp.compilers

Related articles
virtual functions and optimization at compile time pdn@sasken.com (preetham) (2003-11-21)
Re: virtual functions and optimization at compile time sasulzer@seanet.com (Stephen Sulzer) (2003-12-03)
Re: virtual functions and optimization at compile time joachim.durchholz@web.de (Joachim Durchholz) (2003-12-03)
Re: virtual functions and optimization at compile time hannah@schlund.de (2003-12-03)
Re: virtual functions and optimization at compile time tmk@netvision.net.il (2003-12-03)
Re: virtual functions and optimization at compile time alexc@std.com (Alex Colvin) (2003-12-03)
| List of all articles for this month |
From: Joachim Durchholz <joachim.durchholz@web.de>
Newsgroups: comp.compilers
Date: 3 Dec 2003 17:54:02 -0500
Organization: Oberberg Online Infosysteme
References: 03-11-076
Keywords: OOP, optimize
Posted-Date: 03 Dec 2003 17:54:02 EST

preetham wrote:
>
> Virtual Functions Are Supposed To Be Optimized Bcoz They R Supposedly
> Resolved At Run-Time. How Can Virtual Functions Be Resolved At
> Compile-Time???


> [By flow analysis that determines that it'll always call the same
> function, I suppose. -John]


This is exactly how it's done.
For a good explanation and an example, take a look at papers of the Gnu
Eiffel (formerly SmallEiffel) project, at
http://pauillac.inria.fr/cdrom/www/SmallEiffel/index.html . The paper
that describes the actual process can be downloaded in various formats
from http://pauillac.inria.fr/cdrom/www/SmallEiffel/papers/papers.html .


Regards,
Jo



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.