home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / cplus / 11413 < prev    next >
Encoding:
Internet Message Format  |  1992-07-21  |  1.4 KB

  1. Xref: sparky comp.lang.c++:11413 comp.std.c++:927
  2. Newsgroups: comp.lang.c++,comp.std.c++
  3. Path: sparky!uunet!ftpbox!motsrd!news
  4. From: shang@corp.mot.com (David (Lujun) Shang)
  5. Subject: Re: Language extensions for run-time type identification
  6. Message-ID: <1992Jul23.134515.12794@cadsun.corp.mot.com>
  7. Sender: news@cadsun.corp.mot.com
  8. Reply-To: shang@corp.mot.com
  9. Organization: Motorola, Inc., Software Research and Development, Rolling Meadows, IL. 60008
  10. References: <1992Jul22.091752.22521@mole-end>
  11. Date: Thu, 23 Jul 92 13:45:15 GMT
  12. Lines: 20
  13.  
  14. In article <1992Jul21.143131.6902@cadsun.corp.mot.com>, shang@corp.mot.com  
  15. (David (Lujun) Shang) writes:
  16.  
  17. > The pointer to vtable can not work as a type-ID for a language with multiple  
  18. > inheritance. An object of particular class derived from multiple bases may  
  19. > contain serveral different vtable references. Different base pointers to the  
  20. > same object may use different vtable pointers.
  21.  
  22. NoIn article <1992Jul22.091752.22521@mole-end> mat@mole-end writes:
  23. > Just a point of fact:
  24. > Not quite true. Those multiple vtable references in a complete object
  25. > all have to point to vtables whose only differences are their `offset
  26. > adjustments.'
  27. Good point! To compare two types then can be done by comparing the segment or  
  28. page number of two vtables. The penalty is only for those C++ implemented in  
  29. 16-bit environment. The vtable reference cannot be a 16-bit pointer for small  
  30. programs.
  31.  
  32. David Shang
  33.