Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
11effc0
make tuples support Item* with warning
Nov 29, 2017
80039c3
add deactivated tests for struct tuple
Nov 29, 2017
d5fd83a
Merge branch 'master' of http://github.com/Microsoft/visualfsharp int…
dsyme Dec 8, 2017
f32f988
proper return types for Rest, prototype ctors
dsyme Dec 8, 2017
03523a1
fix SRTP
dsyme Dec 8, 2017
8519a15
fix tests
dsyme Dec 9, 2017
a21644c
Merge branch 'master' of http://github.com/Microsoft/visualfsharp int…
dsyme Dec 19, 2017
ab2eded
Merge branch 'master' of http://github.com/Microsoft/visualfsharp int…
dsyme Jan 18, 2018
c6f9172
fix tests
dsyme Jan 18, 2018
d1d3772
Merge branch 'master' of http://github.com/Microsoft/visualfsharp int…
dsyme Jan 19, 2018
86daf4d
add more protection
dsyme Jan 19, 2018
33fba05
improve code for decompiling types
dsyme Jan 20, 2018
bedde19
Merge branch 'master' of http://github.com/Microsoft/visualfsharp int…
dsyme Jan 20, 2018
e26b201
fix unit tests
dsyme Jan 20, 2018
d31327b
don't rebuild
dsyme Jan 20, 2018
8df2f92
don't rebuild
dsyme Jan 20, 2018
4ca23f5
Merge branch 'master' of http://github.com/Microsoft/visualfsharp int…
dsyme Jan 20, 2018
582bd65
make infos systematic to reduce use of tcrefOfAppTy
dsyme Jan 22, 2018
abfa1aa
update test cases
dsyme Jan 22, 2018
4695edd
fix build
dsyme Jan 22, 2018
e312b2b
update test cases
dsyme Jan 22, 2018
5f07c87
bump FCS version consistently
dsyme Jan 22, 2018
76b38cf
use consistent names
dsyme Jan 22, 2018
d972d9d
code review
dsyme Jan 22, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
/packages
/Tools

/tests/scripts/current
/release
/debug
/Proto

# Patches that may have been generated by scripts.
# (These aren't generally useful to commit directly; if anything, they should be applied.)
scripts/*.patch
Expand Down
6 changes: 3 additions & 3 deletions fcs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ which does things like:
Yu can push the packages if you have permissions, either automatically using ``build Release`` or manually

set APIKEY=...
.nuget\nuget.exe push Release\FSharp.Compiler.Service.16.0.3.nupkg %APIKEY% -Source https://nuget.org
.nuget\nuget.exe push Release\FSharp.Compiler.Service.MSBuild.v12.16.0.3.nupkg %APIKEY% -Source https://nuget.org
.nuget\nuget.exe push Release\FSharp.Compiler.Service.ProjectCracker.16.0.3.nupkg %APIKEY% -Source https://nuget.org
.nuget\nuget.exe push Release\FSharp.Compiler.Service.19.0.1.nupkg %APIKEY% -Source https://nuget.org
.nuget\nuget.exe push Release\FSharp.Compiler.Service.MSBuild.v12.19.0.1.nupkg %APIKEY% -Source https://nuget.org
.nuget\nuget.exe push Release\FSharp.Compiler.Service.ProjectCracker.19.0.1.nupkg %APIKEY% -Source https://nuget.org


### Use of Paket and FAKE
Expand Down
12 changes: 11 additions & 1 deletion fcs/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
#### 19.0.1
* Rename ``LogicalEnclosingEntity`` to ``ApparentEnclosingEntity`` for consistency int he F# codebase terminology.
* Rename ``EnclosingEntity`` to ``DeclaringEntity``. In the case of extension properties, ``EnclosingEntity`` was incorrectly returning the logical enclosing entity (i.e. the type the property appears to extend), and in this case ``ApparentEnclosingEntity`` should be used instead.

#### 18.0.1
* Integrate visualfsharp master

#### 17.0.2
* Integrate visualfsharp master

#### 16.0.3
* [File name deduplication not working with ParseAndCheckFileInProject](https://github.com/fsharp/FSharp.Compiler.Service/issues/819)

Expand Down Expand Up @@ -404,7 +414,7 @@
* Return additional 'property' and 'event' methods for F#-defined types to regularize symbols (#108, #143)
* Add IsPropertySetterMethod and IsPropertyGetterMethod which only return true for getter/setter methods, not properties. Deprecate IsSetterMethod and IsGetterMethod in favour of these.
* Add IsEventAddMethod and IsEventRemoveMethod which return true for add/remove methods with an associated event
* Change IsProperty and IsEvent to only return true for the symbols for properties and events, rather than the methods assocaited with these
* Change IsProperty and IsEvent to only return true for the symbols for properties and events, rather than the methods associated with these
* Fix value of Assembly for some symbols (e.g. property symbols)

#### 0.0.45 -
Expand Down
4 changes: 2 additions & 2 deletions fcs/docsrc/content/ja/symbols.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ fnVal.CurriedParameterGroups.[0].[0].Name // "x"
fnVal.CurriedParameterGroups.[0].[1].Name // "y"
fnVal.DeclarationLocation.StartLine // 3
fnVal.DisplayName // "foo"
fnVal.EnclosingEntity.DisplayName // "Test"
fnVal.EnclosingEntity.DeclarationLocation.StartLine // 1
fnVal.DeclaringEntity.DisplayName // "Test"
fnVal.DeclaringEntity.DeclarationLocation.StartLine // 1
fnVal.GenericParameters.Count // 0
fnVal.InlineAnnotation // FSharpInlineAnnotation.OptionalInline
fnVal.IsActivePattern // false
Expand Down
4 changes: 2 additions & 2 deletions fcs/docsrc/content/symbols.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ fnVal.CurriedParameterGroups.[0].[0].Name // "x"
fnVal.CurriedParameterGroups.[0].[1].Name // "y"
fnVal.DeclarationLocation.StartLine // 3
fnVal.DisplayName // "foo"
fnVal.EnclosingEntity.DisplayName // "Test"
fnVal.EnclosingEntity.DeclarationLocation.StartLine // 1
fnVal.DeclaringEntity.DisplayName // "Test"
fnVal.DeclaringEntity.DeclarationLocation.StartLine // 1
fnVal.GenericParameters.Count // 0
fnVal.InlineAnnotation // FSharpInlineAnnotation.OptionalInline
fnVal.IsActivePattern // false
Expand Down
2 changes: 1 addition & 1 deletion fcs/fcs.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>

<VersionPrefix>16.0.3</VersionPrefix>
<VersionPrefix>19.0.1</VersionPrefix>
<!-- FSharp.Compiler.Tools is currently only used to get a working FSI.EXE to execute some scripts during the build -->
<!-- The LKG FSI.EXE requires MSBuild 15 to be installed, which is painful -->
<FsiToolPath>$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools</FsiToolPath>
Expand Down
4 changes: 2 additions & 2 deletions fcs/nuget/FSharp.Compiler.Service.MSBuild.v12.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<description>Adds legacy MSBuild 12.0 support to the F# compiler services package for resolving references such as #r "System, Version=4.1.0.0,..."</description>
<language>en-US</language>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<version>16.0.3</version>
<version>19.0.1</version>
<authors>Microsoft Corporation and F# community contributors</authors>
<licenseUrl>https://github.com/fsharp/FSharp.Compiler.Service/blob/master/LICENSE</licenseUrl>
<projectUrl>https://github.com/fsharp/FSharp.Compiler.Service</projectUrl>
Expand All @@ -14,7 +14,7 @@
<summary>F# compiler services for creating IDE tools, language extensions and for F# embedding.</summary>
<dependencies>
<group targetFramework="net45">
<dependency id="FSharp.Compiler.Service" version="16.0.3" />
<dependency id="FSharp.Compiler.Service" version="19.0.1" />
</group>
</dependencies>
</metadata>
Expand Down
4 changes: 2 additions & 2 deletions fcs/nuget/FSharp.Compiler.Service.ProjectCracker.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<description>The F# compiler services package contains a custom build of the F# compiler that exposes additional functionality for implementing F# language bindings, additional tools based on the compiler or refactoring tools. The package also includes F# interactive service that can be used for embedding F# scripting into your applications.</description>
<language>en-US</language>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<version>16.0.3</version>
<version>19.0.1</version>
<authors>Microsoft Corporation and F# community contributors</authors>
<licenseUrl>https://github.com/fsharp/FSharp.Compiler.Service/blob/master/LICENSE</licenseUrl>
<projectUrl>https://github.com/fsharp/FSharp.Compiler.Service</projectUrl>
Expand All @@ -14,7 +14,7 @@
<summary>F# compiler services for creating IDE tools, language extensions and for F# embedding.</summary>
<dependencies>
<group targetFramework="net45">
<dependency id="FSharp.Compiler.Service" version="16.0.3" />
<dependency id="FSharp.Compiler.Service" version="19.0.1" />
</group>
</dependencies>
</metadata>
Expand Down
2 changes: 1 addition & 1 deletion fcs/nuget/FSharp.Compiler.Service.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<description>The F# compiler services package contains a custom build of the F# compiler that exposes additional functionality for implementing F# language bindings, additional tools based on the compiler or refactoring tools. The package also includes F# interactive service that can be used for embedding F# scripting into your applications.</description>
<language>en-US</language>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<version>16.0.3</version>
<version>19.0.1</version>
<authors>Microsoft Corporation and F# community contributors</authors>
<licenseUrl>https://github.com/fsharp/FSharp.Compiler.Service/blob/master/LICENSE</licenseUrl>
<projectUrl>https://github.com/fsharp/FSharp.Compiler.Service</projectUrl>
Expand Down
46 changes: 23 additions & 23 deletions src/absil/il.fs
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ type ILMethodRef =
mrefName: string;
mrefArgs: ILTypes;
mrefReturn: ILType }
member x.EnclosingTypeRef = x.mrefParent
member x.DeclaringTypeRef = x.mrefParent
member x.CallingConv = x.mrefCallconv
member x.Name = x.mrefName
member x.GenericArity = x.mrefGenericArity
Expand All @@ -737,24 +737,24 @@ type ILMethodRef =
member x.CallingSignature = mkILCallSig (x.CallingConv,x.ArgTypes,x.ReturnType)
static member Create(a,b,c,d,e,f) =
{ mrefParent= a;mrefCallconv=b;mrefName=c;mrefGenericArity=d; mrefArgs=e;mrefReturn=f }
override x.ToString() = x.EnclosingTypeRef.ToString() + "::" + x.Name + "(...)"
override x.ToString() = x.DeclaringTypeRef.ToString() + "::" + x.Name + "(...)"


[<StructuralEquality; StructuralComparison>]
type ILFieldRef =
{ EnclosingTypeRef: ILTypeRef;
{ DeclaringTypeRef: ILTypeRef;
Name: string;
Type: ILType }
override x.ToString() = x.EnclosingTypeRef.ToString() + "::" + x.Name
override x.ToString() = x.DeclaringTypeRef.ToString() + "::" + x.Name

[<StructuralEquality; StructuralComparison>]
type ILMethodSpec =
{ mspecMethodRef: ILMethodRef;
mspecEnclosingType: ILType;
mspecDeclaringType: ILType;
mspecMethodInst: ILGenericArgs; }
static member Create(a,b,c) = { mspecEnclosingType=a; mspecMethodRef =b; mspecMethodInst=c }
static member Create(a,b,c) = { mspecDeclaringType=a; mspecMethodRef =b; mspecMethodInst=c }
member x.MethodRef = x.mspecMethodRef
member x.EnclosingType=x.mspecEnclosingType
member x.DeclaringType=x.mspecDeclaringType
member x.GenericArgs=x.mspecMethodInst
member x.Name=x.MethodRef.Name
member x.CallingConv=x.MethodRef.CallingConv
Expand All @@ -766,10 +766,10 @@ type ILMethodSpec =

type ILFieldSpec =
{ FieldRef: ILFieldRef;
EnclosingType: ILType }
DeclaringType: ILType }
member x.FormalType = x.FieldRef.Type
member x.Name = x.FieldRef.Name
member x.EnclosingTypeRef = x.FieldRef.EnclosingTypeRef
member x.DeclaringTypeRef = x.FieldRef.DeclaringTypeRef
override x.ToString() = x.FieldRef.ToString()


Expand Down Expand Up @@ -1302,7 +1302,7 @@ type ILReturn =
type ILOverridesSpec =
| OverridesSpec of ILMethodRef * ILType
member x.MethodRef = let (OverridesSpec(mr,_ty)) = x in mr
member x.EnclosingType = let (OverridesSpec(_mr,ty)) = x in ty
member x.DeclaringType = let (OverridesSpec(_mr,ty)) = x in ty

type ILMethodVirtualInfo =
{ IsFinal: bool
Expand Down Expand Up @@ -1817,10 +1817,10 @@ let mkILMethRef (tref,callconv,nm,gparams,args,rty) =

let mkILMethSpecForMethRefInTy (mref,typ,minst) =
{ mspecMethodRef=mref;
mspecEnclosingType=typ;
mspecDeclaringType=typ;
mspecMethodInst=minst }

let mkILMethSpec (mref, vc, tinst, minst) = mkILMethSpecForMethRefInTy (mref,mkILNamedTy vc mref.EnclosingTypeRef tinst, minst)
let mkILMethSpec (mref, vc, tinst, minst) = mkILMethSpecForMethRefInTy (mref,mkILNamedTy vc mref.DeclaringTypeRef tinst, minst)

let mk_mspec_in_tref (tref,vc,cc,nm,args,rty,tinst,minst) =
mkILMethSpec (mkILMethRef ( tref,cc,nm,List.length minst,args,rty),vc,tinst,minst)
Expand Down Expand Up @@ -1856,9 +1856,9 @@ let mkILNonGenericCtorMethSpec (tref,args) =
// Make references to fields
// --------------------------------------------------------------------

let mkILFieldRef(tref,nm,ty) = { EnclosingTypeRef=tref; Name=nm; Type=ty}
let mkILFieldRef(tref,nm,ty) = { DeclaringTypeRef=tref; Name=nm; Type=ty}

let mkILFieldSpec (tref,ty) = { FieldRef= tref; EnclosingType=ty }
let mkILFieldSpec (tref,ty) = { FieldRef= tref; DeclaringType=ty }

let mkILFieldSpecInTy (typ:ILType,nm,fty) =
mkILFieldSpec (mkILFieldRef (typ.TypeRef,nm,fty), typ)
Expand Down Expand Up @@ -2205,15 +2205,15 @@ and rescopeILCallSig scoref csig =
mkILCallSig (csig.CallingConv,rescopeILTypes scoref csig.ArgTypes,rescopeILType scoref csig.ReturnType)

let rescopeILMethodRef scoref (x:ILMethodRef) =
{ mrefParent = rescopeILTypeRef scoref x.EnclosingTypeRef;
{ mrefParent = rescopeILTypeRef scoref x.DeclaringTypeRef;
mrefCallconv = x.mrefCallconv;
mrefGenericArity=x.mrefGenericArity;
mrefName=x.mrefName;
mrefArgs = rescopeILTypes scoref x.mrefArgs;
mrefReturn= rescopeILType scoref x.mrefReturn }

let rescopeILFieldRef scoref x =
{ EnclosingTypeRef = rescopeILTypeRef scoref x.EnclosingTypeRef;
{ DeclaringTypeRef = rescopeILTypeRef scoref x.DeclaringTypeRef;
Name= x.Name;
Type= rescopeILType scoref x.Type }

Expand Down Expand Up @@ -2277,7 +2277,7 @@ let mkILLocal ty dbgInfo : ILLocal =

type ILFieldSpec with
member fr.ActualType =
let env = fr.EnclosingType.GenericArgs
let env = fr.DeclaringType.GenericArgs
instILType env fr.FormalType

// --------------------------------------------------------------------
Expand Down Expand Up @@ -3482,20 +3482,20 @@ and refs_of_genparams s b = List.iter (refs_of_genparam s) b
and refs_of_dloc s ts = refs_of_tref s ts

and refs_of_mref s (x:ILMethodRef) =
refs_of_dloc s x.EnclosingTypeRef ;
refs_of_dloc s x.DeclaringTypeRef ;
refs_of_typs s x.mrefArgs;
refs_of_typ s x.mrefReturn

and refs_of_fref s x = refs_of_tref s x.EnclosingTypeRef; refs_of_typ s x.Type
and refs_of_fref s x = refs_of_tref s x.DeclaringTypeRef; refs_of_typ s x.Type
and refs_of_ospec s (OverridesSpec(mref,ty)) = refs_of_mref s mref; refs_of_typ s ty
and refs_of_mspec s (x: ILMethodSpec) =
refs_of_mref s x.MethodRef;
refs_of_typ s x.EnclosingType;
refs_of_typ s x.DeclaringType;
refs_of_inst s x.GenericArgs

and refs_of_fspec s x =
refs_of_fref s x.FieldRef;
refs_of_typ s x.EnclosingType
refs_of_typ s x.DeclaringType

and refs_of_typs s l = List.iter (refs_of_typ s) l

Expand Down Expand Up @@ -3769,11 +3769,11 @@ let ungenericizeTypeName n =
type ILEventRef =
{ erA: ILTypeRef; erB: string }
static member Create(a,b) = {erA=a;erB=b}
member x.EnclosingTypeRef = x.erA
member x.DeclaringTypeRef = x.erA
member x.Name = x.erB

type ILPropertyRef =
{ prA: ILTypeRef; prB: string }
static member Create (a,b) = {prA=a;prB=b}
member x.EnclosingTypeRef = x.prA
member x.DeclaringTypeRef = x.prA
member x.Name = x.prB
16 changes: 8 additions & 8 deletions src/absil/il.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ and ILTypes = list<ILType>
[<Sealed>]
type ILMethodRef =
static member Create : enclosingTypeRef: ILTypeRef * callingConv: ILCallingConv * name: string * genericArity: int * argTypes: ILTypes * returnType: ILType -> ILMethodRef
member EnclosingTypeRef: ILTypeRef
member DeclaringTypeRef: ILTypeRef
member CallingConv: ILCallingConv
member Name: string
member GenericArity: int
Expand All @@ -386,7 +386,7 @@ type ILMethodRef =

[<StructuralEquality; StructuralComparison>]
type ILFieldRef =
{ EnclosingTypeRef: ILTypeRef;
{ DeclaringTypeRef: ILTypeRef;
Name: string;
Type: ILType }

Expand All @@ -407,7 +407,7 @@ type ILFieldRef =
type ILMethodSpec =
static member Create : ILType * ILMethodRef * ILGenericArgs -> ILMethodSpec
member MethodRef: ILMethodRef
member EnclosingType: ILType
member DeclaringType: ILType
member GenericArgs: ILGenericArgs
member CallingConv: ILCallingConv
member GenericArity: int
Expand All @@ -421,8 +421,8 @@ type ILMethodSpec =
[<StructuralEquality; StructuralComparison>]
type ILFieldSpec =
{ FieldRef: ILFieldRef;
EnclosingType: ILType }
member EnclosingTypeRef: ILTypeRef
DeclaringType: ILType }
member DeclaringTypeRef: ILTypeRef
member Name: string
member FormalType: ILType
member ActualType : ILType
Expand Down Expand Up @@ -963,7 +963,7 @@ type PInvokeMethod =
type ILOverridesSpec =
| OverridesSpec of ILMethodRef * ILType
member MethodRef: ILMethodRef
member EnclosingType: ILType
member DeclaringType: ILType

// REVIEW: fold this into ILMethodDef.
type ILMethodVirtualInfo =
Expand Down Expand Up @@ -1921,13 +1921,13 @@ val computeILEnumInfo: string * ILFieldDefs -> ILEnumInfo
[<Sealed>]
type ILEventRef =
static member Create : ILTypeRef * string -> ILEventRef
member EnclosingTypeRef: ILTypeRef
member DeclaringTypeRef: ILTypeRef
member Name: string

[<Sealed>]
type ILPropertyRef =
static member Create : ILTypeRef * string -> ILPropertyRef
member EnclosingTypeRef: ILTypeRef
member DeclaringTypeRef: ILTypeRef
member Name: string
interface System.IComparable

Expand Down
8 changes: 4 additions & 4 deletions src/absil/ilmorph.fs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ let gparam_typ2typ f gf = {gf with Constraints = List.map f gf.Constraints}
let gparams_typ2typ f gfs = List.map (gparam_typ2typ f) gfs
let typs_typ2typ (f: ILType -> ILType) x = List.map f x
let mref_typ2typ (f: ILType -> ILType) (x:ILMethodRef) =
ILMethodRef.Create(enclosingTypeRef= (f (mkILBoxedType (mkILNonGenericTySpec x.EnclosingTypeRef))).TypeRef,
ILMethodRef.Create(enclosingTypeRef= (f (mkILBoxedType (mkILNonGenericTySpec x.DeclaringTypeRef))).TypeRef,
callingConv=x.CallingConv,
name=x.Name,
genericArity=x.GenericArity,
Expand All @@ -115,16 +115,16 @@ type formal_scopeCtxt = Choice<ILMethodSpec, ILFieldSpec>

let mspec_typ2typ (((factualty : ILType -> ILType) , (fformalty: formal_scopeCtxt -> ILType -> ILType))) (x: ILMethodSpec) =
mkILMethSpecForMethRefInTy(mref_typ2typ (fformalty (Choice1Of2 x)) x.MethodRef,
factualty x.EnclosingType,
factualty x.DeclaringType,
typs_typ2typ factualty x.GenericArgs)

let fref_typ2typ (f: ILType -> ILType) x =
{ x with EnclosingTypeRef = (f (mkILBoxedType (mkILNonGenericTySpec x.EnclosingTypeRef))).TypeRef;
{ x with DeclaringTypeRef = (f (mkILBoxedType (mkILNonGenericTySpec x.DeclaringTypeRef))).TypeRef;
Type= f x.Type }

let fspec_typ2typ ((factualty,(fformalty : formal_scopeCtxt -> ILType -> ILType))) x =
{ FieldRef=fref_typ2typ (fformalty (Choice2Of2 x)) x.FieldRef;
EnclosingType= factualty x.EnclosingType }
DeclaringType= factualty x.DeclaringType }

let rec celem_typ2typ f celem =
match celem with
Expand Down
Loading