Re: New assembly language instructions to support OO languages?

kamal <kamalpr@hp.com>
Wed, 10 Dec 2008 23:39:24 -0800 (PST)

          From comp.compilers

Related articles
[27 earlier articles]
Re: New assembly language instructions to support OO languages? bowes.brad@gmail.com (Brad) (2008-12-08)
Re: New assembly language instructions to support OO languages? cfc@shell01.TheWorld.com (Chris F Clark) (2008-12-08)
Re: New assembly language instructions to support OO languages? gneuner2@comcast.net (George Neuner) (2008-12-09)
Re: New assembly language instructions to support OO languages? jasen@xnet.co.nz (Jasen Betts) (2008-12-09)
Re: New assembly language instructions to support OO languages? efeustel@hughes.net (Edward Feustel) (2008-12-09)
Re: New assembly language instructions to support OO languages? gah@ugcs.caltech.edu (Glen Herrmannsfeldt) (2008-12-09)
Re: New assembly language instructions to support OO languages? kamalpr@hp.com (kamal) (2008-12-10)
Re: New assembly language instructions to support OO languages? jasen@xnet.co.nz (Jasen Betts) (2008-12-11)
Re: New assembly language instructions to support OO languages? first@last.name (Morten Reistad) (2008-12-12)
Re: New assembly language instructions to support OO languages? torbenm@pc-003.diku.dk (2008-12-12)
Re: New assembly language instructions to support OO languages? johnzabroski@gmail.com (John \Z-Bo\Zabroski) (2008-12-13)
Re: New assembly language instructions to support OO languages? bear@sonic.net (Ray Dillinger) (2008-12-13)
Re: New assembly language instructions to support OO languages? jasen@xnet.co.nz (Jasen Betts) (2008-12-14)
[1 later articles]
| List of all articles for this month |
From: kamal <kamalpr@hp.com>
Newsgroups: comp.compilers,comp.arch
Date: Wed, 10 Dec 2008 23:39:24 -0800 (PST)
Organization: Compilers Central
References: 08-12-014 08-12-017 08-12-025
Keywords: architecture, OOP
Posted-Date: 11 Dec 2008 04:27:29 EST

On Dec 5, 1:39 pm, "Tony" <t...@my.net> wrote:
> "Michael Tiomkin" <t...@netvision.net.il> wrote in message
>
>
>
> > I do not see any connection between easy compilation of OO languages
> > and machine instructions - creating the actual code is one of the
> > easiest parts of a compiler. If you mean making the OO programs run


yes -compilation/code generation is not at all a bottleneck. I can
remember compilers like Cfront used to generate C code from C++ which
was then fed to the C compiler for best results (vis-a-vis C++->
assembly). The process of using an implicit pointer (this) to
reference object members is done at runtime and not at compile time.


> > faster, a different memory model can help very much.


Segmented memory can help, but the segments are very few in number and
large in size. The concept of segment has more to do with providing a
better way to position/fetch seperate parts of a program like text/
data which are few and larger in size.


> I was just pondering whether some of the OO mechanisms could move
> out of the language and into instructions, machine code or even
> processor architecture (the sky is the limit for this
> brainstorming). You said: "easy compilation". I am "at war" with
> vptrs (not to limit the discussion to just that though).


That would be encountered at runtime. Different architectures provide
dedicated registers so that we can have faster indirection. One
typical usage is TP (thread pointer) register so that one can access
TLS faster. You could use some registers to store a 'this' for an
object when its member functions are executed [assuming that is not
already implemented].


> To me, something seems "not right" with taking OO class objects and
> shoving a vptr into them. On the flip side, it "feels right" to me
> to push/pop args on/off the stack to implement functions. Maybe
> because we could be dealing with several objects in the same
> function, but only one function at a time?


regards
-kamal


Post a followup to this message

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