Skip to content

Commit e3afab2

Browse files
authored
Merge pull request #609 from dsyme/integrate-82
Integrate visualfsharp master
2 parents 2c9bd1f + a354e8d commit e3afab2

Some content is hidden

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

50 files changed

+3192
-3494
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ install:
1515
script:
1616
- ./build.sh NuGet
1717

18+
# See bug "https://bugzilla.xamarin.com/show_bug.cgi?id=41914"
19+
# peverify failing on Mono latest with "condition `res != EINVAL' not met", on OSX
20+
1821
matrix:
1922
allow_failures:
2023
- os: osx
2124
mono: latest
25+
26+

RELEASE_NOTES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
#### 6.0.0
2+
* Switch to new major version on assumption integrated F# compiler changes induce API change
3+
4+
#### 5.0.2
5+
* Integrate Microsoft\visualfsharp to 688c26bdbbfc766326fc45e4d918f87fcba1e7ba. F# 4.1 work
6+
17
#### 5.0.1
28
* [Fixed dependencies in nuget package](https://github.com/fsharp/FSharp.Compiler.Service/pull/608)
39

appveyor.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ environment:
88
- BUILD_TARGET: DotnetCliTests
99
- BUILD_TARGET: NuGet
1010

11+
matrix:
12+
allow_failures:
13+
- BUILD_TARGET: DotnetCliTests
14+
1115
build_script:
1216
- ps: dotnet --info
1317
- cmd: build.cmd %BUILD_TARGET%

samples/FscExe/FscMain.fs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,8 @@ module FSharpResidentCompiler =
8787
for error in errors do eprintfn "%s" (error.ToString())
8888
if !progress then printfn "server: finished compilation request, argv = %A" argv
8989
let output = outputCollector.GetTextAndClear()
90-
if !progress then printfn "ouput: %A" output
91-
if !progress then printfn "sending reply..."
9290
reply.Reply(output, exitCode)
93-
if !progress then printfn "collecting..."
9491
GC.Collect(3)
95-
if !progress then printfn "considering exit..."
9692
// Exit the server if there are no outstanding requests and the
9793
// current memory usage after collection is over 200MB
9894
if inbox.CurrentQueueLength = 0 && GC.GetTotalMemory(true) > 200L * 1024L * 1024L then

src/absil/ildiag.fs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ module internal Microsoft.FSharp.Compiler.AbstractIL.Diagnostics
77
open Internal.Utilities
88

99
let diagnosticsLog = ref (Some stdout)
10+
11+
let setDiagnosticsChannel s = diagnosticsLog := s
12+
1013
let dflushn () = match !diagnosticsLog with None -> () | Some d -> d.WriteLine(); d.Flush()
1114
let dflush () = match !diagnosticsLog with None -> () | Some d -> d.Flush()
1215
let dprintn (s:string) =
@@ -18,4 +21,3 @@ let dprintf (fmt: Format<_,_,_,_>) =
1821
let dprintfn (fmt: Format<_,_,_,_>) =
1922
Printf.kfprintf dflushn (match !diagnosticsLog with None -> System.IO.TextWriter.Null | Some d -> d) fmt
2023

21-
let setDiagnosticsChannel s = diagnosticsLog := s

src/absil/ildiag.fsi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ module internal Microsoft.FSharp.Compiler.AbstractIL.Diagnostics
1111
open System.IO
1212
open Microsoft.FSharp.Core.Printf
1313

14-
val public setDiagnosticsChannel: TextWriter option -> unit
14+
val public setDiagnosticsChannel: TextWriter option -> unit
1515

1616
val public dprintfn: TextWriterFormat<'a> -> 'a
1717
val public dprintf: TextWriterFormat<'a> -> 'a
18-
1918
val public dprintn: string -> unit

src/absil/ilread.fs

Lines changed: 784 additions & 799 deletions
Large diffs are not rendered by default.

src/fsharp/AccessibilityLogic.fs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,28 @@ let private IsILMemberAccessible g amap m (tcrefOfViewedItem : TyconRef) ad acce
7070
match ad with
7171
| AccessibleFromEverywhere ->
7272
access = ILMemberAccess.Public
73+
7374
| AccessibleFromSomeFSharpCode ->
7475
(access = ILMemberAccess.Public ||
7576
access = ILMemberAccess.Family ||
7677
access = ILMemberAccess.FamilyOrAssembly)
78+
7779
| AccessibleFrom (cpaths,tcrefViewedFromOption) ->
80+
7881
let accessibleByFamily =
7982
((access = ILMemberAccess.Family ||
8083
access = ILMemberAccess.FamilyOrAssembly) &&
8184
match tcrefViewedFromOption with
8285
| None -> false
8386
| Some tcrefViewedFrom ->
8487
ExistsHeadTypeInEntireHierarchy g amap m (generalizedTyconRef tcrefViewedFrom) tcrefOfViewedItem)
88+
8589
let accessibleByInternalsVisibleTo =
86-
(access = ILMemberAccess.Assembly && canAccessFromOneOf cpaths tcrefOfViewedItem.CompilationPath)
90+
(access = ILMemberAccess.Assembly || access = ILMemberAccess.FamilyOrAssembly) &&
91+
canAccessFromOneOf cpaths tcrefOfViewedItem.CompilationPath
92+
8793
(access = ILMemberAccess.Public) || accessibleByFamily || accessibleByInternalsVisibleTo
94+
8895
| AccessibleFromSomewhere ->
8996
true
9097

src/fsharp/AugmentWithHashCompare.fs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -850,24 +850,24 @@ let TyconIsCandidateForAugmentationWithHash g tycon = TyconIsCandidateForAugment
850850
//-------------------------------------------------------------------------
851851

852852
let slotImplMethod (final,c,slotsig) : ValMemberInfo =
853-
{ ImplementedSlotSigs=[slotsig];
853+
{ ImplementedSlotSigs=[slotsig]
854854
MemberFlags=
855-
{ IsInstance=true;
856-
IsDispatchSlot=false;
857-
IsFinal=final;
858-
IsOverrideOrExplicitImpl=true;
859-
MemberKind=MemberKind.Member};
860-
IsImplemented=false;
855+
{ IsInstance=true
856+
IsDispatchSlot=false
857+
IsFinal=final
858+
IsOverrideOrExplicitImpl=true
859+
MemberKind=MemberKind.Member}
860+
IsImplemented=false
861861
ApparentParent=c}
862862

863863
let nonVirtualMethod c : ValMemberInfo =
864-
{ ImplementedSlotSigs=[];
865-
MemberFlags={ IsInstance=true;
866-
IsDispatchSlot=false;
867-
IsFinal=false;
868-
IsOverrideOrExplicitImpl=false;
869-
MemberKind=MemberKind.Member};
870-
IsImplemented=false;
864+
{ ImplementedSlotSigs=[]
865+
MemberFlags={ IsInstance=true
866+
IsDispatchSlot=false
867+
IsFinal=false
868+
IsOverrideOrExplicitImpl=false
869+
MemberKind=MemberKind.Member}
870+
IsImplemented=false
871871
ApparentParent=c}
872872

873873
let unitArg = ValReprInfo.unitArgData
@@ -945,7 +945,7 @@ let MakeBindingsForCompareAugmentation g (tycon:Tycon) =
945945
let thisv,thatv,comparee = comparef g tcref tycon
946946
mkLambdas m tps [thisv;thatv] (comparee,g.int_ty)
947947
[ // This one must come first because it may be inlined into the second
948-
mkCompGenBind vspec2 rhs2;
948+
mkCompGenBind vspec2 rhs2
949949
mkCompGenBind vspec1 rhs1; ]
950950
if tycon.IsUnionTycon then mkCompare mkUnionCompare
951951
elif tycon.IsRecordTycon || tycon.IsStructOrEnumTycon then mkCompare mkRecdCompare
@@ -1016,8 +1016,8 @@ let MakeBindingsForEqualityWithComparerAugmentation g (tycon:Tycon) =
10161016

10171017
mkLambdas m tps [thisv; unitv] (hashe,g.int_ty)
10181018

1019-
[(mkCompGenBind withcGetHashCodeVal.Deref withcGetHashCodeExpr) ;
1020-
(mkCompGenBind objGetHashCodeVal.Deref objGetHashCodeExpr) ;
1019+
[(mkCompGenBind withcGetHashCodeVal.Deref withcGetHashCodeExpr)
1020+
(mkCompGenBind objGetHashCodeVal.Deref objGetHashCodeExpr)
10211021
(mkCompGenBind withcEqualsVal.Deref withcEqualsExpr)]
10221022
if tycon.IsUnionTycon then mkStructuralEquatable mkUnionHashWithComparer mkUnionEqualityWithComparer
10231023
elif (tycon.IsRecordTycon || tycon.IsStructOrEnumTycon) then mkStructuralEquatable mkRecdHashWithComparer mkRecdEqualityWithComparer
@@ -1054,8 +1054,8 @@ let MakeBindingsForEqualsAugmentation g (tycon:Tycon) =
10541054
mkLambdas m tps [thisv;thatobjv] (equalse,g.bool_ty)
10551055

10561056

1057-
[ mkCompGenBind nocEqualsVal.Deref nocEqualsExpr;
1058-
mkCompGenBind objEqualsVal.Deref objEqualsExpr; ]
1057+
[ mkCompGenBind nocEqualsVal.Deref nocEqualsExpr
1058+
mkCompGenBind objEqualsVal.Deref objEqualsExpr ]
10591059
if tycon.IsExceptionDecl then mkEquals mkExnEquality
10601060
elif tycon.IsUnionTycon then mkEquals mkUnionEquality
10611061
elif tycon.IsRecordTycon || tycon.IsStructOrEnumTycon then mkEquals mkRecdEquality

0 commit comments

Comments
 (0)