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

Commitce5bb8d

Browse files
authored
Merge pull requestdotnet#4489 from Microsoft/merges/master-to-dev15.7
Merge master to dev15.7
2 parents3bdd481 +d7274c6 commitce5bb8d

File tree

72 files changed

+1052
-301
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1052
-301
lines changed

‎build/targets/PackageVersions.props‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
<MicrosoftCompositionPackageVersion>1.0.30</MicrosoftCompositionPackageVersion>
5151
<MicrosoftMSXMLPackageVersion>8.0.0-alpha</MicrosoftMSXMLPackageVersion>
5252
<MicrosoftVisualFSharpMSBuild150PackageVersion>1.0.1</MicrosoftVisualFSharpMSBuild150PackageVersion>
53-
<NewtonsoftJsonPackageVersion>10.0.2</NewtonsoftJsonPackageVersion>
53+
<NewtonsoftJsonPackageVersion>9.0.1</NewtonsoftJsonPackageVersion>
5454
<NUnitPackageVersion>3.5.0</NUnitPackageVersion>
5555
<XliffTasksPackageVersion>0.2.0-beta-000081</XliffTasksPackageVersion>
5656

‎packages.config‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<packageid="NUnit3TestAdapter"version="3.0.8-ctp-8"targetFramework="net45" />
3535
<packageid="BenchmarkDotNet"version="0.9.8"/>
3636
<packageid="BenchmarkDotNet.Diagnostics.Windows"version="0.9.8"/>
37-
<packageid="Newtonsoft.Json"version="8.0.1"/>
37+
<packageid="Newtonsoft.Json"version="9.0.1"/>
3838
<packageid="Microsoft.FSharp.TupleSample"version="1.0.0-alpha-161121"/>
3939
<packageid="Microsoft.VSSDK.BuildTools"version="15.1.192" />
4040

‎src/absil/illib.fs‎

Lines changed: 10 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ let inline isSingleton l =
3737

3838
let inlineisNonNull x=not(isNull x)
3939
let inlinenonNull msg x=if isNull xthen failwith("null:"^ msg)else x
40-
let(===) x y= LanguagePrimitives.PhysicalEquality x y
40+
letinline(===) x y= LanguagePrimitives.PhysicalEquality x y
4141

4242
//---------------------------------------------------------------------
4343
// Library: ReportTime
4444
//---------------------------------------------------------------------
4545
letreportTime=
46-
lettFirst= ref None
47-
lettPrev= ref None
46+
lettFirst= ref None
47+
lettPrev= ref None
4848
fun showTimes descr->
4949
if showTimesthen
5050
lett= System.Diagnostics.Process.GetCurrentProcess().UserProcessorTime.TotalSeconds
@@ -237,36 +237,12 @@ module Option =
237237
letmapFold f s opt=
238238
match optwith
239239
| None-> None,s
240-
| Some x->letx',s'= f s xin Some x',s'
241-
242-
letotherwise opt dflt=
243-
match optwith
244-
| None-> dflt
245-
| Some x-> x
246-
247-
letfold f z x=
248-
match xwith
249-
| None-> z
250-
| Some x-> f z x
251-
252-
letattempt(f:unit->'T)=try Some(f())with_-> None
253-
254-
255-
letorElseWith f opt=
256-
match optwith
257-
| None-> f()
258-
| x-> x
259-
260-
letorElse v opt=
261-
match optwith
262-
| None-> v
263-
| x-> x
264-
265-
letdefaultValue v opt=
266-
match optwith
267-
| None-> v
268-
| Some x-> x
240+
| Some x->
241+
letx',s'= f s x
242+
Some x',s'
269243

244+
letattempt(f:unit->'T)=try Some(f())with_-> None
245+
270246
moduleList=
271247

272248
//let item n xs = List.nth xs n
@@ -442,9 +418,6 @@ module List =
442418
| x::xs->if i=nthen f x::xselse x::mn(i+1) xs
443419

444420
mn0 xs
445-
446-
let recuntil p l=match lwith[]->[]| h::t->if p hthen[]else h:: until p t
447-
448421
letcount pred xs= List.fold(fun n x->if pred xthen n+1else n)0 xs
449422

450423
// WARNING: not tail-recursive
@@ -521,23 +494,9 @@ module String =
521494
if s.Length=0then s
522495
else lowercase s.[0..0]+ s.[1.. s.Length-1]
523496

497+
letdropPrefix(s:string)(t:string)= s.[t.Length..s.Length-1]
524498

525-
lettryDropPrefix(s:string)(t:string)=
526-
if s.StartsWith tthen
527-
Some s.[t.Length..s.Length-1]
528-
else
529-
None
530-
531-
lettryDropSuffix(s:string)(t:string)=
532-
if s.EndsWith tthen
533-
Some s.[0..s.Length- t.Length-1]
534-
else
535-
None
536-
537-
lethasPrefix s t= Option.isSome(tryDropPrefix s t)
538-
letdropPrefix s t=match(tryDropPrefix s t)with Some(res)-> res| None-> failwith"dropPrefix"
539-
540-
letdropSuffix s t=match(tryDropSuffix s t)with Some(res)-> res| None-> failwith"dropSuffix"
499+
letdropSuffix(s:string)(t:string)= s.[0..s.Length- t.Length-1]
541500

542501
openSystem
543502
openSystem.IO

‎src/absil/ilprint.fs‎

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,10 @@ and goutput_typ_with_shortened_class_syntax env os = function
213213
| typ2-> goutput_typ env os typ2
214214

215215
andgoutput_gactuals env os inst=
216-
if inst.Length=0then()
217-
else
218-
output_string os"<";
216+
ifnot(List.isEmpty inst)then
217+
output_string os"<"
219218
output_seq","(goutput_gactual env) os inst
220-
output_string os">";
219+
output_string os">"
221220

222221
andgoutput_gactual env os ty= goutput_typ env os ty
223222

@@ -864,14 +863,14 @@ let goutput_superclass env os = function
864863
| Some typ-> output_string os"extends";(goutput_typ_with_shortened_class_syntax env) os typ
865864

866865
letgoutput_superinterfaces env os imp=
867-
ifimp=[]then()else
868-
output_string os"implements";
869-
output_seq","(goutput_typ_with_shortened_class_syntax env) os imp
866+
ifnot(List.isEmpty imp)then
867+
output_string os"implements"
868+
output_seq","(goutput_typ_with_shortened_class_syntax env) os imp
870869

871870
letgoutput_implements env os(imp:ILTypes)=
872-
ifimp.Length=0then()else
873-
output_string os"implements";
874-
output_seq","(goutput_typ_with_shortened_class_syntax env) os imp
871+
ifnot(List.isEmpty imp)then
872+
output_string os"implements"
873+
output_seq","(goutput_typ_with_shortened_class_syntax env) os imp
875874

876875
letthe=function Some x-> x| None-> failwith"the"
877876

‎src/absil/ilread.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1816,7 +1816,7 @@ and seekReadTypeDefOrRef ctxt numtypars boxity (ginst:ILTypes) (TaggedIndex(tag,
18161816
| tagwhen tag= tdor_TypeDef-> seekReadTypeDefAsType ctxt boxity ginst idx
18171817
| tagwhen tag= tdor_TypeRef-> seekReadTypeRefAsType ctxt boxity ginst idx
18181818
| tagwhen tag= tdor_TypeSpec->
1819-
ifginst.Length>0then dprintn("type spec used as type constructor for a generic instantiation: ignoring instantiation")
1819+
ifnot(List.isEmpty ginst)then dprintn("type spec used as type constructor for a generic instantiation: ignoring instantiation")
18201820
readBlobHeapAsType ctxt numtypars(seekReadTypeSpecRow ctxt idx)
18211821
|_-> failwith"seekReadTypeDefOrRef ctxt"
18221822

‎src/absil/ilwrite.fs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,10 +1307,10 @@ and GetMethodDefOrRefAsUncodedToken (tag, idx) =
13071307
getUncodedToken tab idx
13081308

13091309
andGetMethodSpecInfoAsUncodedToken cenv env((_,_,_,_,_,_,minst:ILGenericArgs)as minfo)=
1310-
ifminst.Length>0then
1311-
getUncodedToken TableNames.MethodSpec(GetMethodSpecInfoAsMethodSpecIdxcenv env minfo)
1312-
else
1313-
GetMethodDefOrRefAsUncodedToken(GetMethodRefInfoAsMethodRefOrDeffalsecenv env(GetMethodRefInfoOfMethodSpecInfominfo))
1310+
ifList.isEmpty minstthen
1311+
GetMethodDefOrRefAsUncodedToken(GetMethodRefInfoAsMethodRefOrDeffalsecenv env(GetMethodRefInfoOfMethodSpecInfominfo))
1312+
else
1313+
getUncodedToken TableNames.MethodSpec(GetMethodSpecInfoAsMethodSpecIdxcenv env minfo)
13141314

13151315
andGetMethodSpecAsUncodedToken cenv env mspec=
13161316
GetMethodSpecInfoAsUncodedToken cenv env(InfoOfMethodSpec mspec)
@@ -2475,7 +2475,7 @@ let GenReturnPass3 cenv (returnv: ILReturn) =
24752475
letGetMethodDefSigAsBytes cenv env(mdef:ILMethodDef)=
24762476
emitBytesViaBuffer(fun bb->
24772477
bb.EmitByte(callconvToByte mdef.GenericParams.Length mdef.CallingConv)
2478-
if mdef.GenericParams.Length>0then bb.EmitZ32 mdef.GenericParams.Length
2478+
ifnot(List.isEmptymdef.GenericParams)then bb.EmitZ32 mdef.GenericParams.Length
24792479
bb.EmitZ32 mdef.Parameters.Length
24802480
EmitType cenv env bb mdef.Return.Type
24812481
mdef.ParameterTypes|> List.iter(EmitType cenv env bb))

‎src/fsharp/CompileOps.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4287,7 +4287,7 @@ type TcImports(tcConfigP:TcConfigProvider, initialResolutions:TcAssemblyResoluti
42874287
// specified in the attributes
42884288
|> List.distinctBy(fun s->try Path.GetFileNameWithoutExtension(s)with_-> s)
42894289

4290-
ifdesignTimeAssemblyNames.Length>0then
4290+
ifnot(List.isEmpty designTimeAssemblyNames)then
42914291

42924292
// Find the SystemRuntimeAssemblyVersion value to report in the TypeProviderConfig.
42934293
letprimaryAssemblyVersion=

‎src/fsharp/FSharp.Compiler.nuget/FSharp.Compiler.Template.nuget.props‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<OutputPath>$(FSharpSourcesRoot)\..\$(Configuration)\coreclr\bin</OutputPath>
1616
<PreReleaseSuffixCondition="'$(PreRelease)' != 'false'">-rtm-$(BuildRevision.Trim())-0</PreReleaseSuffix>
1717
<PackageVersion>$(FSPackageVersion)$(PreReleaseSuffix)</PackageVersion>
18-
<PackageProperties>-prop "licenseUrl=$(PackageLicenceUrl)" -prop "version=$(PackageVersion)" -prop "authors=$(PackageAuthors)" -prop "projectUrl=$(PackageProjectUrl)" -prop "tags=$(PackageTags)" -prop "diasymreaderversion=$(MicrosoftDiaSymReaderPackageVersion)" -prop "diasymreaderportablepdbversion=$(MicrosoftDiaSymReaderPortablePdbPackageVersion)"</PackageProperties>
1918
</PropertyGroup>
19+
20+
<ImportProject="$(FSharpSourcesRoot)\FSharpSource.targets" />
2021
</Project>

‎src/fsharp/FSharp.Compiler.nuget/FSharp.Compiler.Template.nuget.targets‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
</ProjectReference>
1616
</ItemGroup>
1717

18-
<ImportProject="$(FSharpSourcesRoot)\FSharpSource.targets" />
19-
2018
<TargetName="Build"Outputs="$(TargetPath)"DependsOnTargets="$(nugetpackfsharpcompiler)" />
2119
<TargetName="Rebuild"DependsOnTargets="$(nugetpackfsharpcompiler)" />
2220
<TargetName="Clean"DependsOnTargets="CleanVersionFile" />
@@ -34,7 +32,7 @@
3432
Outputs='$(FSharpSourcesRoot)\$(Configuration)\artifacts\$(PackageVersion)\"%(PackageNuspec.Filename)).nupkg'>
3533

3634
<PropertyGroup>
37-
<PackageProperties>-prop "licenseUrl=$(PackageLicenceUrl)" -prop "version=$(PackageVersion)" -prop "authors=$(PackageAuthors)" -prop "projectUrl=$(PackageProjectUrl)" -prop "tags=$(PackageTags)" -prop "diasymreaderversion=$(MicrosoftDiaSymReaderPackageVersion)" -prop "diasymreaderportablepdbversion=$(MicrosoftDiaSymReaderPortablePdbPackageVersion)"</PackageProperties>
35+
<PackageProperties>-prop "licenseUrl=$(PackageLicenceUrl)" -prop "version=$(PackageVersion)" -prop "authors=$(PackageAuthors)" -prop "projectUrl=$(PackageProjectUrl)" -prop "tags=$(PackageTags)" -prop "diasymreaderversion=$(MicrosoftDiaSymReaderPackageVersion)" -prop "diasymreaderportablepdbversion=$(MicrosoftDiaSymReaderPortablePdbPackageVersion)" -prop "githeadsha=$(GitHeadSha)"</PackageProperties>
3836
</PropertyGroup>
3937

4038
<MakeDirDirectories="$(FSharpSourcesRoot)\..\artifacts" />

‎src/fsharp/FSharp.Compiler.nuget/Microsoft.FSharp.Compiler.nuspec‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
<id>Microsoft.FSharp.Compiler</id>
55
<description>
66
.NET Core compatible version of the fsharp compiler fsc.exe.
7-
Supported Platforms: - .NET Core (.netstandard1.6)
7+
Supported Platforms: - .NET Core (.netstandard1.6).
8+
Commit hash: $githeadsha$.
89
</description>
910
<language>en-US</language>
1011
<requireLicenseAcceptance>true</requireLicenseAcceptance>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp