ilData.mli 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. (*
  2. * This file is part of ilLib
  3. * Copyright (c)2004-2013 Haxe Foundation
  4. *
  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. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  18. *)
  19. open IlMeta;;
  20. type ilpath = string list * string list * string
  21. type ilsig = IlMeta.ilsig
  22. and ilsig_norm =
  23. | LVoid | LBool | LChar
  24. | LInt8 | LUInt8 | LInt16
  25. | LUInt16 | LInt32 | LUInt32
  26. | LInt64 | LUInt64 | LFloat32
  27. | LFloat64 | LString | LObject
  28. | LPointer of ilsig_norm
  29. | LTypedReference | LIntPtr | LUIntPtr
  30. | LManagedPointer of ilsig_norm
  31. | LValueType of ilpath * ilsig_norm list
  32. | LClass of ilpath * ilsig_norm list
  33. | LTypeParam of int
  34. | LMethodTypeParam of int
  35. | LVector of ilsig_norm
  36. | LArray of ilsig_norm * (int option * int option) array
  37. | LMethod of callconv list * ilsig_norm * (ilsig_norm list)
  38. | LSentinel
  39. and ilsig_t = {
  40. snorm : ilsig_norm;
  41. ssig : ilsig;
  42. }
  43. type ilversion = int * int (* minor + major *)
  44. type ilclass = {
  45. cpath : ilpath;
  46. cflags : type_def_flags;
  47. csuper : ilsig_t option;
  48. cfields : ilfield list;
  49. cmethods : ilmethod list;
  50. cimplements : ilsig_t list;
  51. ctypes : type_param list;
  52. cprops : ilprop list;
  53. cevents : ilevent list;
  54. (* cevents : *)
  55. cenclosing : ilpath option;
  56. cnested : ilpath list;
  57. cattrs : meta_custom_attribute list;
  58. }
  59. and type_param = {
  60. tnumber : int;
  61. tflags : generic_flags;
  62. tname : string option;
  63. tconstraints : ilsig_t list;
  64. }
  65. and ilevent = {
  66. ename : string;
  67. eflags : event_flags;
  68. eadd : (string * method_flags) option;
  69. eremove : (string * method_flags) option;
  70. eraise : (string * method_flags) option;
  71. esig : ilsig_t;
  72. }
  73. and ilfield = {
  74. fname : string;
  75. fflags : field_flags;
  76. fsig : ilsig_t;
  77. fconstant : constant option;
  78. }
  79. and ilmethod = {
  80. mname : string;
  81. mflags : method_flags;
  82. msig : ilsig_t;
  83. margs : ilmethod_arg list;
  84. mret : ilsig_t;
  85. moverride : (ilpath * string) option; (* method_impl *)
  86. (* refers to the signature of the declaring class *)
  87. mtypes : type_param list;
  88. msemantics : semantic_flags;
  89. }
  90. and ilmethod_arg = string * param_flags * ilsig_t
  91. and ilprop = {
  92. pname : string;
  93. psig : ilsig_t;
  94. pflags : property_flags;
  95. pget : (string * method_flags) option;
  96. pset : (string * method_flags) option;
  97. }
  98. type ilctx = {
  99. il_tables : (clr_meta DynArray.t) array;
  100. il_relations : (meta_pointer, clr_meta) Hashtbl.t;
  101. il_typedefs : (ilpath, meta_type_def) Hashtbl.t;
  102. }