[Preston] Object orientated compiler question.

Guy preston at mailman.lug.org.uk
Sun Nov 17 17:08:00 2002


On Saturday 16 November 2002 2:27 pm, you wrote:
> > Is the compiled machine code from an object-oriented program different to
> > a procedural one?
>
> what do you mean with "different"?
> they will use the same set of instructions (that is, the machine-dependent
> code working on registers and cpu, that is always the same), but the
> sequence of instructions will obviously be different, because of the
> different behaviour of the compiler.
>
> bye
> giacomo

Yes, I realise there is a limited set of instructions (e.g. for Intel chips) 
but I meant the sequence. If the two programs do the same thing, why would 
the instruction sequences be different? Are you saying that the 
object-oriented compiler compiles *machine code* that also behaves in an 
object orientated way? So could a machine code program originally written in 
C++, be de-compiled into C?

I have no idea - please enlighten me!

Regards,
-- 
Guy