Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc65494a

Browse files
dsymeunknown
authored and
unknown
committed
Code sanitization: Add comments, regularize naming, simplify ImportILTypeDefList
1 parent54a3a19 commitc65494a

File tree

5 files changed

+343
-217
lines changed

5 files changed

+343
-217
lines changed

‎src/fsharp.sln‎

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 2012
3+
# Visual Studio 2013
4+
VisualStudioVersion =12.0.30110.0
5+
MinimumVisualStudioVersion =10.0.40219.1
46
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") ="Solution Items","Solution Items","{D78E3B57-DAD1-4FE1-9DC8-84F7847B0C77}"
57
ProjectSection(SolutionItems) =preProject
68
fsharp-compiler-build.proj=fsharp-compiler-build.proj
@@ -35,46 +37,44 @@ Global
3537
Release|Any CPU=Release|Any CPU
3638
EndGlobalSection
3739
GlobalSection(ProjectConfigurationPlatforms) =postSolution
40+
{C94C257C-3C0A-4858-B5D8-D746498D1F08}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
41+
{C94C257C-3C0A-4858-B5D8-D746498D1F08}.Debug|Any CPU.Build.0=Debug|Any CPU
42+
{C94C257C-3C0A-4858-B5D8-D746498D1F08}.Release|Any CPU.ActiveCfg=Release|Any CPU
43+
{C94C257C-3C0A-4858-B5D8-D746498D1F08}.Release|Any CPU.Build.0=Release|Any CPU
3844
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
3945
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Debug|Any CPU.Build.0=Debug|Any CPU
4046
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|Any CPU.ActiveCfg=Release|Any CPU
4147
{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}.Release|Any CPU.Build.0=Release|Any CPU
42-
{649FA588-F02E-457C-9FCF-87E46407481E}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
43-
{649FA588-F02E-457C-9FCF-87E46407481E}.Debug|Any CPU.Build.0=Debug|Any CPU
44-
{649FA588-F02E-457C-9FCF-87E46407481E}.Release|Any CPU.ActiveCfg=Release|Any CPU
45-
{649FA588-F02E-457C-9FCF-87E46407481E}.Release|Any CPU.Build.0=Release|Any CPU
48+
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
49+
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Debug|Any CPU.Build.0=Debug|Any CPU
50+
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Release|Any CPU.ActiveCfg=Release|Any CPU
51+
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Release|Any CPU.Build.0=Release|Any CPU
4652
{702A7979-BCF9-4C41-853E-3ADFC9897890}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
4753
{702A7979-BCF9-4C41-853E-3ADFC9897890}.Debug|Any CPU.Build.0=Debug|Any CPU
4854
{702A7979-BCF9-4C41-853E-3ADFC9897890}.Release|Any CPU.ActiveCfg=Release|Any CPU
4955
{702A7979-BCF9-4C41-853E-3ADFC9897890}.Release|Any CPU.Build.0=Release|Any CPU
50-
{88E2D422-6852-46E3-A740-83E391DC7973}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
51-
{88E2D422-6852-46E3-A740-83E391DC7973}.Debug|Any CPU.Build.0=Debug|Any CPU
52-
{88E2D422-6852-46E3-A740-83E391DC7973}.Release|Any CPU.ActiveCfg=Release|Any CPU
53-
{88E2D422-6852-46E3-A740-83E391DC7973}.Release|Any CPU.Build.0=Release|Any CPU
54-
{C94C257C-3C0A-4858-B5D8-D746498D1F08}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
55-
{C94C257C-3C0A-4858-B5D8-D746498D1F08}.Debug|Any CPU.Build.0=Debug|Any CPU
56-
{C94C257C-3C0A-4858-B5D8-D746498D1F08}.Release|Any CPU.ActiveCfg=Release|Any CPU
57-
{C94C257C-3C0A-4858-B5D8-D746498D1F08}.Release|Any CPU.Build.0=Release|Any CPU
58-
{D0E98C0D-490B-4C61-9329-0862F6E87645}.Debug|Any CPU.ActiveCfg=Debug|x86
59-
{D0E98C0D-490B-4C61-9329-0862F6E87645}.Debug|Any CPU.Build.0=Debug|x86
60-
{D0E98C0D-490B-4C61-9329-0862F6E87645}.Release|Any CPU.ActiveCfg=Release|x86
61-
{D0E98C0D-490B-4C61-9329-0862F6E87645}.Release|Any CPU.Build.0=Release|x86
56+
{D0E98C0D-490B-4C61-9329-0862F6E87645}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
57+
{D0E98C0D-490B-4C61-9329-0862F6E87645}.Debug|Any CPU.Build.0=Debug|Any CPU
58+
{D0E98C0D-490B-4C61-9329-0862F6E87645}.Release|Any CPU.ActiveCfg=Release|Any CPU
59+
{D0E98C0D-490B-4C61-9329-0862F6E87645}.Release|Any CPU.Build.0=Release|Any CPU
60+
{649FA588-F02E-457C-9FCF-87E46407481E}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
61+
{649FA588-F02E-457C-9FCF-87E46407481E}.Debug|Any CPU.Build.0=Debug|Any CPU
62+
{649FA588-F02E-457C-9FCF-87E46407481E}.Release|Any CPU.ActiveCfg=Release|Any CPU
63+
{649FA588-F02E-457C-9FCF-87E46407481E}.Release|Any CPU.Build.0=Release|Any CPU
6264
{D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
6365
{D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Debug|Any CPU.Build.0=Debug|Any CPU
6466
{D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Release|Any CPU.ActiveCfg=Release|Any CPU
6567
{D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}.Release|Any CPU.Build.0=Release|Any CPU
66-
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
67-
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Debug|Any CPU.Build.0=Debug|Any CPU
68-
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Release|Any CPU.ActiveCfg=Release|Any CPU
69-
{DED3BBD7-53F4-428A-8C9F-27968E768605}.Release|Any CPU.Build.0=Release|Any CPU
68+
{88E2D422-6852-46E3-A740-83E391DC7973}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
69+
{88E2D422-6852-46E3-A740-83E391DC7973}.Debug|Any CPU.Build.0=Debug|Any CPU
70+
{88E2D422-6852-46E3-A740-83E391DC7973}.Release|Any CPU.ActiveCfg=Release|Any CPU
71+
{88E2D422-6852-46E3-A740-83E391DC7973}.Release|Any CPU.Build.0=Release|Any CPU
7072
{CB7D20C4-6506-406D-9144-5342C3595F03}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
7173
{CB7D20C4-6506-406D-9144-5342C3595F03}.Debug|Any CPU.Build.0=Debug|Any CPU
7274
{CB7D20C4-6506-406D-9144-5342C3595F03}.Release|Any CPU.ActiveCfg=Release|Any CPU
7375
{CB7D20C4-6506-406D-9144-5342C3595F03}.Release|Any CPU.Build.0=Release|Any CPU
74-
{8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Debug|Any CPU.ActiveCfg=Debug|Any CPU
75-
{8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Debug|Any CPU.Build.0=Debug|Any CPU
76-
{8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Release|Any CPU.ActiveCfg=Release|Any CPU
77-
{8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Release|Any CPU.Build.0=Release|Any CPU
76+
{8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Debug|Any CPU.ActiveCfg=Debug|x86
77+
{8B3E283D-B5FE-4055-9D80-7E3A32F3967B}.Release|Any CPU.ActiveCfg=Release|x86
7878
EndGlobalSection
7979
GlobalSection(SolutionProperties) =preSolution
8080
HideSolutionNode =FALSE

‎src/fsharp/import.fs‎

Lines changed: 77 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,20 @@ open Microsoft.FSharp.Compiler.ErrorLogger
2020
openMicrosoft.FSharp.Compiler.ExtensionTyping
2121
#endif
2222

23+
/// Represents an interface to some of the functionality of TcImports, for loading assemblies
24+
/// and accessing information about generated provided assemblies.
2325
typeAssemblyLoader=
26+
27+
/// Resolve an Abstract IL assembly reference to a Ccu
2428
abstractLoadAssembly :range*ILAssemblyRef->CcuResolutionResult
2529
#if EXTENSIONTYPING
30+
31+
/// Get a flag indicating if an assembly is a provided assembly, plus the
32+
/// table of information recording remappings from type names in the provided assembly to type
33+
/// names in the statically linked, embedded assembly.
2634
abstractGetProvidedAssemblyInfo :range*Tainted<ProvidedAssembly>->bool*ProvidedAssemblyStaticLinkingMapoption
35+
36+
/// Record a root for a [<Generate>] type to help guide static linking & type relocation
2737
abstractRecordGeneratedTypeRoot :ProviderGeneratedType->unit
2838
#endif
2939

@@ -33,15 +43,22 @@ type AssemblyLoader =
3343
// Import an IL types as F# types.
3444
//-------------------------------------------------------------------------
3545

36-
/// This is the context used for converting AbstractIL .NET and provided types to F# internal compiler data structures.
37-
/// We currently cache the conversion of AbstractIL ILTypeRef nodes, based on hashes of these.
46+
/// Represents a context used by the import routines that convert AbstractIL types and provided
47+
/// types to F# internal compiler data structures.
48+
///
49+
/// Also caches the conversion of AbstractIL ILTypeRef nodes, based on hashes of these.
50+
///
51+
/// There is normally only one ImportMap for any assembly compilation, though additional instances can be created
52+
/// using tcImports.GetImportMap() if needed, and it is not harmful if multiple instances are used. The object
53+
/// serves as an interface through to the tables stored in the primary TcImports structures defined in build.fs.
3854
[<Sealed>]
3955
typeImportMap(g:TcGlobals,assemblyLoader:AssemblyLoader)=
4056
lettypeRefToTyconRefCache=new System.Collections.Generic.Dictionary<ILTypeRef,TyconRef>()
4157
memberthis.g= g
4258
memberthis.assemblyLoader= assemblyLoader
4359
memberthis.ILTypeRefToTyconRefCache= typeRefToTyconRefCache
4460

61+
/// Import a reference to a type definition, given the AbstractIL data for the type reference
4562
letImportTypeRefData(env:ImportMap)m(scoref,path,typeName)=
4663
letccu=
4764
match scorefwith
@@ -76,7 +93,7 @@ let ImportTypeRefData (env:ImportMap) m (scoref,path,typeName) =
7693
| Some tcref-> tcref
7794

7895

79-
/// Importan ILtyperef as anF# type constructor.
96+
/// Importa reference to atypedefinition, given anAbstractIL ILTypeRef, without caching
8097
//
8198
// Note, the type names that flow to the point include the "mangled" type names used for static parameters for provided types.
8299
// For example,
@@ -95,24 +112,25 @@ let ImportILTypeRefUncached (env:ImportMap) m (tref:ILTypeRef) =
95112
ImportTypeRefData(env:ImportMap) m(tref.Scope,path,typeName)
96113

97114

115+
/// Import a reference to a type definition, given an AbstractIL ILTypeRef, with caching
98116
letImportILTypeRef(env:ImportMap)m(tref:ILTypeRef)=
99117
if env.ILTypeRefToTyconRefCache.ContainsKey(tref)then
100118
env.ILTypeRefToTyconRefCache.[tref]
101119
else
102120
lettcref= ImportILTypeRefUncached env m tref
103-
env.ILTypeRefToTyconRefCache.[tref]<- tcref;
121+
env.ILTypeRefToTyconRefCache.[tref]<- tcref
104122
tcref
105123

124+
/// Import a type, given an AbstractIL ILTypeRef and an F# type instantiation.
125+
///
126+
/// Prefer the F# abbreviation for some built-in types, e.g. 'string' rather than
127+
/// 'System.String', since we prefer the F# abbreviation to the .NET equivalents.
106128
letImportTyconRefApp(env:ImportMap)tcref tyargs=
107-
// 'better_tcref_map' prefers the F# abbreviation for some built-in types, e.g. 'string' rather than
108-
// 'System.String', since users prefer the F# abbreviation to the .NET equivalents. Also on import
109-
// we decompile uses of FSharpFunc and Tuple.
110129
match env.g.better_tcref_map tcref tyargswith
111130
| Some res-> res
112131
| None-> TType_app(tcref,tyargs)
113132

114-
/// Import an IL type as an F# type
115-
/// - The F# type check does the job of making the "void" into a "unit" value, whatever the repr. of "unit" is.
133+
/// Import an IL type as an F# type.
116134
let recImportILType(env:ImportMap)m tinst typ=
117135
match typwith
118136
| ILType.Void->
@@ -141,6 +159,7 @@ let rec ImportILType (env:ImportMap) m tinst typ =
141159

142160
#if EXTENSIONTYPING
143161

162+
/// Import a provided type reference as an F# type TyconRef
144163
letImportProvidedNamedType(env:ImportMap)(m:range)(st:Tainted<ProvidedType>)=
145164
// See if a reverse-mapping exists for a generated/relocated System.Type
146165
match st.PUntaint((fun st-> st.TryGetTyconRef()),m)with
@@ -149,6 +168,7 @@ let ImportProvidedNamedType (env:ImportMap) (m:range) (st:Tainted<ProvidedType>)
149168
lettref= ExtensionTyping.GetILTypeRefOfProvidedType(st,m)
150169
ImportILTypeRef env m tref
151170

171+
/// Import a provided type as an AbstractIL type
152172
let recImportProvidedTypeAsILType(env:ImportMap)(m:range)(st:Tainted<ProvidedType>)=
153173
if st.PUntaint((fun x-> x.IsVoid),m)then ILType.Void
154174
elif st.PUntaint((fun st-> st.IsGenericParameter),m)then
@@ -184,6 +204,7 @@ let rec ImportProvidedTypeAsILType (env:ImportMap) (m:range) (st:Tainted<Provide
184204
else
185205
mkILBoxedType tspec
186206

207+
/// Import a provided type as an F# type.
187208
let recImportProvidedType(env:ImportMap)(m:range)(* (tinst:TypeInst)*)(st:Tainted<ProvidedType>)=
188209

189210
letg= env.g
@@ -246,6 +267,7 @@ let rec ImportProvidedType (env:ImportMap) (m:range) (* (tinst:TypeInst) *) (st:
246267
ImportTyconRefApp env tcref genericArgs
247268

248269

270+
/// Import a provided method reference as an Abstract IL method reference
249271
letImportProvidedMethodBaseAsILMethodRef(env:ImportMap)(m:range)(mbase:Tainted<ProvidedMethodBase>)=
250272
lettref= ExtensionTyping.GetILTypeRefOfProvidedType(mbase.PApply((fun mbase-> mbase.DeclaringType),m), m)
251273

@@ -322,7 +344,11 @@ let ImportProvidedMethodBaseAsILMethodRef (env:ImportMap) (m:range) (mbase: Tain
322344
//--------------------------------------------------------------------------
323345

324346

325-
// tinst gives the type parameters for the enclosing type when converting the type parameters of a generic method
347+
/// Import a set of Abstract IL generic parameter specifications as a list of new
348+
/// F# generic parameters.
349+
///
350+
/// Fixup the constrants so that any references to the generic parameters
351+
/// in the constraints now refer to the new generic parameters.
326352
letImportILGenericParameters amap m scoref tinst(gps:ILGenericParameterDefs)=
327353
match gpswith
328354
|[]->[]
@@ -341,6 +367,10 @@ let ImportILGenericParameters amap m scoref tinst (gps: ILGenericParameterDefs)
341367
tps
342368

343369

370+
/// Given a list of items each keyed by an ordered list of keys, apply 'nodef' to the each group
371+
/// with the same leading key. Apply 'tipf' to the elements where the keylist is empty, and return
372+
/// the overall results. Used to bucket types, so System.Char and System.Collections.Generic.List
373+
/// both get initially bucketed under 'System'.
344374
letmultisetDiscriminateAndMap nodef tipf(items:('Key list* 'Value)list)=
345375
// Find all the items with an empty key list and call 'tipf'
346376
lettips=
@@ -361,9 +391,10 @@ let multisetDiscriminateAndMap nodef tipf (items: ('Key list * 'Value) list) =
361391

362392
[for(KeyValue(key,items))in buckets-> nodef key items]
363393

364-
tips,nodes
394+
tips@nodes
365395

366396

397+
/// Import an IL type definition as a new F# TAST Entity node.
367398
let recImportILTypeDef amap m scoref cpath enc nm(tdef:ILTypeDef)=
368399
letlazyModuleOrNamespaceTypeForNestedTypes=
369400
lazy
@@ -380,44 +411,47 @@ let rec ImportILTypeDef amap m scoref cpath enc nm (tdef:ILTypeDef) =
380411
lazyModuleOrNamespaceTypeForNestedTypes
381412

382413

414+
/// Import a list of (possibly nested) IL types as a new ModuleOrNamespaceType node
415+
/// containing new entities, bucketing by namespace along the way.
383416
andImportILTypeDefList amap m cpath enc items=
384-
// Split into the ones with namespaces and without
385-
// This is a non-trivial function.
386-
// Add the ones with namespaces in buckets
387-
// That is, multi-set discriminate based in the first element of the namespace list (e.g. "System")
388-
// and for each bag resulting from the discrimination fold-in a lazy computation to add the types under that bag
389-
let recadd cpath items=
390-
lettycons,namespaceModules=
391-
items
392-
|> multisetDiscriminateAndMap
393-
// nodef - called for each bucket, where 'n' is the head element of the namespace used
394-
// as a key in the discrimination, tgs is the remaining descriptors. We create a sub-module for 'n'
395-
(fun n tgs->
396-
letmodty=lazy(add(mkNestedCPath cpath n Namespace) tgs)
397-
letmspec= NewModuleOrNamespace(Some cpath) taccessPublic(mkSynId m n) XmlDoc.Empty[] modty
398-
mspec)
399-
400-
// tipf - called if there are no namespace items left to discriminate on.
401-
(fun(n,info:Lazy<_>)->
402-
//Note: this scoref looks like it will always be identical to 'scoref'
403-
let(scoref2,_,lazyTypeDef:Lazy<ILTypeDef>)= info.Force()
404-
ImportILTypeDef amap m scoref2 cpath enc n(lazyTypeDef.Force()))
405-
406-
letkind=match encwith[]-> Namespace|_-> ModuleOrType
407-
NewModuleOrNamespaceType kind(tycons@namespaceModules)[]
417+
// Split into the ones with namespaces and without. Add the ones with namespaces in buckets.
418+
// That is, discriminate based in the first element of the namespace list (e.g. "System")
419+
// and, for each bag, fold-in a lazy computation to add the types under that bag .
420+
//
421+
// nodef - called for each bucket, where 'n' is the head element of the namespace used
422+
// as a key in the discrimination, tgs is the remaining descriptors. We create an entity for 'n'.
423+
//
424+
// tipf - called if there are no namespace items left to discriminate on.
425+
letentities=
426+
items
427+
|> multisetDiscriminateAndMap
428+
(fun n tgs->
429+
letmodty=lazy(ImportILTypeDefList amap m(mkNestedCPath cpath n Namespace) enc tgs)
430+
NewModuleOrNamespace(Some cpath) taccessPublic(mkSynId m n) XmlDoc.Empty[] modty)
431+
(fun(n,info:Lazy<_>)->
432+
let(scoref2,_,lazyTypeDef:Lazy<ILTypeDef>)= info.Force()
433+
ImportILTypeDef amap m scoref2 cpath enc n(lazyTypeDef.Force()))
434+
435+
letkind=match encwith[]-> Namespace|_-> ModuleOrType
436+
NewModuleOrNamespaceType kind entities[]
408437

409-
add cpath items
410-
438+
/// Import a table of IL types as a ModuleOrNamespaceType.
439+
///
411440
andImportILTypeDefs amap m scoref cpath enc(tdefs:ILTypeDefs)=
412441
// We be very careful not to force a read of the type defs here
413442
tdefs.AsListOfLazyTypeDefs
414443
|> List.map(fun(ns,n,attrs,lazyTypeDef)->(ns,(n,notlazy(scoref,attrs,lazyTypeDef))))
415444
|> ImportILTypeDefList amap m cpath enc
416445

446+
/// Import the main type definitions in an IL assembly.
447+
///
448+
/// Example: for a collection of types "System.Char", "System.Int32" and "Library.C"
449+
/// the return ModuleOrNamespaceType will contain namespace entities for "System" and "Library", which in turn contain
450+
/// type definition entities for ["Char"; "Int32"] and ["C"] respectively.
417451
letImportILAssemblyMainTypeDefs amap m scoref modul=
418452
modul.TypeDefs|> ImportILTypeDefs amap m scoref(CompPath(scoref,[]))[]
419453

420-
///Read the "exported types" table for multi-module assemblies.
454+
///Import the "exported types" table for multi-module assemblies.
421455
letImportILAssemblyExportedType amap m auxModLoader(scoref:ILScopeRef)(exportedType:ILExportedTypeOrForwarder)=
422456
// Forwarders are dealt with separately in the ref->def dereferencing logic in tast.fs as they effectively give rise to type equivalences
423457
if exportedType.IsForwarderthen
@@ -438,18 +472,20 @@ let ImportILAssemblyExportedType amap m auxModLoader (scoref:ILScopeRef) (export
438472
letns,n= splitILTypeName exportedType.Name
439473
[ ImportILTypeDefList amap m(CompPath(scoref,[]))[][(ns,(n,info))]]
440474

441-
///Read the "exported types" table for multi-module assemblies.
475+
///Import the "exported types" table for multi-module assemblies.
442476
letImportILAssemblyExportedTypes amap m auxModLoader scoref(exportedTypes:ILExportedTypesAndForwarders)=
443477
[for exportedTypein exportedTypes.AsListdo
444478
yield! ImportILAssemblyExportedType amap m auxModLoader scoref exportedType]
445479

480+
/// Import both the main type definitions and the "exported types" table, i.e. all the
481+
/// types defined in an IL assembly.
446482
letImportILAssemblyTypeDefs(amap,m,auxModLoader,aref,mainmod:ILModuleDef)=
447483
letscoref= ILScopeRef.Assembly aref
448484
letmtypsForExportedTypes= ImportILAssemblyExportedTypes amap m auxModLoader scoref mainmod.ManifestOfAssembly.ExportedTypes
449485
letmainmod= ImportILAssemblyMainTypeDefs amap m scoref mainmod
450486
combineModuleOrNamespaceTypeList[] m(mainmod:: mtypsForExportedTypes)
451487

452-
// Read the type forwarder table for an assembly
488+
/// Import the type forwarder table for an IL assembly
453489
letImportILAssemblyTypeForwarders(amap,m,exportedTypes:ILExportedTypesAndForwarders)=
454490
// Note 'td' may be in another module or another assembly!
455491
// Note: it is very important that we call auxModLoader lazily
@@ -470,6 +506,7 @@ let ImportILAssemblyTypeForwarders (amap, m, exportedTypes:ILExportedTypesAndFor
470506
]|> Map.ofList
471507

472508

509+
/// Import an IL assembly as a new TAST CCU
473510
letImportILAssembly(amap:(unit-> ImportMap),m,auxModuleLoader,sref,sourceDir,filename,ilModule:ILModuleDef,invalidateCcu:IEvent<string>)=
474511
invalidateCcu|> ignore
475512
letaref=

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp