home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c++:11465 comp.std.c++:938
- Newsgroups: comp.lang.c++,comp.std.c++
- Path: sparky!uunet!mole-end!mat
- From: mat@uunet.uu.net!mole-end
- Subject: Re: Language extensions for run-time type identification
- Message-ID: <1992Jul24.070325.1597@uunet.uu.net!mole-end>
- Summary: Eh?
- Organization: :
- References: <1992Jul22.091752.22521@mole-end> <1992Jul23.134515.12794@cadsun.corp.mot.com>
- Date: Fri, 24 Jul 1992 07:03:25 GMT
- Lines: 40
-
- In article <1992Jul23.134515.12794@cadsun.corp.mot.com>, shang@corp.mot.com (David (Lujun) Shang) writes:
- > In article <1992Jul21.143131.6902@cadsun.corp.mot.com>, shang@corp.mot.com
- > (David (Lujun) Shang) writes:
-
- > > The pointer to vtable can not work as a type-ID for a language with
- > > multiple inheritance. An object of particular class derived from
- > > multiple bases may contain serveral different vtable references.
- > > Different base pointers to the same object may use different vtable
- > > pointers.
-
- > In article <1992Jul22.091752.22521@mole-end> mat@mole-end writes:
- > > Just a point of fact:
- > > Not quite true. Those multiple vtable references in a complete object
- > > all have to point to vtables whose only differences are their `offset
- > > adjustments.'
-
- > Good point! To compare two types then can be done by comparing the segment or
- > page number of two vtables. The penalty is only for those C++ implemented in
- > 16-bit environment. The vtable reference cannot be a 16-bit pointer for small
- > programs.
-
- David,
-
- Eh? I was not using `offset adjustment' in reference to a segmented memory
- addressing scheme; I was using it to describe a necessary feature of a
- vtable for MI: an explicit or implicit displacement by which a pointer must
- be adjusted during the invocation of a virtual function.
-
- And not to make you too happy: comparing vtable pointers could only be
- a first step unless you are absolutely sure that the compilation and
- linking system will never duplicate a vtable. This is a hard assumption
- to prove, especially with dynamic linking of new types.
-
- OBTW, are you a typewriter-trained touch typist? Your text has trailing
- blanks on almost every line.
- --
- (This man's opinions are his own.)
- From mole-end Mark Terribile
-
- uunet!mole-end!mat, Somewhere in Matawan, NJ
-