Re: New assembly language instructions to support OO languages?

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Sat, 6 Dec 2008 12:26:31 +0100

          From comp.compilers

Related articles
[13 earlier articles]
Re: New assembly language instructions to support OO languages? walter@bytecraft.com (Walter Banks) (2008-12-05)
Re: New assembly language instructions to support OO languages? David.Schroth@unisys.com (David W Schroth) (2008-12-05)
Re: New assembly language instructions to support OO languages? gah@ugcs.caltech.edu (Glen Herrmannsfeldt) (2008-12-05)
Re: New assembly language instructions to support OO languages? gah@ugcs.caltech.edu (Glen Herrmannsfeldt) (2008-12-05)
Re: New assembly language instructions to support OO languages? georgeps@xmission.com (GPS) (2008-12-05)
Re: New assembly language instructions to support OO languages? gah@ugcs.caltech.edu (Glen Herrmannsfeldt) (2008-12-06)
Re: New assembly language instructions to support OO languages? mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2008-12-06)
Re: New assembly language instructions to support OO languages? jasen@xnet.co.nz (Jasen Betts) (2008-12-06)
Re: New assembly language instructions to support OO languages? jgd@cix.compulink.co.uk (2008-12-06)
Re: New assembly language instructions to support OO languages? gneuner2@comcast.net (George Neuner) (2008-12-06)
Re: New assembly language instructions to support OO languages? jgd@cix.compulink.co.uk (2008-12-07)
Re: New assembly language instructions to support OO languages? rpw3@rpw3.org (2008-12-08)
Re: New assembly language instructions to support OO languages? torbenm@pc-003.diku.dk (2008-12-08)
[15 later articles]
| List of all articles for this month |
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Newsgroups: comp.compilers,comp.arch
Date: Sat, 6 Dec 2008 12:26:31 +0100
Organization: cbb software GmbH
References: 08-12-014
Keywords: OOP, architecture
Posted-Date: 06 Dec 2008 06:42:53 EST

On Thu, 4 Dec 2008 12:09:50 -0600, Tony wrote:


> To me, it seems like "reducing everything to a function" may be a bit
> dated given that OO languages are the thing nowadays. Can anyone
> imagine any new potential assembly language instructions that would
> make implemention of OO languages easier?


An interesting question.


1. I would expect some support for management dispatching tables. When
types are allowed to be dynamically derived from, one have to add and
remove columns in the dispatching table of a method. (I presume that
vptr is replaced with the type tag. The latter used to index the
table).


2. Dispatching itself is also an issue. In the most general model
(multiple dispatch) one have to collect type tags from the arguments
of a call. This n-tuple index is used to index the n-dimensional
dispatch table of a method which yields the target. It would be nice
to have one CALL instruction for that.


3. "non-cooperative OO/ADT." That is when private parts of the object
are not mapped when you have only a public view on it. Consequently,
the dispatching tables of private methods are inaccessible etc. When
you call to a public method, it is executed on a context where the
private things become mapped. Some sort of "OO supervisor call." You
cannot have a really OO OS API without this.


4. Tiny object's polymorphism. If you wanted full OO, you would need
classes of small objects (like bits, pointers, integers etc). You
don't want to keep the type tag in such objects. One solution is that
a polymorphic value and a type-specific value would have different
representations. The former would have a type tag inside, the latter
would not. In order to make this working you will convert forth and
back between these representations, i.e. between T and class T. One
could have special instructions for this.


--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



Post a followup to this message

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