Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Compilers > Re: Optimizatio...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 7 Topic 2408 of 2425
Post > Topic >>

Re: Optimization for OOP

by torbenm@[EMAIL PROTECTED] (Torben =?iso-8859-1?Q?=C6gidius?= Mogense May 5, 2008 at 09:45 AM

sgkelly4@[EMAIL PROTECTED]
 writes:


> I'm in the beginning of writing an optimizer for an object oriented
> programming language. At the moment I'm working on developing a list
> of possible optimizations that can be performed on the code. The
> language runs on a virtual machine.

The most important optimisation is to get rid of dynamic method calls.

This can, however, be quite tricky as you can't tell if a method can
be overridden without knowing the whole program, so it plays havoc
with separate compilation.  A compromise is to allow methods to be
declared "final", which ensures it is never overridden.

If you design your own language, you can make "final" the default, so
you would have to write explicitly if a method is allowed to be
overridden.  In many cases, methods are final, but the programmers are
just to lazy to declare this, or think "yeah, maybe, I will in the
future override this, so I'll just leave this possibility open", and
then they never override it anyway.

	Torben




 7 Posts in Topic:
Optimization for OOP
sgkelly4@[EMAIL PROTECTED  2008-05-03 17:53:05 
Re: Optimization for OOP
torbenm@[EMAIL PROTECTED]  2008-05-05 09:45:24 
Re: Optimization for OOP
"Dmitry A. Kazakov&q  2008-05-05 18:37:26 
Re: Optimization for OOP
"lucretia9@[EMAIL PR  2008-05-05 18:51:58 
Re: Optimization for OOP
"Dmitry A. Kazakov&q  2008-05-06 09:35:25 
Re: Optimization for OOP
sgkelly4@[EMAIL PROTECTED  2008-05-06 23:13:32 
Re: Optimization for OOP
Tony Finch <dot@[EMAIL  2008-05-05 18:11:27 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat May 17 5:21:14 CDT 2008.