home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c++:11413 comp.std.c++:927
- Newsgroups: comp.lang.c++,comp.std.c++
- Path: sparky!uunet!ftpbox!motsrd!news
- From: shang@corp.mot.com (David (Lujun) Shang)
- Subject: Re: Language extensions for run-time type identification
- Message-ID: <1992Jul23.134515.12794@cadsun.corp.mot.com>
- Sender: news@cadsun.corp.mot.com
- Reply-To: shang@corp.mot.com
- Organization: Motorola, Inc., Software Research and Development, Rolling Meadows, IL. 60008
- References: <1992Jul22.091752.22521@mole-end>
- Date: Thu, 23 Jul 92 13:45:15 GMT
- Lines: 20
-
- 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.
-
- NoIn 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 Shang
-