"Fossies" - the Fresh Open Source Software Archive

Member "fsharp-4.5/src/absil/ilbinary.fs" (5 Sep 2018, 32208 Bytes) of package /linux/misc/mono-sources/fsharp/fsharp-4.5.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) F# source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "ilbinary.fs": 4.1.33_vs_4.5.

    1 // Copyright (c) Microsoft Corporation.  All Rights Reserved.  See License.txt in the project root for license information.
    2 
    3 module internal Microsoft.FSharp.Compiler.AbstractIL.Internal.BinaryConstants 
    4 
    5 open Internal.Utilities
    6 open Microsoft.FSharp.Compiler.AbstractIL 
    7 open Microsoft.FSharp.Compiler.AbstractIL.IL 
    8 open Microsoft.FSharp.Compiler.AbstractIL.Internal 
    9 open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
   10 
   11 [<Struct>]
   12 type TableName(idx: int) = 
   13     member x.Index = idx
   14     static member FromIndex n = TableName n 
   15 
   16 module TableNames = 
   17     let Module               = TableName 0  
   18     let TypeRef              = TableName 1  
   19     let TypeDef              = TableName 2  
   20     let FieldPtr             = TableName 3  
   21     let Field                = TableName 4  
   22     let MethodPtr            = TableName 5  
   23     let Method               = TableName 6  
   24     let ParamPtr             = TableName 7  
   25     let Param                = TableName 8  
   26     let InterfaceImpl        = TableName 9  
   27     let MemberRef            = TableName 10 
   28     let Constant             = TableName 11 
   29     let CustomAttribute      = TableName 12 
   30     let FieldMarshal         = TableName 13 
   31     let Permission           = TableName 14 
   32     let ClassLayout          = TableName 15 
   33     let FieldLayout          = TableName 16 
   34     let StandAloneSig        = TableName 17 
   35     let EventMap             = TableName 18 
   36     let EventPtr             = TableName 19 
   37     let Event                = TableName 20 
   38     let PropertyMap          = TableName 21 
   39     let PropertyPtr          = TableName 22 
   40     let Property             = TableName 23 
   41     let MethodSemantics      = TableName 24 
   42     let MethodImpl           = TableName 25 
   43     let ModuleRef            = TableName 26 
   44     let TypeSpec             = TableName 27 
   45     let ImplMap              = TableName 28 
   46     let FieldRVA             = TableName 29 
   47     let ENCLog               = TableName 30 
   48     let ENCMap               = TableName 31 
   49     let Assembly             = TableName 32 
   50     let AssemblyProcessor    = TableName 33 
   51     let AssemblyOS           = TableName 34 
   52     let AssemblyRef          = TableName 35 
   53     let AssemblyRefProcessor = TableName 36 
   54     let AssemblyRefOS        = TableName 37 
   55     let File                 = TableName 38 
   56     let ExportedType         = TableName 39 
   57     let ManifestResource     = TableName 40 
   58     let Nested               = TableName 41 
   59     let GenericParam           = TableName 42 
   60     let MethodSpec           = TableName 43 
   61     let GenericParamConstraint = TableName 44
   62 
   63     let UserStrings           = TableName 0x70 (* Special encoding of embedded UserString tokens - See 1.9 Partition III *) 
   64 
   65 /// Which tables are sorted and by which column. 
   66 //
   67 // Sorted bit-vector as stored by CLR V1: 00fa 0133 0002 0000 
   68 // But what does this mean?  The ECMA spec does not say! 
   69 // Metainfo -schema reports sorting as shown below. 
   70 // But some sorting, e.g. EventMap does not seem to show 
   71 let sortedTableInfo = 
   72   [ (TableNames.InterfaceImpl,0) 
   73     (TableNames.Constant, 1)
   74     (TableNames.CustomAttribute, 0)
   75     (TableNames.FieldMarshal, 0)
   76     (TableNames.Permission, 1)
   77     (TableNames.ClassLayout, 2)
   78     (TableNames.FieldLayout, 1)
   79     (TableNames.MethodSemantics, 2)
   80     (TableNames.MethodImpl, 0)
   81     (TableNames.ImplMap, 1)
   82     (TableNames.FieldRVA, 1)
   83     (TableNames.Nested, 0)
   84     (TableNames.GenericParam, 2) 
   85     (TableNames.GenericParamConstraint, 0) ]
   86     
   87 [<Struct>]
   88 type TypeDefOrRefTag(tag: int32) = member x.Tag = tag
   89 let tdor_TypeDef = TypeDefOrRefTag 0x00
   90 let tdor_TypeRef = TypeDefOrRefTag 0x01
   91 let tdor_TypeSpec = TypeDefOrRefTag 0x2
   92 let mkTypeDefOrRefOrSpecTag x = 
   93     match x with 
   94     | 0x00 -> tdor_TypeDef // nb. avoid reallocation 
   95     | 0x01 -> tdor_TypeRef
   96     | 0x02 -> tdor_TypeSpec
   97     | _ -> invalidArg "x" "mkTypeDefOrRefOrSpecTag"
   98 
   99 [<Struct>]
  100 type HasConstantTag(tag: int32) = member x.Tag = tag
  101 let hc_FieldDef  = HasConstantTag 0x0
  102 let hc_ParamDef  = HasConstantTag 0x1
  103 let hc_Property = HasConstantTag 0x2
  104 
  105 let mkHasConstantTag x = 
  106     match x with 
  107     | 0x00 -> hc_FieldDef
  108     | 0x01 -> hc_ParamDef
  109     | 0x02 -> hc_Property
  110     | _ -> invalidArg "x" "mkHasConstantTag"
  111 
  112 [<Struct>]
  113 type HasCustomAttributeTag(tag: int32) = member x.Tag = tag
  114 let hca_MethodDef       = HasCustomAttributeTag 0x0
  115 let hca_FieldDef        = HasCustomAttributeTag 0x1
  116 let hca_TypeRef         = HasCustomAttributeTag 0x2
  117 let hca_TypeDef         = HasCustomAttributeTag 0x3
  118 let hca_ParamDef        = HasCustomAttributeTag 0x4
  119 let hca_InterfaceImpl   = HasCustomAttributeTag 0x5
  120 let hca_MemberRef       = HasCustomAttributeTag 0x6
  121 let hca_Module          = HasCustomAttributeTag 0x7
  122 let hca_Permission      = HasCustomAttributeTag 0x8
  123 let hca_Property        = HasCustomAttributeTag 0x9
  124 let hca_Event           = HasCustomAttributeTag 0xa
  125 let hca_StandAloneSig   = HasCustomAttributeTag 0xb
  126 let hca_ModuleRef       = HasCustomAttributeTag 0xc
  127 let hca_TypeSpec        = HasCustomAttributeTag 0xd
  128 let hca_Assembly        = HasCustomAttributeTag 0xe
  129 let hca_AssemblyRef     = HasCustomAttributeTag 0xf
  130 let hca_File            = HasCustomAttributeTag 0x10
  131 let hca_ExportedType    = HasCustomAttributeTag 0x11
  132 let hca_ManifestResource        = HasCustomAttributeTag 0x12
  133 let hca_GenericParam            = HasCustomAttributeTag 0x13
  134 let hca_GenericParamConstraint  = HasCustomAttributeTag 0x14
  135 let hca_MethodSpec              = HasCustomAttributeTag 0x15
  136 
  137 let mkHasCustomAttributeTag x = 
  138     match x with 
  139     | 0x00 -> hca_MethodDef  
  140     | 0x01 -> hca_FieldDef 
  141     | 0x02 -> hca_TypeRef  
  142     | 0x03 -> hca_TypeDef 
  143     | 0x04 -> hca_ParamDef 
  144     | 0x05 -> hca_InterfaceImpl 
  145     | 0x06 -> hca_MemberRef 
  146     | 0x07 -> hca_Module 
  147     | 0x08 -> hca_Permission 
  148     | 0x09 -> hca_Property 
  149     | 0x0a -> hca_Event 
  150     | 0x0b -> hca_StandAloneSig 
  151     | 0x0c -> hca_ModuleRef 
  152     | 0x0d -> hca_TypeSpec 
  153     | 0x0e -> hca_Assembly 
  154     | 0x0f -> hca_AssemblyRef 
  155     | 0x10 -> hca_File 
  156     | 0x11 -> hca_ExportedType 
  157     | 0x12 -> hca_ManifestResource
  158     | 0x13 -> hca_GenericParam
  159     | 0x14 -> hca_GenericParamConstraint
  160     | 0x15 -> hca_MethodSpec 
  161     | _ -> HasCustomAttributeTag x
  162 
  163 [<Struct>]
  164 type HasFieldMarshalTag(tag: int32) = member x.Tag = tag
  165 let hfm_FieldDef =  HasFieldMarshalTag 0x00
  166 let hfm_ParamDef =  HasFieldMarshalTag 0x01
  167 
  168 let mkHasFieldMarshalTag x = 
  169     match x with 
  170     | 0x00 -> hfm_FieldDef 
  171     | 0x01 -> hfm_ParamDef 
  172     | _ -> HasFieldMarshalTag x
  173 
  174 [<Struct>]
  175 type HasDeclSecurityTag(tag: int32) = member x.Tag = tag
  176 let hds_TypeDef =  HasDeclSecurityTag 0x00
  177 let hds_MethodDef =  HasDeclSecurityTag 0x01
  178 let hds_Assembly =  HasDeclSecurityTag 0x02
  179 
  180 let mkHasDeclSecurityTag x = 
  181     match x with 
  182     | 0x00 -> hds_TypeDef 
  183     | 0x01 -> hds_MethodDef 
  184     | 0x02 -> hds_Assembly 
  185     | _ -> HasDeclSecurityTag x
  186 
  187 [<Struct>]
  188 type MemberRefParentTag(tag: int32) = member x.Tag = tag
  189 let mrp_TypeRef = MemberRefParentTag 0x01
  190 let mrp_ModuleRef = MemberRefParentTag 0x02
  191 let mrp_MethodDef = MemberRefParentTag 0x03
  192 let mrp_TypeSpec  = MemberRefParentTag 0x04
  193 
  194 let mkMemberRefParentTag x = 
  195     match x with 
  196     | 0x01 -> mrp_TypeRef 
  197     | 0x02 -> mrp_ModuleRef 
  198     | 0x03 -> mrp_MethodDef 
  199     | 0x04 -> mrp_TypeSpec  
  200     | _ -> MemberRefParentTag x
  201 
  202 [<Struct>]
  203 type HasSemanticsTag(tag: int32) = member x.Tag = tag
  204 let hs_Event =  HasSemanticsTag 0x00
  205 let hs_Property =  HasSemanticsTag 0x01
  206 
  207 let mkHasSemanticsTag x = 
  208     match x with 
  209     | 0x00 -> hs_Event 
  210     | 0x01 -> hs_Property 
  211     | _ -> HasSemanticsTag x
  212 
  213 [<Struct>]
  214 type MethodDefOrRefTag(tag: int32) = member x.Tag = tag
  215 let mdor_MethodDef =  MethodDefOrRefTag 0x00
  216 let mdor_MemberRef =  MethodDefOrRefTag 0x01
  217 let mdor_MethodSpec =  MethodDefOrRefTag 0x02
  218 
  219 let mkMethodDefOrRefTag x = 
  220     match x with 
  221     | 0x00 -> mdor_MethodDef 
  222     | 0x01 -> mdor_MemberRef 
  223     | 0x02 -> mdor_MethodSpec 
  224     | _ -> MethodDefOrRefTag x
  225 
  226 [<Struct>]
  227 type MemberForwardedTag(tag: int32) = member x.Tag = tag
  228 let mf_FieldDef =  MemberForwardedTag 0x00
  229 let mf_MethodDef =  MemberForwardedTag 0x01
  230 
  231 let mkMemberForwardedTag x = 
  232     match x with 
  233     | 0x00 -> mf_FieldDef 
  234     | 0x01 -> mf_MethodDef 
  235     | _ -> MemberForwardedTag x
  236 
  237 [<Struct>]
  238 type ImplementationTag(tag: int32) = member x.Tag = tag
  239 let i_File =  ImplementationTag 0x00
  240 let i_AssemblyRef =  ImplementationTag 0x01
  241 let i_ExportedType =  ImplementationTag 0x02
  242 
  243 let mkImplementationTag x = 
  244     match x with 
  245     | 0x00 -> i_File 
  246     | 0x01 -> i_AssemblyRef 
  247     | 0x02 -> i_ExportedType 
  248     | _ -> ImplementationTag x
  249 
  250 [<Struct>]
  251 type CustomAttributeTypeTag(tag: int32) = member x.Tag = tag
  252 let cat_MethodDef =  CustomAttributeTypeTag 0x02
  253 let cat_MemberRef =  CustomAttributeTypeTag 0x03
  254 
  255 let mkILCustomAttributeTypeTag x = 
  256     match x with 
  257     | 0x02 -> cat_MethodDef 
  258     | 0x03 -> cat_MemberRef 
  259     | _ -> CustomAttributeTypeTag x
  260 
  261 [<Struct>]
  262 type ResolutionScopeTag(tag: int32) = member x.Tag = tag
  263 let rs_Module =  ResolutionScopeTag 0x00
  264 let rs_ModuleRef =  ResolutionScopeTag 0x01
  265 let rs_AssemblyRef  =  ResolutionScopeTag 0x02
  266 let rs_TypeRef =  ResolutionScopeTag 0x03
  267 
  268 let mkResolutionScopeTag x = 
  269     match x with 
  270     | 0x00 -> rs_Module 
  271     | 0x01 -> rs_ModuleRef 
  272     | 0x02 -> rs_AssemblyRef  
  273     | 0x03 -> rs_TypeRef 
  274     | _ -> ResolutionScopeTag x
  275 
  276 [<Struct>]
  277 type TypeOrMethodDefTag(tag: int32) = member x.Tag = tag
  278 let tomd_TypeDef = TypeOrMethodDefTag 0x00
  279 let tomd_MethodDef = TypeOrMethodDefTag 0x01
  280 
  281 let mkTypeOrMethodDefTag x = 
  282     match x with 
  283     | 0x00 -> tomd_TypeDef 
  284     | 0x01 -> tomd_MethodDef
  285     | _ -> TypeOrMethodDefTag x
  286 
  287 let et_END = 0x00uy
  288 let et_VOID = 0x01uy
  289 let et_BOOLEAN = 0x02uy
  290 let et_CHAR = 0x03uy
  291 let et_I1 = 0x04uy
  292 let et_U1 = 0x05uy
  293 let et_I2 = 0x06uy
  294 let et_U2 = 0x07uy
  295 let et_I4 = 0x08uy
  296 let et_U4 = 0x09uy
  297 let et_I8 = 0x0Auy
  298 let et_U8 = 0x0Buy
  299 let et_R4 = 0x0Cuy
  300 let et_R8 = 0x0Duy
  301 let et_STRING = 0x0Euy
  302 let et_PTR = 0x0Fuy
  303 let et_BYREF = 0x10uy
  304 let et_VALUETYPE      = 0x11uy
  305 let et_CLASS          = 0x12uy
  306 let et_VAR            = 0x13uy
  307 let et_ARRAY          = 0x14uy
  308 let et_WITH           = 0x15uy
  309 let et_TYPEDBYREF     = 0x16uy
  310 let et_I              = 0x18uy
  311 let et_U              = 0x19uy
  312 let et_FNPTR          = 0x1Buy
  313 let et_OBJECT         = 0x1Cuy
  314 let et_SZARRAY        = 0x1Duy
  315 let et_MVAR           = 0x1euy
  316 let et_CMOD_REQD      = 0x1Fuy
  317 let et_CMOD_OPT       = 0x20uy
  318 
  319 let et_SENTINEL       = 0x41uy // sentinel for varargs 
  320 let et_PINNED         = 0x45uy
  321 
  322 
  323 let i_nop           = 0x00 
  324 let i_break         = 0x01 
  325 let i_ldarg_0       = 0x02 
  326 let i_ldarg_1       = 0x03 
  327 let i_ldarg_2       = 0x04 
  328 let i_ldarg_3       = 0x05 
  329 let i_ldloc_0       = 0x06 
  330 let i_ldloc_1       = 0x07 
  331 let i_ldloc_2       = 0x08 
  332 let i_ldloc_3       = 0x09 
  333 let i_stloc_0       = 0x0a 
  334 let i_stloc_1       = 0x0b 
  335 let i_stloc_2       = 0x0c 
  336 let i_stloc_3       = 0x0d 
  337 let i_ldarg_s       = 0x0e 
  338 let i_ldarga_s      = 0x0f 
  339 let i_starg_s       = 0x10 
  340 let i_ldloc_s       = 0x11 
  341 let i_ldloca_s      = 0x12 
  342 let i_stloc_s       = 0x13 
  343 let i_ldnull        = 0x14 
  344 let i_ldc_i4_m1     = 0x15 
  345 let i_ldc_i4_0      = 0x16 
  346 let i_ldc_i4_1      = 0x17 
  347 let i_ldc_i4_2      = 0x18 
  348 let i_ldc_i4_3      = 0x19 
  349 let i_ldc_i4_4      = 0x1a 
  350 let i_ldc_i4_5      = 0x1b 
  351 let i_ldc_i4_6      = 0x1c 
  352 let i_ldc_i4_7      = 0x1d 
  353 let i_ldc_i4_8      = 0x1e 
  354 let i_ldc_i4_s      = 0x1f 
  355 let i_ldc_i4        = 0x20 
  356 let i_ldc_i8        = 0x21 
  357 let i_ldc_r4        = 0x22 
  358 let i_ldc_r8        = 0x23 
  359 let i_dup           = 0x25 
  360 let i_pop           = 0x26 
  361 let i_jmp           = 0x27 
  362 let i_call          = 0x28 
  363 let i_calli         = 0x29 
  364 let i_ret           = 0x2a 
  365 let i_br_s          = 0x2b 
  366 let i_brfalse_s     = 0x2c 
  367 let i_brtrue_s      = 0x2d 
  368 let i_beq_s         = 0x2e 
  369 let i_bge_s         = 0x2f 
  370 let i_bgt_s         = 0x30 
  371 let i_ble_s         = 0x31 
  372 let i_blt_s         = 0x32 
  373 let i_bne_un_s      = 0x33 
  374 let i_bge_un_s      = 0x34 
  375 let i_bgt_un_s      = 0x35 
  376 let i_ble_un_s      = 0x36 
  377 let i_blt_un_s      = 0x37 
  378 let i_br            = 0x38 
  379 let i_brfalse       = 0x39 
  380 let i_brtrue        = 0x3a 
  381 let i_beq           = 0x3b 
  382 let i_bge           = 0x3c 
  383 let i_bgt           = 0x3d 
  384 let i_ble           = 0x3e 
  385 let i_blt           = 0x3f 
  386 let i_bne_un        = 0x40 
  387 let i_bge_un        = 0x41 
  388 let i_bgt_un        = 0x42 
  389 let i_ble_un        = 0x43 
  390 let i_blt_un        = 0x44 
  391 let i_switch        = 0x45 
  392 let i_ldind_i1      = 0x46 
  393 let i_ldind_u1      = 0x47 
  394 let i_ldind_i2      = 0x48 
  395 let i_ldind_u2      = 0x49 
  396 let i_ldind_i4      = 0x4a 
  397 let i_ldind_u4      = 0x4b 
  398 let i_ldind_i8      = 0x4c 
  399 let i_ldind_i       = 0x4d 
  400 let i_ldind_r4      = 0x4e 
  401 let i_ldind_r8      = 0x4f 
  402 let i_ldind_ref     = 0x50 
  403 let i_stind_ref     = 0x51 
  404 let i_stind_i1      = 0x52 
  405 let i_stind_i2      = 0x53 
  406 let i_stind_i4      = 0x54 
  407 let i_stind_i8      = 0x55 
  408 let i_stind_r4      = 0x56 
  409 let i_stind_r8      = 0x57 
  410 let i_add           = 0x58 
  411 let i_sub           = 0x59 
  412 let i_mul           = 0x5a 
  413 let i_div           = 0x5b 
  414 let i_div_un        = 0x5c 
  415 let i_rem           = 0x5d 
  416 let i_rem_un        = 0x5e 
  417 let i_and           = 0x5f 
  418 let i_or            = 0x60 
  419 let i_xor           = 0x61 
  420 let i_shl           = 0x62 
  421 let i_shr           = 0x63 
  422 let i_shr_un        = 0x64 
  423 let i_neg           = 0x65 
  424 let i_not           = 0x66 
  425 let i_conv_i1       = 0x67 
  426 let i_conv_i2       = 0x68 
  427 let i_conv_i4       = 0x69 
  428 let i_conv_i8       = 0x6a 
  429 let i_conv_r4       = 0x6b 
  430 let i_conv_r8       = 0x6c 
  431 let i_conv_u4       = 0x6d 
  432 let i_conv_u8       = 0x6e 
  433 let i_callvirt      = 0x6f 
  434 let i_cpobj         = 0x70 
  435 let i_ldobj         = 0x71 
  436 let i_ldstr         = 0x72 
  437 let i_newobj        = 0x73 
  438 let i_castclass     = 0x74 
  439 let i_isinst        = 0x75 
  440 let i_conv_r_un     = 0x76 
  441 let i_unbox         = 0x79 
  442 let i_throw         = 0x7a 
  443 let i_ldfld         = 0x7b 
  444 let i_ldflda        = 0x7c 
  445 let i_stfld         = 0x7d 
  446 let i_ldsfld        = 0x7e 
  447 let i_ldsflda       = 0x7f 
  448 let i_stsfld        = 0x80 
  449 let i_stobj         = 0x81 
  450 let i_conv_ovf_i1_un= 0x82 
  451 let i_conv_ovf_i2_un= 0x83 
  452 let i_conv_ovf_i4_un= 0x84 
  453 let i_conv_ovf_i8_un= 0x85 
  454 let i_conv_ovf_u1_un= 0x86 
  455 let i_conv_ovf_u2_un= 0x87 
  456 let i_conv_ovf_u4_un= 0x88 
  457 let i_conv_ovf_u8_un= 0x89 
  458 let i_conv_ovf_i_un = 0x8a 
  459 let i_conv_ovf_u_un = 0x8b 
  460 let i_box           = 0x8c 
  461 let i_newarr        = 0x8d 
  462 let i_ldlen         = 0x8e 
  463 let i_ldelema       = 0x8f 
  464 let i_ldelem_i1     = 0x90 
  465 let i_ldelem_u1     = 0x91 
  466 let i_ldelem_i2     = 0x92 
  467 let i_ldelem_u2     = 0x93 
  468 let i_ldelem_i4     = 0x94 
  469 let i_ldelem_u4     = 0x95 
  470 let i_ldelem_i8     = 0x96 
  471 let i_ldelem_i      = 0x97 
  472 let i_ldelem_r4     = 0x98 
  473 let i_ldelem_r8     = 0x99 
  474 let i_ldelem_ref    = 0x9a 
  475 let i_stelem_i      = 0x9b 
  476 let i_stelem_i1     = 0x9c 
  477 let i_stelem_i2     = 0x9d 
  478 let i_stelem_i4     = 0x9e 
  479 let i_stelem_i8     = 0x9f 
  480 let i_stelem_r4     = 0xa0 
  481 let i_stelem_r8     = 0xa1 
  482 let i_stelem_ref    = 0xa2 
  483 let i_conv_ovf_i1   = 0xb3 
  484 let i_conv_ovf_u1   = 0xb4 
  485 let i_conv_ovf_i2   = 0xb5 
  486 let i_conv_ovf_u2   = 0xb6 
  487 let i_conv_ovf_i4   = 0xb7 
  488 let i_conv_ovf_u4   = 0xb8 
  489 let i_conv_ovf_i8   = 0xb9 
  490 let i_conv_ovf_u8   = 0xba 
  491 let i_refanyval     = 0xc2 
  492 let i_ckfinite      = 0xc3 
  493 let i_mkrefany      = 0xc6 
  494 let i_ldtoken       = 0xd0 
  495 let i_conv_u2       = 0xd1 
  496 let i_conv_u1       = 0xd2 
  497 let i_conv_i        = 0xd3 
  498 let i_conv_ovf_i    = 0xd4 
  499 let i_conv_ovf_u    = 0xd5 
  500 let i_add_ovf       = 0xd6 
  501 let i_add_ovf_un    = 0xd7 
  502 let i_mul_ovf       = 0xd8 
  503 let i_mul_ovf_un    = 0xd9 
  504 let i_sub_ovf       = 0xda 
  505 let i_sub_ovf_un    = 0xdb 
  506 let i_endfinally    = 0xdc 
  507 let i_leave         = 0xdd 
  508 let i_leave_s       = 0xde 
  509 let i_stind_i       = 0xdf 
  510 let i_conv_u        = 0xe0 
  511 let i_arglist        = 0xfe00
  512 let i_ceq        = 0xfe01
  513 let i_cgt        = 0xfe02
  514 let i_cgt_un        = 0xfe03
  515 let i_clt        = 0xfe04
  516 let i_clt_un        = 0xfe05
  517 let i_ldftn        = 0xfe06 
  518 let i_ldvirtftn    = 0xfe07 
  519 let i_ldarg          = 0xfe09 
  520 let i_ldarga         = 0xfe0a 
  521 let i_starg          = 0xfe0b 
  522 let i_ldloc          = 0xfe0c 
  523 let i_ldloca         = 0xfe0d 
  524 let i_stloc          = 0xfe0e 
  525 let i_localloc     = 0xfe0f 
  526 let i_endfilter    = 0xfe11 
  527 let i_unaligned   = 0xfe12 
  528 let i_volatile    = 0xfe13 
  529 let i_constrained    = 0xfe16
  530 let i_readonly    = 0xfe1e
  531 let i_tail           = 0xfe14 
  532 let i_initobj        = 0xfe15 
  533 let i_cpblk          = 0xfe17 
  534 let i_initblk        = 0xfe18 
  535 let i_rethrow        = 0xfe1a 
  536 let i_sizeof         = 0xfe1c 
  537 let i_refanytype   = 0xfe1d 
  538 
  539 let i_ldelem_any = 0xa3
  540 let i_stelem_any = 0xa4
  541 let i_unbox_any = 0xa5
  542 
  543 let mk_ldc i = mkLdcInt32 i
  544 let noArgInstrs  = 
  545    lazy [ i_ldc_i4_0,           mk_ldc 0
  546           i_ldc_i4_1,           mk_ldc 1
  547           i_ldc_i4_2,           mk_ldc 2
  548           i_ldc_i4_3,           mk_ldc 3
  549           i_ldc_i4_4,           mk_ldc 4
  550           i_ldc_i4_5,           mk_ldc 5
  551           i_ldc_i4_6,           mk_ldc 6
  552           i_ldc_i4_7,           mk_ldc 7
  553           i_ldc_i4_8,           mk_ldc 8
  554           i_ldc_i4_m1,           mk_ldc -1
  555           0x0a,            mkStloc 0us
  556           0x0b,            mkStloc 1us
  557           0x0c,            mkStloc 2us
  558           0x0d,            mkStloc 3us
  559           0x06,            mkLdloc 0us
  560           0x07,            mkLdloc 1us
  561           0x08,            mkLdloc 2us
  562           0x09,            mkLdloc 3us
  563           0x02,            mkLdarg 0us
  564           0x03,            mkLdarg 1us
  565           0x04,            mkLdarg 2us
  566           0x05,            mkLdarg 3us
  567           0x2a,              I_ret
  568           0x58,              AI_add
  569           0xd6,        AI_add_ovf
  570           0xd7,   AI_add_ovf_un
  571           0x5f,              AI_and
  572           0x5b,              AI_div
  573           0x5c,         AI_div_un
  574           0xfe01,              AI_ceq
  575           0xfe02,              AI_cgt
  576           0xfe03,         AI_cgt_un
  577           0xfe04,              AI_clt
  578           0xfe05,         AI_clt_un
  579           0x67,        AI_conv DT_I1
  580           0x68,   AI_conv DT_I2 
  581           0x69,   AI_conv DT_I4
  582           0x6a,   AI_conv DT_I8  
  583           0xd3,   AI_conv DT_I  
  584           0x6b,   AI_conv DT_R4  
  585           0x6c,   AI_conv DT_R8  
  586           0xd2,   AI_conv DT_U1  
  587           0xd1,   AI_conv DT_U2  
  588           0x6d,   AI_conv DT_U4  
  589           0x6e,   AI_conv DT_U8  
  590           0xe0,   AI_conv DT_U  
  591           0x76,   AI_conv DT_R  
  592           0xb3,   AI_conv_ovf DT_I1  
  593           0xb5,   AI_conv_ovf DT_I2  
  594           0xb7,   AI_conv_ovf DT_I4  
  595           0xb9,   AI_conv_ovf DT_I8  
  596           0xd4,   AI_conv_ovf DT_I  
  597           0xb4,   AI_conv_ovf DT_U1  
  598           0xb6,   AI_conv_ovf DT_U2  
  599           0xb8,   AI_conv_ovf DT_U4  
  600           0xba,   AI_conv_ovf DT_U8  
  601           0xd5,   AI_conv_ovf DT_U  
  602           0x82,   AI_conv_ovf_un DT_I1  
  603           0x83,   AI_conv_ovf_un DT_I2  
  604           0x84,   AI_conv_ovf_un DT_I4  
  605           0x85,   AI_conv_ovf_un DT_I8  
  606           0x8a,   AI_conv_ovf_un DT_I  
  607           0x86,   AI_conv_ovf_un DT_U1  
  608           0x87,   AI_conv_ovf_un DT_U2  
  609           0x88,   AI_conv_ovf_un DT_U4  
  610           0x89,   AI_conv_ovf_un DT_U8  
  611           0x8b,   AI_conv_ovf_un DT_U  
  612           0x9c,   I_stelem DT_I1  
  613           0x9d,   I_stelem DT_I2
  614           0x9e,   I_stelem DT_I4  
  615           0x9f,   I_stelem DT_I8  
  616           0xa0,   I_stelem DT_R4  
  617           0xa1,   I_stelem DT_R8  
  618           0x9b,   I_stelem DT_I  
  619           0xa2,   I_stelem DT_REF  
  620           0x90,   I_ldelem DT_I1
  621           0x92,   I_ldelem DT_I2  
  622           0x94,   I_ldelem DT_I4  
  623           0x96,   I_ldelem DT_I8  
  624           0x91,   I_ldelem DT_U1  
  625           0x93,   I_ldelem DT_U2  
  626           0x95,   I_ldelem DT_U4 
  627           0x98,   I_ldelem DT_R4  
  628           0x99,   I_ldelem DT_R8  
  629           0x97,   I_ldelem DT_I  
  630           0x9a,   I_ldelem DT_REF  
  631           0x5a,   AI_mul
  632           0xd8,   AI_mul_ovf
  633           0xd9,   AI_mul_ovf_un
  634           0x5d,   AI_rem
  635           0x5e,   AI_rem_un
  636           0x62,   AI_shl 
  637           0x63,   AI_shr
  638           0x64,   AI_shr_un
  639           0x59,   AI_sub
  640           0xda,   AI_sub_ovf
  641           0xdb,   AI_sub_ovf_un
  642           0x61,   AI_xor
  643           0x60,   AI_or
  644           0x65,   AI_neg
  645           0x66,   AI_not
  646           i_ldnull,     AI_ldnull
  647           i_dup,        AI_dup
  648           i_pop,        AI_pop
  649           i_ckfinite,   AI_ckfinite
  650           i_nop,        AI_nop
  651           i_break,      I_break
  652           i_arglist,    I_arglist
  653           i_endfilter,  I_endfilter
  654           i_endfinally, I_endfinally
  655           i_refanytype, I_refanytype
  656           i_localloc,   I_localloc
  657           i_throw,      I_throw
  658           i_ldlen,      I_ldlen
  659           i_rethrow,    I_rethrow ]
  660 
  661 let isNoArgInstr i = 
  662   match i with 
  663   | AI_ldc (DT_I4, ILConst.I4 n) when -1 <= n && n <= 8 -> true
  664   | I_stloc n | I_ldloc n | I_ldarg n when n <= 3us -> true
  665   | I_ret
  666   | AI_add
  667   | AI_add_ovf
  668   | AI_add_ovf_un
  669   | AI_and  
  670   | AI_div 
  671   | AI_div_un
  672   | AI_ceq  
  673   | AI_cgt 
  674   | AI_cgt_un
  675   | AI_clt
  676   | AI_clt_un
  677   | AI_conv DT_I1  
  678   | AI_conv DT_I2  
  679   | AI_conv DT_I4  
  680   | AI_conv DT_I8  
  681   | AI_conv DT_I  
  682   | AI_conv DT_R4  
  683   | AI_conv DT_R8  
  684   | AI_conv DT_U1  
  685   | AI_conv DT_U2  
  686   | AI_conv DT_U4  
  687   | AI_conv DT_U8  
  688   | AI_conv DT_U  
  689   | AI_conv DT_R  
  690   | AI_conv_ovf DT_I1  
  691   | AI_conv_ovf DT_I2  
  692   | AI_conv_ovf DT_I4  
  693   | AI_conv_ovf DT_I8  
  694   | AI_conv_ovf DT_I  
  695   | AI_conv_ovf DT_U1  
  696   | AI_conv_ovf DT_U2  
  697   | AI_conv_ovf DT_U4  
  698   | AI_conv_ovf DT_U8  
  699   | AI_conv_ovf DT_U  
  700   | AI_conv_ovf_un DT_I1  
  701   | AI_conv_ovf_un DT_I2  
  702   | AI_conv_ovf_un DT_I4  
  703   | AI_conv_ovf_un DT_I8  
  704   | AI_conv_ovf_un DT_I  
  705   | AI_conv_ovf_un DT_U1  
  706   | AI_conv_ovf_un DT_U2  
  707   | AI_conv_ovf_un DT_U4  
  708   | AI_conv_ovf_un DT_U8  
  709   | AI_conv_ovf_un DT_U  
  710   | I_stelem DT_I1  
  711   | I_stelem DT_I2  
  712   | I_stelem DT_I4  
  713   | I_stelem DT_I8  
  714   | I_stelem DT_R4  
  715   | I_stelem DT_R8  
  716   | I_stelem DT_I  
  717   | I_stelem DT_REF  
  718   | I_ldelem DT_I1  
  719   | I_ldelem DT_I2  
  720   | I_ldelem DT_I4  
  721   | I_ldelem DT_I8  
  722   | I_ldelem DT_U1  
  723   | I_ldelem DT_U2  
  724   | I_ldelem DT_U4  
  725   | I_ldelem DT_R4  
  726   | I_ldelem DT_R8  
  727   | I_ldelem DT_I  
  728   | I_ldelem DT_REF  
  729   | AI_mul  
  730   | AI_mul_ovf
  731   | AI_mul_ovf_un
  732   | AI_rem  
  733   | AI_rem_un  
  734   | AI_shl  
  735   | AI_shr  
  736   | AI_shr_un
  737   | AI_sub  
  738   | AI_sub_ovf
  739   | AI_sub_ovf_un 
  740   | AI_xor  
  741   | AI_or     
  742   | AI_neg     
  743   | AI_not     
  744   | AI_ldnull   
  745   | AI_dup   
  746   | AI_pop
  747   | AI_ckfinite
  748   | AI_nop
  749   | I_break
  750   | I_arglist
  751   | I_endfilter
  752   | I_endfinally
  753   | I_refanytype
  754   | I_localloc
  755   | I_throw
  756   | I_ldlen
  757   | I_rethrow -> true
  758   | _ -> false
  759 
  760 let ILCmpInstrMap = 
  761     lazy (
  762         let dict = Dictionary.newWithSize 12
  763         dict.Add (BI_beq     , i_beq     )
  764         dict.Add (BI_bgt     , i_bgt     )
  765         dict.Add (BI_bgt_un  , i_bgt_un  )
  766         dict.Add (BI_bge     , i_bge     )
  767         dict.Add (BI_bge_un  , i_bge_un  )
  768         dict.Add (BI_ble     , i_ble     )
  769         dict.Add (BI_ble_un  , i_ble_un  )
  770         dict.Add (BI_blt     , i_blt     )
  771         dict.Add (BI_blt_un  , i_blt_un  )
  772         dict.Add (BI_bne_un  , i_bne_un  )
  773         dict.Add (BI_brfalse , i_brfalse )
  774         dict.Add (BI_brtrue  , i_brtrue  )
  775         dict
  776     )
  777 
  778 let ILCmpInstrRevMap = 
  779   lazy (
  780       let dict = Dictionary.newWithSize 12
  781       dict.Add ( BI_beq     , i_beq_s     )
  782       dict.Add ( BI_bgt     , i_bgt_s     )
  783       dict.Add ( BI_bgt_un  , i_bgt_un_s  )
  784       dict.Add ( BI_bge     , i_bge_s     )
  785       dict.Add ( BI_bge_un  , i_bge_un_s  )
  786       dict.Add ( BI_ble     , i_ble_s     )
  787       dict.Add ( BI_ble_un  , i_ble_un_s  )
  788       dict.Add ( BI_blt     , i_blt_s     )
  789       dict.Add ( BI_blt_un  , i_blt_un_s  )
  790       dict.Add ( BI_bne_un  , i_bne_un_s  )
  791       dict.Add ( BI_brfalse , i_brfalse_s )
  792       dict.Add ( BI_brtrue  , i_brtrue_s  )
  793       dict
  794   )
  795 
  796 // From corhdr.h 
  797 
  798 let nt_VOID        = 0x1uy
  799 let nt_BOOLEAN     = 0x2uy
  800 let nt_I1          = 0x3uy
  801 let nt_U1          = 0x4uy
  802 let nt_I2          = 0x5uy
  803 let nt_U2          = 0x6uy
  804 let nt_I4          = 0x7uy
  805 let nt_U4          = 0x8uy
  806 let nt_I8          = 0x9uy
  807 let nt_U8          = 0xAuy
  808 let nt_R4          = 0xBuy
  809 let nt_R8          = 0xCuy
  810 let nt_SYSCHAR     = 0xDuy
  811 let nt_VARIANT     = 0xEuy
  812 let nt_CURRENCY    = 0xFuy
  813 let nt_PTR         = 0x10uy
  814 let nt_DECIMAL     = 0x11uy
  815 let nt_DATE        = 0x12uy
  816 let nt_BSTR        = 0x13uy
  817 let nt_LPSTR       = 0x14uy
  818 let nt_LPWSTR      = 0x15uy
  819 let nt_LPTSTR      = 0x16uy
  820 let nt_FIXEDSYSSTRING  = 0x17uy
  821 let nt_OBJECTREF   = 0x18uy
  822 let nt_IUNKNOWN    = 0x19uy
  823 let nt_IDISPATCH   = 0x1Auy
  824 let nt_STRUCT      = 0x1Buy
  825 let nt_INTF        = 0x1Cuy
  826 let nt_SAFEARRAY   = 0x1Duy
  827 let nt_FIXEDARRAY  = 0x1Euy
  828 let nt_INT         = 0x1Fuy
  829 let nt_UINT        = 0x20uy
  830 let nt_NESTEDSTRUCT  = 0x21uy
  831 let nt_BYVALSTR    = 0x22uy
  832 let nt_ANSIBSTR    = 0x23uy
  833 let nt_TBSTR       = 0x24uy
  834 let nt_VARIANTBOOL = 0x25uy
  835 let nt_FUNC        = 0x26uy
  836 let nt_ASANY       = 0x28uy
  837 let nt_ARRAY       = 0x2Auy
  838 let nt_LPSTRUCT    = 0x2Buy
  839 let nt_CUSTOMMARSHALER = 0x2Cuy
  840 let nt_ERROR       = 0x2Duy
  841 let nt_LPUTF8STR   = 0x30uy
  842 let nt_MAX = 0x50uy
  843 
  844 // From c:/clrenv.i386/Crt/Inc/i386/hs.h
  845 
  846 let vt_EMPTY = 0
  847 let vt_NULL = 1
  848 let vt_I2 = 2
  849 let vt_I4 = 3
  850 let vt_R4 = 4
  851 let vt_R8 = 5
  852 let vt_CY = 6
  853 let vt_DATE = 7
  854 let vt_BSTR = 8
  855 let vt_DISPATCH = 9
  856 let vt_ERROR = 10
  857 let vt_BOOL = 11
  858 let vt_VARIANT = 12
  859 let vt_UNKNOWN = 13
  860 let vt_DECIMAL = 14
  861 let vt_I1 = 16
  862 let vt_UI1 = 17
  863 let vt_UI2 = 18
  864 let vt_UI4 = 19
  865 let vt_I8 = 20
  866 let vt_UI8 = 21
  867 let vt_INT = 22
  868 let vt_UINT = 23
  869 let vt_VOID = 24
  870 let vt_HRESULT  = 25
  871 let vt_PTR = 26
  872 let vt_SAFEARRAY = 27
  873 let vt_CARRAY = 28
  874 let vt_USERDEFINED = 29
  875 let vt_LPSTR = 30
  876 let vt_LPWSTR = 31
  877 let vt_RECORD = 36
  878 let vt_FILETIME = 64
  879 let vt_BLOB = 65
  880 let vt_STREAM = 66
  881 let vt_STORAGE = 67
  882 let vt_STREAMED_OBJECT = 68
  883 let vt_STORED_OBJECT = 69
  884 let vt_BLOB_OBJECT = 70
  885 let vt_CF = 71
  886 let vt_CLSID = 72
  887 let vt_VECTOR = 0x1000
  888 let vt_ARRAY = 0x2000
  889 let vt_BYREF = 0x4000
  890 
  891  
  892 let ILNativeTypeMap = 
  893  lazy [ nt_CURRENCY , ILNativeType.Currency
  894         nt_BSTR , (* COM interop *) ILNativeType.BSTR
  895         nt_LPSTR , ILNativeType.LPSTR
  896         nt_LPWSTR , ILNativeType.LPWSTR
  897         nt_LPTSTR, ILNativeType.LPTSTR
  898         nt_LPUTF8STR, ILNativeType.LPUTF8STR
  899         nt_IUNKNOWN , (* COM interop *) ILNativeType.IUnknown
  900         nt_IDISPATCH , (* COM interop *) ILNativeType.IDispatch
  901         nt_BYVALSTR , ILNativeType.ByValStr
  902         nt_TBSTR , ILNativeType.TBSTR
  903         nt_LPSTRUCT , ILNativeType.LPSTRUCT
  904         nt_INTF , (* COM interop *) ILNativeType.Interface
  905         nt_STRUCT , ILNativeType.Struct
  906         nt_ERROR , (* COM interop *) ILNativeType.Error               
  907         nt_VOID , ILNativeType.Void 
  908         nt_BOOLEAN , ILNativeType.Bool
  909         nt_I1 , ILNativeType.Int8
  910         nt_I2 , ILNativeType.Int16
  911         nt_I4 , ILNativeType.Int32
  912         nt_I8, ILNativeType.Int64
  913         nt_R4 , ILNativeType.Single
  914         nt_R8 , ILNativeType.Double
  915         nt_U1 , ILNativeType.Byte
  916         nt_U2 , ILNativeType.UInt16
  917         nt_U4 , ILNativeType.UInt32
  918         nt_U8, ILNativeType.UInt64
  919         nt_INT , ILNativeType.Int
  920         nt_UINT, ILNativeType.UInt
  921         nt_ANSIBSTR, (* COM interop *) ILNativeType.ANSIBSTR
  922         nt_VARIANTBOOL, (* COM interop *) ILNativeType.VariantBool
  923         nt_FUNC , ILNativeType.Method
  924         nt_ASANY, ILNativeType.AsAny ]
  925 
  926 let ILNativeTypeRevMap = lazy (List.map (fun (x,y) -> (y,x)) (Lazy.force ILNativeTypeMap))
  927     
  928 let ILVariantTypeMap = 
  929  lazy [ ILNativeVariant.Empty                 , vt_EMPTY
  930         ILNativeVariant.Null                  , vt_NULL 
  931         ILNativeVariant.Variant               , vt_VARIANT       
  932         ILNativeVariant.Currency              , vt_CY         
  933         ILNativeVariant.Decimal               , vt_DECIMAL   
  934         ILNativeVariant.Date                  , vt_DATE       
  935         ILNativeVariant.BSTR                  , vt_BSTR       
  936         ILNativeVariant.LPSTR                 , vt_LPSTR     
  937         ILNativeVariant.LPWSTR                , vt_LPWSTR    
  938         ILNativeVariant.IUnknown              , vt_UNKNOWN   
  939         ILNativeVariant.IDispatch             , vt_DISPATCH    
  940         ILNativeVariant.SafeArray             , vt_SAFEARRAY 
  941         ILNativeVariant.Error                 ,  vt_ERROR         
  942         ILNativeVariant.HRESULT               , vt_HRESULT   
  943         ILNativeVariant.CArray                , vt_CARRAY    
  944         ILNativeVariant.UserDefined           , vt_USERDEFINED 
  945         ILNativeVariant.Record                , vt_RECORD
  946         ILNativeVariant.FileTime              , vt_FILETIME  
  947         ILNativeVariant.Blob                  , vt_BLOB       
  948         ILNativeVariant.Stream                , vt_STREAM     
  949         ILNativeVariant.Storage               , vt_STORAGE          
  950         ILNativeVariant.StreamedObject       , vt_STREAMED_OBJECT
  951         ILNativeVariant.StoredObject         , vt_STORED_OBJECT 
  952         ILNativeVariant.BlobObject           , vt_BLOB_OBJECT 
  953         ILNativeVariant.CF                    , vt_CF        
  954         ILNativeVariant.CLSID                 , vt_CLSID                    
  955         ILNativeVariant.Void                  , vt_VOID          
  956         ILNativeVariant.Bool                  , vt_BOOL        
  957         ILNativeVariant.Int8                  , vt_I1            
  958         ILNativeVariant.Int16                 , vt_I2  
  959         ILNativeVariant.Int32                 , vt_I4         
  960         ILNativeVariant.Int64                 , vt_I8        
  961         ILNativeVariant.Single               , vt_R4         
  962         ILNativeVariant.Double               , vt_R8         
  963         ILNativeVariant.UInt8         , vt_UI1       
  964         ILNativeVariant.UInt16        , vt_UI2       
  965         ILNativeVariant.UInt32        , vt_UI4       
  966         ILNativeVariant.UInt64        , vt_UI8       
  967         ILNativeVariant.PTR                   , vt_PTR       
  968         ILNativeVariant.Int                   , vt_INT               
  969         ILNativeVariant.UInt                , vt_UINT            ]
  970 
  971 let ILVariantTypeRevMap = lazy (List.map (fun (x,y) -> (y,x)) (Lazy.force ILVariantTypeMap))
  972 
  973 let ILSecurityActionMap =
  974   lazy
  975     [ ILSecurityAction.Request , 0x0001
  976       ILSecurityAction.Demand , 0x0002
  977       ILSecurityAction.Assert , 0x0003
  978       ILSecurityAction.Deny , 0x0004
  979       ILSecurityAction.PermitOnly  , 0x0005
  980       ILSecurityAction.LinkCheck  , 0x0006
  981       ILSecurityAction.InheritCheck , 0x0007
  982       ILSecurityAction.ReqMin , 0x0008
  983       ILSecurityAction.ReqOpt , 0x0009
  984       ILSecurityAction.ReqRefuse , 0x000a
  985       ILSecurityAction.PreJitGrant , 0x000b
  986       ILSecurityAction.PreJitDeny , 0x000c
  987       ILSecurityAction.NonCasDemand , 0x000d
  988       ILSecurityAction.NonCasLinkDemand , 0x000e
  989       ILSecurityAction.NonCasInheritance , 0x000f
  990       ILSecurityAction.LinkDemandChoice , 0x0010
  991       ILSecurityAction.InheritanceDemandChoice , 0x0011
  992       ILSecurityAction.DemandChoice , 0x0012 ]
  993 
  994 let ILSecurityActionRevMap = lazy (List.map (fun (x,y) -> (y,x)) (Lazy.force ILSecurityActionMap))
  995 
  996 let e_CorILMethod_TinyFormat = 0x02uy
  997 let e_CorILMethod_FatFormat = 0x03uy
  998 let e_CorILMethod_FormatMask = 0x03uy
  999 let e_CorILMethod_MoreSects = 0x08uy
 1000 let e_CorILMethod_InitLocals = 0x10uy
 1001 
 1002 
 1003 let e_CorILMethod_Sect_EHTable = 0x1uy
 1004 let e_CorILMethod_Sect_FatFormat = 0x40uy
 1005 let e_CorILMethod_Sect_MoreSects = 0x80uy
 1006 
 1007 let e_COR_ILEXCEPTION_CLAUSE_EXCEPTION = 0x0
 1008 let e_COR_ILEXCEPTION_CLAUSE_FILTER = 0x1
 1009 let e_COR_ILEXCEPTION_CLAUSE_FINALLY = 0x2
 1010 let e_COR_ILEXCEPTION_CLAUSE_FAULT = 0x4
 1011 
 1012 let e_IMAGE_CEE_CS_CALLCONV_FASTCALL = 0x04uy
 1013 let e_IMAGE_CEE_CS_CALLCONV_STDCALL = 0x02uy
 1014 let e_IMAGE_CEE_CS_CALLCONV_THISCALL = 0x03uy
 1015 let e_IMAGE_CEE_CS_CALLCONV_CDECL = 0x01uy
 1016 let e_IMAGE_CEE_CS_CALLCONV_VARARG = 0x05uy
 1017 let e_IMAGE_CEE_CS_CALLCONV_FIELD = 0x06uy
 1018 let e_IMAGE_CEE_CS_CALLCONV_LOCAL_SIG = 0x07uy
 1019 let e_IMAGE_CEE_CS_CALLCONV_PROPERTY = 0x08uy
 1020 
 1021 let e_IMAGE_CEE_CS_CALLCONV_GENERICINST = 0x0auy
 1022 let e_IMAGE_CEE_CS_CALLCONV_GENERIC = 0x10uy
 1023 let e_IMAGE_CEE_CS_CALLCONV_INSTANCE = 0x20uy
 1024 let e_IMAGE_CEE_CS_CALLCONV_INSTANCE_EXPLICIT = 0x40uy
 1025 
 1026