Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
fsharp
提交
98eec39f
F
fsharp
项目概览
dotNET Platform
/
fsharp
12 个月 前同步成功
通知
0
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
fsharp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
98eec39f
编写于
10月 01, 2015
作者:
D
Don Syme
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cleaup whitespace
上级
5ef60c91
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
17 addition
and
17 deletion
+17
-17
src/absil/ilreflect.fs
src/absil/ilreflect.fs
+6
-6
src/fsharp/IlxGen.fs
src/fsharp/IlxGen.fs
+3
-3
src/fsharp/NicePrint.fs
src/fsharp/NicePrint.fs
+3
-3
src/fsharp/fsc.fs
src/fsharp/fsc.fs
+3
-3
src/fsharp/infos.fs
src/fsharp/infos.fs
+1
-1
src/ilx/EraseUnions.fs
src/ilx/EraseUnions.fs
+1
-1
未找到文件。
src/absil/ilreflect.fs
浏览文件 @
98eec39f
...
@@ -1918,21 +1918,21 @@ let buildModuleTypePass4 visited emEnv tdef = buildTypeDefPass4 visited [] emE
...
@@ -1918,21 +1918,21 @@ let buildModuleTypePass4 visited emEnv tdef = buildTypeDefPass4 visited [] emE
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
let
buildModuleFragment
cenv
emEnv
(
asmB
:
AssemblyBuilder
)
(
modB
:
ModuleBuilder
)
(
m
:
ILModuleDef
)
=
let
buildModuleFragment
cenv
emEnv
(
asmB
:
AssemblyBuilder
)
(
modB
:
ModuleBuilder
)
(
m
:
ILModuleDef
)
=
let
tdefs
=
m
.
TypeDefs
.
As
Array
let
tdefs
=
m
.
TypeDefs
.
As
List
let
emEnv
=
(
emEnv
,
tdefs
)
||>
Array
.
fold
(
buildModuleTypePass1
cenv
modB
)
let
emEnv
=
(
emEnv
,
tdefs
)
||>
List
.
fold
(
buildModuleTypePass1
cenv
modB
)
tdefs
|>
Array
.
iter
(
buildModuleTypePass1b
cenv
emEnv
)
tdefs
|>
List
.
iter
(
buildModuleTypePass1b
cenv
emEnv
)
let
emEnv
=
(
emEnv
,
tdefs
)
||>
Array
.
fold
(
buildModuleTypePass2
cenv
)
let
emEnv
=
(
emEnv
,
tdefs
)
||>
List
.
fold
(
buildModuleTypePass2
cenv
)
for
delayedFieldInit
in
emEnv
.
delayedFieldInits
do
for
delayedFieldInit
in
emEnv
.
delayedFieldInits
do
delayedFieldInit
()
delayedFieldInit
()
let
emEnv
=
{
emEnv
with
delayedFieldInits
=
[]
}
let
emEnv
=
{
emEnv
with
delayedFieldInits
=
[]
}
let
emEnv
=
(
emEnv
,
tdefs
)
||>
Array
.
fold
(
buildModuleTypePass3
cenv
modB
)
let
emEnv
=
(
emEnv
,
tdefs
)
||>
List
.
fold
(
buildModuleTypePass3
cenv
modB
)
let
visited
=
new
Dictionary
<_,_>(
10
)
let
visited
=
new
Dictionary
<_,_>(
10
)
let
created
=
new
Dictionary
<_,_>(
10
)
let
created
=
new
Dictionary
<_,_>(
10
)
tdefs
|>
Array
.
iter
(
buildModuleTypePass4
(
visited
,
created
)
emEnv
)
tdefs
|>
List
.
iter
(
buildModuleTypePass4
(
visited
,
created
)
emEnv
)
let
emEnv
=
Seq
.
fold
envUpdateCreatedTypeRef
emEnv
created
.
Keys
// update typT with the created typT
let
emEnv
=
Seq
.
fold
envUpdateCreatedTypeRef
emEnv
created
.
Keys
// update typT with the created typT
emitCustomAttrs
cenv
emEnv
modB
.
SetCustomAttributeAndLog
m
.
CustomAttrs
;
emitCustomAttrs
cenv
emEnv
modB
.
SetCustomAttributeAndLog
m
.
CustomAttrs
;
m
.
Resources
.
AsList
|>
List
.
iter
(
fun
r
->
m
.
Resources
.
AsList
|>
List
.
iter
(
fun
r
->
...
...
src/fsharp/IlxGen.fs
浏览文件 @
98eec39f
...
@@ -1120,11 +1120,11 @@ and TypeDefsBuilder() =
...
@@ -1120,11 +1120,11 @@ and TypeDefsBuilder() =
let
tdef
=
b
.
Close
()
let
tdef
=
b
.
Close
()
// Skip the <PrivateImplementationDetails$> type if it is empty
// Skip the <PrivateImplementationDetails$> type if it is empty
if
not
eliminateIfEmpty
if
not
eliminateIfEmpty
||
tdef
.
NestedTypes
.
AsList
.
IsEmpty
||
tdef
.
NestedTypes
.
AsList
.
IsEmpty
||
not
tdef
.
Fields
.
AsList
.
IsEmpty
||
not
tdef
.
Fields
.
AsList
.
IsEmpty
||
not
tdef
.
Events
.
AsList
.
IsEmpty
||
not
tdef
.
Events
.
AsList
.
IsEmpty
||
not
tdef
.
Properties
.
AsList
.
IsEmpty
||
not
tdef
.
Properties
.
AsList
.
IsEmpty
||
tdef
.
Methods
.
AsList
.
Length
<>
0
then
||
tdef
.
Methods
.
AsList
.
IsEmpty
then
yield
tdef
]
yield
tdef
]
member
b
.
FindTypeDefBuilder
(
nm
)
=
member
b
.
FindTypeDefBuilder
(
nm
)
=
...
@@ -3936,7 +3936,7 @@ and GenDelegateExpr cenv cgbuf eenvouter expr (TObjExprMethod((TSlotSig(_,delega
...
@@ -3936,7 +3936,7 @@ and GenDelegateExpr cenv cgbuf eenvouter expr (TObjExprMethod((TSlotSig(_,delega
let
tcref
=
tcrefOfAppTy
cenv
.
g
delegateTy
let
tcref
=
tcrefOfAppTy
cenv
.
g
delegateTy
let
_,_,
tdef
=
tcref
.
ILTyconInfo
let
_,_,
tdef
=
tcref
.
ILTyconInfo
match
tdef
.
Methods
.
FindByName
".ctor"
with
match
tdef
.
Methods
.
FindByName
".ctor"
with
|
[
ctorMDef
]
->
|
[
ctorMDef
]
->
match
ctorMDef
.
Parameters
|>
ILList
.
toList
with
match
ctorMDef
.
Parameters
|>
ILList
.
toList
with
|
[
_;
p2
]
->
(
p2
.
Type
.
TypeSpec
.
Name
=
"System.UIntPtr"
)
|
[
_;
p2
]
->
(
p2
.
Type
.
TypeSpec
.
Name
=
"System.UIntPtr"
)
|
_
->
false
|
_
->
false
...
...
src/fsharp/NicePrint.fs
浏览文件 @
98eec39f
...
@@ -476,9 +476,9 @@ module private PrintIL =
...
@@ -476,9 +476,9 @@ module private PrintIL =
let
bodyStatic
=
let
bodyStatic
=
memberBlockLs
(
typeDef
.
Fields
.
AsList
|>
List
.
filter
(
fun
fd
->
fd
.
IsStatic
)
|>
mkILFields
,
memberBlockLs
(
typeDef
.
Fields
.
AsList
|>
List
.
filter
(
fun
fd
->
fd
.
IsStatic
)
|>
mkILFields
,
typeDef
.
Methods
.
AsList
|>
List
.
filter
(
fun
md
->
md
.
IsStatic
)
|>
mkILMethods
,
typeDef
.
Methods
.
AsList
|>
List
.
filter
(
fun
md
->
md
.
IsStatic
)
|>
mkILMethods
,
typeDef
.
Properties
.
AsList
|>
List
.
filter
(
fun
pd
->
isStaticILProperty
pd
)
|>
mkILProperties
,
typeDef
.
Properties
.
AsList
|>
List
.
filter
(
fun
pd
->
isStaticILProperty
pd
)
|>
mkILProperties
,
typeDef
.
Events
.
AsList
|>
List
.
filter
(
fun
ed
->
isStaticILEvent
ed
)
|>
mkILEvents
)
typeDef
.
Events
.
AsList
|>
List
.
filter
(
fun
ed
->
isStaticILEvent
ed
)
|>
mkILEvents
)
let
bodyInstance
=
let
bodyInstance
=
memberBlockLs
(
typeDef
.
Fields
.
AsList
|>
List
.
filter
(
fun
fd
->
not
(
fd
.
IsStatic
))
|>
mkILFields
,
memberBlockLs
(
typeDef
.
Fields
.
AsList
|>
List
.
filter
(
fun
fd
->
not
(
fd
.
IsStatic
))
|>
mkILFields
,
...
...
src/fsharp/fsc.fs
浏览文件 @
98eec39f
...
@@ -1308,7 +1308,7 @@ module StaticLinker =
...
@@ -1308,7 +1308,7 @@ module StaticLinker =
{
ilxMainModule
with
{
ilxMainModule
with
Manifest
=
(
let
m
=
ilxMainModule
.
ManifestOfAssembly
in
Some
{
m
with
CustomAttrs
=
mkILCustomAttrs
(
m
.
CustomAttrs
.
AsList
@
savedManifestAttrs
)
});
Manifest
=
(
let
m
=
ilxMainModule
.
ManifestOfAssembly
in
Some
{
m
with
CustomAttrs
=
mkILCustomAttrs
(
m
.
CustomAttrs
.
AsList
@
savedManifestAttrs
)
});
CustomAttrs
=
mkILCustomAttrs
[
for
m
in
moduls
do
yield
!
m
.
CustomAttrs
.
AsList
];
CustomAttrs
=
mkILCustomAttrs
[
for
m
in
moduls
do
yield
!
m
.
CustomAttrs
.
AsList
];
TypeDefs
=
mkILTypeDefs
[
yield
topTypeDef
;
yield
!
List
.
concat
normalTypeDefs
]
;
TypeDefs
=
mkILTypeDefs
(
topTypeDef
::
List
.
concat
normalTypeDefs
)
;
Resources
=
mkILResources
(
savedResources
@
ilxMainModule
.
Resources
.
AsList
);
Resources
=
mkILResources
(
savedResources
@
ilxMainModule
.
Resources
.
AsList
);
NativeResources
=
savedNativeResources
}
NativeResources
=
savedNativeResources
}
...
@@ -1629,8 +1629,8 @@ module StaticLinker =
...
@@ -1629,8 +1629,8 @@ module StaticLinker =
let
rec
rw
enc
(
tdefs
:
ILTypeDefs
)
=
let
rec
rw
enc
(
tdefs
:
ILTypeDefs
)
=
mkILTypeDefs
mkILTypeDefs
[
for
tdef
in
tdefs
do
[
for
tdef
in
tdefs
do
let
ilOrigTyRef
=
mkILNestedTyRef
(
ilOrigScopeRef
,
enc
,
tdef
.
Name
)
let
ilOrigTyRef
=
mkILNestedTyRef
(
ilOrigScopeRef
,
enc
,
tdef
.
Name
)
if
not
(
ilOrigTyRefsForProviderGeneratedTypesToRelocate
.
ContainsKey
ilOrigTyRef
)
then
if
not
(
ilOrigTyRefsForProviderGeneratedTypesToRelocate
.
ContainsKey
ilOrigTyRef
)
then
if
debugStaticLinking
then
printfn
"Keep provided type %s in place because it wasn't relocated"
ilOrigTyRef
.
QualifiedName
if
debugStaticLinking
then
printfn
"Keep provided type %s in place because it wasn't relocated"
ilOrigTyRef
.
QualifiedName
yield
{
tdef
with
NestedTypes
=
rw
(
enc
@[
tdef
.
Name
])
tdef
.
NestedTypes
}
]
yield
{
tdef
with
NestedTypes
=
rw
(
enc
@[
tdef
.
Name
])
tdef
.
NestedTypes
}
]
rw
[]
ilModule
.
TypeDefs
rw
[]
ilModule
.
TypeDefs
...
...
src/fsharp/infos.fs
浏览文件 @
98eec39f
...
@@ -2983,7 +2983,7 @@ let GetImmediateIntrinsicMethInfosOfType (optFilter,ad) g amap m typ =
...
@@ -2983,7 +2983,7 @@ let GetImmediateIntrinsicMethInfosOfType (optFilter,ad) g amap m typ =
|
ILTypeMetadata
(_,
tdef
)
->
|
ILTypeMetadata
(_,
tdef
)
->
let
mdefs
=
tdef
.
Methods
let
mdefs
=
tdef
.
Methods
let
mdefs
=
(
match
optFilter
with
None
->
mdefs
.
AsList
|
Some
nm
->
mdefs
.
FindByName
nm
)
let
mdefs
=
(
match
optFilter
with
None
->
mdefs
.
AsList
|
Some
nm
->
mdefs
.
FindByName
nm
)
mdefs
|>
List
.
map
(
fun
mdef
->
MethInfo
.
CreateILMeth
(
amap
,
m
,
typ
,
mdef
))
mdefs
|>
List
.
map
(
fun
mdef
->
MethInfo
.
CreateILMeth
(
amap
,
m
,
typ
,
mdef
))
|
FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata
->
|
FSharpOrArrayOrByrefOrTupleOrExnTypeMetadata
->
if
not
(
isAppTy
g
typ
)
then
[]
if
not
(
isAppTy
g
typ
)
then
[]
else
SelectImmediateMemberVals
g
optFilter
(
TrySelectMemberVal
g
optFilter
typ
None
)
(
tcrefOfAppTy
g
typ
)
else
SelectImmediateMemberVals
g
optFilter
(
TrySelectMemberVal
g
optFilter
typ
None
)
(
tcrefOfAppTy
g
typ
)
...
...
src/ilx/EraseUnions.fs
浏览文件 @
98eec39f
...
@@ -1038,7 +1038,7 @@ let rec convClassUnionDef cenv enc td cud =
...
@@ -1038,7 +1038,7 @@ let rec convClassUnionDef cenv enc td cud =
let
isAbstract
=
(
altTypeDefs
.
Length
=
cud
.
cudAlternatives
.
Length
)
let
isAbstract
=
(
altTypeDefs
.
Length
=
cud
.
cudAlternatives
.
Length
)
let
existingMeths
=
let
existingMeths
=
td
.
Methods
.
AsList
td
.
Methods
.
AsList
// Filter out the F#-compiler supplied implementation of the get_Empty method. This is because we will replace
// Filter out the F#-compiler supplied implementation of the get_Empty method. This is because we will replace
// its implementation by one that loads the unique private static field for lists
// its implementation by one that loads the unique private static field for lists
|>
List
.
filter
(
fun
md
->
not
(
cud
.
cudHasHelpers
=
SpecialFSharpListHelpers
&&
(
md
.
Name
=
"get_Empty"
||
md
.
Name
=
"Cons"
||
md
.
Name
=
"get_IsEmpty"
))
&&
|>
List
.
filter
(
fun
md
->
not
(
cud
.
cudHasHelpers
=
SpecialFSharpListHelpers
&&
(
md
.
Name
=
"get_Empty"
||
md
.
Name
=
"Cons"
||
md
.
Name
=
"get_IsEmpty"
))
&&
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录