symconst.inc 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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. sp_public = $1;
  22. sp_private = $2;
  23. sp_published = $4;
  24. sp_protected = $8;
  25. sp_forwarddef = $10;
  26. sp_static = $20;
  27. { flags for a definition }
  28. df_needsrtti = $1; { the definitions needs rtti }
  29. df_hasrtti = $2; { the rtti is generated }
  30. { options for tprocdef and tprocvardef }
  31. poexceptions = $1; { unused }
  32. povirtualmethod = $2; { Procedure is a virtual method }
  33. poclearstack = $4; { Use IBM flat calling convention. (Used by GCC.) }
  34. poconstructor = $8; { Procedure is a constructor }
  35. podestructor = $10; { Procedure is a destructor }
  36. pointernproc = $20; { Procedure has compiler magic}
  37. poexports = $40; { Procedure is exported }
  38. poiocheck = $80; { IO checking should be done after a call to the procedure }
  39. poabstractmethod = $100; { Procedure is an abstract method }
  40. pointerrupt = $200; { Procedure is an interrupt handler }
  41. poinline = $400; { Procedure is an assembler macro }
  42. poassembler = $800; { Procedure is written in assembler }
  43. pooperator = $1000; { Procedure defines an operator }
  44. poexternal = $2000; { Procedure is external (in other object or lib)}
  45. poleftright = $4000; { Push parameters from left to right }
  46. poproginit = $8000; { Program initialization }
  47. postaticmethod = $10000; { static method }
  48. pooverridingmethod=$20000; { method with override directive }
  49. poclassmethod = $40000; { class method }
  50. pounitinit = $80000; { unit initialization }
  51. pomethodpointer = $100000; { method pointer, only in procvardef, also used for 'with object do' }
  52. pocdecl = $200000; { procedure uses C styled calling }
  53. popalmossyscall = $400000; { procedure is a PalmOS system call }
  54. pointernconst = $800000; { procedure has constant evaluator intern }
  55. poregister = $1000000; { procedure uses register (fastcall) calling }
  56. pounitfinalize = $2000000; { unit finalization }
  57. postdcall = $4000000; { procedure uses stdcall call }
  58. pomsgstr = $8000000; { method for string message handling }
  59. pomsgint = $10000000; { method for int message handling }
  60. posavestdregs = $20000000; { save std regs cdecl and stdcall need that ! }
  61. pocontainsself = $40000000; { self is passed explicit to the compiler }
  62. { relevant options for assigning a proc or a procvar to a procvar }
  63. po_compatibility_options = $7FFFFFFF-
  64. (pomethodpointer+povirtualmethod+pooverridingmethod);
  65. { options for objects and classes }
  66. oo_is_abstract = $1; { true, if the object/class has an abstract }
  67. { method => no instances can be created }
  68. oo_is_class = $2;
  69. oo_hasvirtual = $4; { true, if the object/class has virtual methods }
  70. oo_hasprivate = $8;
  71. oo_hasprotected = $10;
  72. oo_isforward = $20; { true, if the class is only a forward declared yet }
  73. oo_can_have_published = $40; { true, if the class has rtti, i.e. you }
  74. { can publish properties }
  75. oo_hasconstructor = $80; { true, if the object/class has a constructor }
  76. oo_hasdestructor = $100; { true, if the object/class has a destructor }
  77. oo_hasvmt = $200; { true, if the object/class has a vmt }
  78. oo_hasmsgstr = $400;
  79. oo_hasmsgint = $800;
  80. oo_cppvmt = $1000; { true, if the object/class uses an C++ compatible }
  81. { vmt, all members of the same class tree }
  82. { must use then a C++ compatible vmt }
  83. { options for properties }
  84. ppo_indexed = $1;
  85. ppo_defaultproperty = $2;
  86. ppo_stored = $4;
  87. { options for variables }
  88. vo_regable = $1;
  89. vo_is_C_var = $2;
  90. vo_is_external = $4;
  91. vo_is_dll_var = $8;
  92. vo_is_thread_var = $10;
  93. {
  94. $Log$
  95. Revision 1.7 1999-05-12 22:36:13 florian
  96. * override isn't allowed in objects!
  97. Revision 1.6 1999/04/28 06:02:10 florian
  98. * changes of Bruessel:
  99. + message handler can now take an explicit self
  100. * typinfo fixed: sometimes the type names weren't written
  101. * the type checking for pointer comparisations and subtraction
  102. and are now more strict (was also buggy)
  103. * small bug fix to link.pas to support compiling on another
  104. drive
  105. * probable bug in popt386 fixed: call/jmp => push/jmp
  106. transformation didn't count correctly the jmp references
  107. + threadvar support
  108. * warning if ln/sqrt gets an invalid constant argument
  109. Revision 1.5 1999/04/26 13:31:46 peter
  110. * release storenumber,double_checksum
  111. Revision 1.4 1999/04/16 10:28:26 pierre
  112. + added posavestdregs used for cdecl AND stdcall functions
  113. (saves ESI EDI and EBX for i386)
  114. Revision 1.3 1999/03/05 01:14:23 pierre
  115. * bug0198 : call conventions for methods
  116. not yet implemented is the control of same calling convention
  117. for virtual and child's virtual
  118. * msgstr and msgint only created if message was found
  119. who implemented this by the way ?
  120. it leaks lots of plabels !!!! (check with heaptrc !)
  121. Revision 1.2 1999/02/22 20:13:37 florian
  122. + first implementation of message keyword
  123. Revision 1.1 1999/01/12 14:32:49 peter
  124. * splitted from symtable.pas
  125. }