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

  1. Xref: sparky comp.lang.c++:11465 comp.std.c++:938
  2. Newsgroups: comp.lang.c++,comp.std.c++
  3. Path: sparky!uunet!mole-end!mat
  4. From: mat@uunet.uu.net!mole-end
  5. Subject: Re: Language extensions for run-time type identification
  6. Message-ID: <1992Jul24.070325.1597@uunet.uu.net!mole-end>
  7. Summary: Eh?
  8. Organization: :
  9. References: <1992Jul22.091752.22521@mole-end> <1992Jul23.134515.12794@cadsun.corp.mot.com>
  10. Date: Fri, 24 Jul 1992 07:03:25 GMT
  11. Lines: 40
  12.  
  13. In article <1992Jul23.134515.12794@cadsun.corp.mot.com>, shang@corp.mot.com (David (Lujun) Shang) writes:
  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
  18. > > multiple inheritance. An object of particular class derived from
  19. > > multiple bases may contain serveral different vtable references.
  20. > > Different base pointers to the same object may use different vtable
  21. > > pointers.
  22.  
  23. > In article <1992Jul22.091752.22521@mole-end> mat@mole-end writes:
  24. > > Just a point of fact:
  25. > > Not quite true. Those multiple vtable references in a complete object
  26. > > all have to point to vtables whose only differences are their `offset
  27. > > adjustments.'
  28.  
  29. > Good point! To compare two types then can be done by comparing the segment or
  30. > page number of two vtables. The penalty is only for those C++ implemented in 
  31. > 16-bit environment. The vtable reference cannot be a 16-bit pointer for small 
  32. > programs.
  33.  
  34. David,
  35.  
  36. Eh?  I was not using `offset adjustment' in reference to a segmented memory
  37. addressing scheme; I was using it to describe a necessary feature of a
  38. vtable for MI: an explicit or implicit displacement by which a pointer must
  39. be adjusted during the invocation of a virtual function.
  40.  
  41. And not to make you too happy: comparing vtable pointers could only be
  42. a first step unless you are absolutely sure that the compilation and
  43. linking system will never duplicate a vtable.  This is a hard assumption
  44. to prove, especially with dynamic linking of new types.
  45.  
  46. OBTW, are you a typewriter-trained touch typist?  Your text has trailing
  47. blanks on almost every line.
  48. -- 
  49.  (This man's opinions are his own.)
  50.  From mole-end                Mark Terribile
  51.  
  52.  uunet!mole-end!mat, Somewhere in Matawan, NJ
  53.