symconst.inc 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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. posafecall = $80000000; { safe call calling conventions }
  67. { relevant options for assigning a proc or a procvar to a procvar }
  68. po_compatibility_options = $7FFFFFFF-
  69. (poassembler+pomsgstr+pomsgint+
  70. povirtualmethod+pooverridingmethod);
  71. { options for objects and classes }
  72. oo_is_abstract = $1; { true, if the object/class has an abstract }
  73. { method => no instances can be created }
  74. oo_is_class = $2;
  75. oo_hasvirtual = $4; { true, if the object/class has virtual methods }
  76. oo_hasprivate = $8;
  77. oo_hasprotected = $10;
  78. oo_isforward = $20; { true, if the class is only a forward declared yet }
  79. oo_can_have_published = $40; { true, if the class has rtti, i.e. you }
  80. { can publish properties }
  81. oo_hasconstructor = $80; { true, if the object/class has a constructor }
  82. oo_hasdestructor = $100; { true, if the object/class has a destructor }
  83. oo_hasvmt = $200; { true, if the object/class has a vmt }
  84. oo_hasmsgstr = $400;
  85. oo_hasmsgint = $800;
  86. oo_cppvmt = $1000; { true, if the object/class uses an C++ compatible }
  87. { vmt, all members of the same class tree }
  88. { must use then a C++ compatible vmt }
  89. { options for properties }
  90. ppo_indexed = $1;
  91. ppo_defaultproperty = $2;
  92. ppo_stored = $4;
  93. { options for variables }
  94. vo_regable = $1;
  95. vo_is_C_var = $2;
  96. vo_is_external = $4;
  97. vo_is_dll_var = $8;
  98. vo_is_thread_var = $10;
  99. {
  100. $Log$
  101. Revision 1.11 1999-06-03 09:34:11 peter
  102. * better methodpointer check for proc->procvar
  103. Revision 1.10 1999/06/01 19:27:56 peter
  104. * better checks for procvar and methodpointer
  105. Revision 1.9 1999/05/24 08:55:29 florian
  106. * non working safecall directiv implemented, I don't know if we
  107. need it
  108. Revision 1.8 1999/05/20 22:22:42 pierre
  109. + added synonym filed for ttypesym
  110. allows a clean disposal of tdefs and related ttypesyms
  111. Revision 1.7 1999/05/12 22:36:13 florian
  112. * override isn't allowed in objects!
  113. Revision 1.6 1999/04/28 06:02:10 florian
  114. * changes of Bruessel:
  115. + message handler can now take an explicit self
  116. * typinfo fixed: sometimes the type names weren't written
  117. * the type checking for pointer comparisations and subtraction
  118. and are now more strict (was also buggy)
  119. * small bug fix to link.pas to support compiling on another
  120. drive
  121. * probable bug in popt386 fixed: call/jmp => push/jmp
  122. transformation didn't count correctly the jmp references
  123. + threadvar support
  124. * warning if ln/sqrt gets an invalid constant argument
  125. Revision 1.5 1999/04/26 13:31:46 peter
  126. * release storenumber,double_checksum
  127. Revision 1.4 1999/04/16 10:28:26 pierre
  128. + added posavestdregs used for cdecl AND stdcall functions
  129. (saves ESI EDI and EBX for i386)
  130. Revision 1.3 1999/03/05 01:14:23 pierre
  131. * bug0198 : call conventions for methods
  132. not yet implemented is the control of same calling convention
  133. for virtual and child's virtual
  134. * msgstr and msgint only created if message was found
  135. who implemented this by the way ?
  136. it leaks lots of plabels !!!! (check with heaptrc !)
  137. Revision 1.2 1999/02/22 20:13:37 florian
  138. + first implementation of message keyword
  139. Revision 1.1 1999/01/12 14:32:49 peter
  140. * splitted from symtable.pas
  141. }