Skip to content

Commit

Permalink
some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
DedSec256 committed Jun 26, 2024
1 parent 295844f commit f218af4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Compiler/AbstractIL/ilread.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2127,6 +2127,7 @@ and typeDefReader ctxtH : ILTypeDefStored =

member _.CompareKey(rowIndex) =
let mutable addr = ctxt.rowAddr TableNames.CustomAttribute rowIndex
// read parentIndex
let key = seekReadHasCustomAttributeIdx ctxt mdv &addr
hcaCompare searchedKey key

Expand All @@ -2151,12 +2152,15 @@ and typeDefReader ctxtH : ILTypeDefStored =

while attrIdx <= attrsEndIdx && not containsExtensionMethods do
let mutable addr = ctxt.rowAddr TableNames.CustomAttribute attrIdx
// skip parentIndex to read typeIndex
seekReadHasCustomAttributeIdx ctxt mdv &addr |> ignore
let attrTypeIndex = seekReadCustomAttributeTypeIdx ctxt mdv &addr
let attrCtorIdx = attrTypeIndex.index

let name =
if attrTypeIndex.tag = cat_MethodDef then
// the ExtensionAttribute constructor can be cat_MethodDef if the metadata is read from the assembly
// in which the corresponding attribute is defined -- from the system library
if not looksLikeSystemAssembly then
""
else
Expand Down

0 comments on commit f218af4

Please sign in to comment.