symconst.inc 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. {
  2. $Id$
  3. Copyright (c) 1993-98 by Florian Klaempfl, Pierre Muller
  4. Symbol table constants
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. ****************************************************************************
  17. }
  18. const
  19. def_alignment = 4;
  20. { symbol options }
  21. { this is only for object/class }
  22. sp_public = $1;
  23. sp_private = $2;
  24. sp_published = $4;
  25. sp_protected = $8;
  26. sp_forwarddef = $10;
  27. sp_static = $20;
  28. { this is for typesym }
  29. { to know who is the primary symbol of a def }
  30. sp_primary_typesym = $40;
  31. { flags for a definition }
  32. df_needsrtti = $1; { the definitions needs rtti }
  33. df_hasrtti = $2; { the rtti is generated }
  34. { options for tprocdef and tprocvardef }
  35. poexceptions = $1; { unused }
  36. povirtualmethod = $2; { Procedure is a virtual method }
  37. poclearstack = $4; { Use IBM flat calling convention. (Used by GCC.) }
  38. poconstructor = $8; { Procedure is a constructor }
  39. podestructor = $10; { Procedure is a destructor }
  40. pointernproc = $20; { Procedure has compiler magic}
  41. poexports = $40; { Procedure is exported }
  42. poiocheck = $80; { IO checking should be done after a call to the procedure }
  43. poabstractmethod = $100; { Procedure is an abstract method }
  44. pointerrupt = $200; { Procedure is an interrupt handler }
  45. poinline = $400; { Procedure is an assembler macro }
  46. poassembler = $800; { Procedure is written in assembler }
  47. pooperator = $1000; { Procedure defines an operator }
  48. poexternal = $2000; { Procedure is external (in other object or lib)}
  49. poleftright = $4000; { Push parameters from left to right }
  50. poproginit = $8000; { Program initialization }
  51. postaticmethod = $10000; { static method }
  52. pooverridingmethod=$20000; { method with override directive }
  53. poclassmethod = $40000; { class method }
  54. pounitinit = $80000; { unit initialization }
  55. pomethodpointer = $100000; { method pointer, only in procvardef, also used for 'with object do' }
  56. pocdecl = $200000; { procedure uses C styled calling }
  57. popalmossyscall = $400000; { procedure is a PalmOS system call }
  58. pointernconst = $800000; { procedure has constant evaluator intern }
  59. poregister = $1000000; { procedure uses register (fastcall) calling }
  60. pounitfinalize = $2000000; { unit finalization }
  61. postdcall = $4000000; { procedure uses stdcall call }
  62. pomsgstr = $8000000; { method for string message handling }
  63. pomsgint = $10000000; { method for int message handling }
  64. posavestdregs = $20000000; { save std regs cdecl and stdcall need that ! }
  65. pocontainsself = $40000000; { self is passed explicit to the compiler }
  66. { relevant options for assigning a proc or a procvar to a procvar }
  67. posafecall = $80000000; { safe call calling conventions }
  68. po_compatibility_options = $7FFFFFFF-
  69. (pomethodpointer+povirtualmethod+pooverridingmethod);
  70. { options for objects and classes }
  71. oo_is_abstract = $1; { true, if the object/class has an abstract }
  72. { method => no instances can be created }
  73. oo_is_class = $2;
  74. oo_hasvirtual = $4; { true, if the object/class has virtual methods }
  75. oo_hasprivate = $8;
  76. oo_hasprotected = $10;
  77. oo_isforward = $20; { true, if the class is only a forward declared yet }
  78. oo_can_have_published = $40; { true, if the class has rtti, i.e. you }
  79. { can publish properties }
  80. oo_hasconstructor = $80; { true, if the object/class has a constructor }
  81. oo_hasdestructor = $100; { true, if the object/class has a destructor }
  82. oo_hasvmt = $200; { true, if the object/class has a vmt }
  83. oo_hasmsgstr = $400;
  84. oo_hasmsgint = $800;
  85. oo_cppvmt = $1000; { true, if the object/class uses an C++ compatible }
  86. { vmt, all members of the same class tree }
  87. { must use then a C++ compatible vmt }
  88. { options for properties }
  89. ppo_indexed = $1;
  90. ppo_defaultproperty = $2;
  91. ppo_stored = $4;
  92. { options for variables }
  93. vo_regable = $1;
  94. vo_is_C_var = $2;
  95. vo_is_external = $4;
  96. vo_is_dll_var = $8;
  97. vo_is_thread_var = $10;
  98. {
  99. $Log$
  100. Revision 1.9 1999-05-24 08:55:29 florian
  101. * non working safecall directiv implemented, I don't know if we
  102. need it
  103. Revision 1.8 1999/05/20 22:22:42 pierre
  104. + added synonym filed for ttypesym
  105. allows a clean disposal of tdefs and related ttypesyms
  106. Revision 1.7 1999/05/12 22:36:13 florian
  107. * override isn't allowed in objects!
  108. Revision 1.6 1999/04/28 06:02:10 florian
  109. * changes of Bruessel:
  110. + message handler can now take an explicit self
  111. * typinfo fixed: sometimes the type names weren't written
  112. * the type checking for pointer comparisations and subtraction
  113. and are now more strict (was also buggy)
  114. * small bug fix to link.pas to support compiling on another
  115. drive
  116. * probable bug in popt386 fixed: call/jmp => push/jmp
  117. transformation didn't count correctly the jmp references
  118. + threadvar support
  119. * warning if ln/sqrt gets an invalid constant argument
  120. Revision 1.5 1999/04/26 13:31:46 peter
  121. * release storenumber,double_checksum
  122. Revision 1.4 1999/04/16 10:28:26 pierre
  123. + added posavestdregs used for cdecl AND stdcall functions
  124. (saves ESI EDI and EBX for i386)
  125. Revision 1.3 1999/03/05 01:14:23 pierre
  126. * bug0198 : call conventions for methods
  127. not yet implemented is the control of same calling convention
  128. for virtual and child's virtual
  129. * msgstr and msgint only created if message was found
  130. who implemented this by the way ?
  131. it leaks lots of plabels !!!! (check with heaptrc !)
  132. Revision 1.2 1999/02/22 20:13:37 florian
  133. + first implementation of message keyword
  134. Revision 1.1 1999/01/12 14:32:49 peter
  135. * splitted from symtable.pas
  136. }