Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master to nullness #6643

Merged
merged 1 commit into from
Apr 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,9 @@
<Compile Include="$(FSharpSourcesRoot)/fsharp/CheckFormatStrings.fs">
<Link>Logic/CheckFormatStrings.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)/fsharp/FindUnsolved.fsi">
<Link>Logic/FindUnsolved.fsi</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)/fsharp/FindUnsolved.fs">
<Link>Logic/FindUnsolved.fs</Link>
</Compile>
Expand Down Expand Up @@ -473,9 +476,15 @@
<Compile Include="$(FSharpSourcesRoot)/fsharp/InnerLambdasToTopLevelFuncs.fs">
<Link>Optimize/InnerLambdasToTopLevelFuncs.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)/fsharp/LowerCallsAndSeqs.fsi">
<Link>Optimize/LowerCallsAndSeqs.fsi</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)/fsharp/LowerCallsAndSeqs.fs">
<Link>Optimize/LowerCallsAndSeqs.fs</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)/fsharp/autobox.fsi">
<Link>Optimize/autobox.fsi</Link>
</Compile>
<Compile Include="$(FSharpSourcesRoot)/fsharp/autobox.fs">
<Link>Optimize/autobox.fs</Link>
</Compile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,9 @@
<Compile Include="..\CheckFormatStrings.fs">
<Link>Logic\CheckFormatStrings.fs</Link>
</Compile>
<Compile Include="..\FindUnsolved.fsi">
<Link>Logic\FindUnsolved.fsi</Link>
</Compile>
<Compile Include="..\FindUnsolved.fs">
<Link>Logic\FindUnsolved.fs</Link>
</Compile>
Expand All @@ -468,8 +471,6 @@
<Compile Include="..\TypeChecker.fs">
<Link>Logic\TypeChecker.fs</Link>
</Compile>

<!-- includes the optimizer and code generator -->
<Compile Include="..\Optimizer.fsi">
<Link>Optimize\Optimizer.fsi</Link>
</Compile>
Expand All @@ -488,9 +489,15 @@
<Compile Include="..\InnerLambdasToTopLevelFuncs.fs">
<Link>Optimize\InnerLambdasToTopLevelFuncs.fs</Link>
</Compile>
<Compile Include="..\LowerCallsAndSeqs.fsi">
<Link>Optimize\LowerCallsAndSeqs.fsi</Link>
</Compile>
<Compile Include="..\LowerCallsAndSeqs.fs">
<Link>Optimize\LowerCallsAndSeqs.fs</Link>
</Compile>
<Compile Include="..\autobox.fsi">
<Link>Optimize\autobox.fsi</Link>
</Compile>
<Compile Include="..\autobox.fs">
<Link>Optimize\autobox.fs</Link>
</Compile>
Expand Down
12 changes: 12 additions & 0 deletions src/fsharp/FindUnsolved.fsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.


module internal FSharp.Compiler.FindUnsolved

open FSharp.Compiler.Tast
open FSharp.Compiler.Tastops
open FSharp.Compiler.TcGlobals
open FSharp.Compiler.Import

/// Find all unsolved inference variables after type inference for an entire file
val UnsolvedTyparsOfModuleDef: g: TcGlobals -> amap: ImportMap -> denv: DisplayEnv -> mdef : ModuleOrNamespaceExpr * extraAttribs: Attrib list -> Typar list
181 changes: 122 additions & 59 deletions src/fsharp/LowerCallsAndSeqs.fs

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions src/fsharp/LowerCallsAndSeqs.fsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.

module internal FSharp.Compiler.LowerCallsAndSeqs

open FSharp.Compiler.Tast
open FSharp.Compiler.TcGlobals
open FSharp.Compiler.Import
open FSharp.Compiler.Range

/// An "expr -> expr" pass that eta-expands under-applied values of
/// known arity to lambda expressions and beta-var-reduces to bind
/// any known arguments. The results are later optimized by the peephole
/// optimizer in opt.fs
val LowerImplFile: g: TcGlobals -> assembly: TypedImplFile -> TypedImplFile

/// Analyze a TAST expression to detect the elaborated form of a sequence expression.
/// Then compile it to a state machine represented as a TAST containing goto, return and label nodes.
/// The returned state machine will also contain references to state variables (from internal 'let' bindings),
/// a program counter (pc) that records the current state, and a current generated value (current).
/// All these variables are then represented as fields in a hosting closure object along with any additional
/// free variables of the sequence expression.
val LowerSeqExpr: g: TcGlobals -> amap: ImportMap -> overallExpr: Expr -> (ValRef * ValRef * ValRef * ValRef list * Expr * Expr * Expr * TType * range) option
4 changes: 0 additions & 4 deletions src/fsharp/Optimizer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1689,10 +1689,6 @@ let (|AnyQueryBuilderOpTrans|_|) g = function
Some (src, (fun newSource -> Expr.App (v, vty, tyargs, [builder; replaceArgs(newSource :: rest)], m)))
| _ -> None

let mkUnitDelayLambda (g: TcGlobals) m e =
let uv, _ = mkCompGenLocal m "unitVar" g.unit_ty
mkLambda m uv (e, tyOfExpr g e)

/// If this returns "Some" then the source is not IQueryable.
// <qexprInner> :=
// | query.Select(<qexprInner>, <other-arguments>) --> Seq.map(qexprInner', ...)
Expand Down
12 changes: 12 additions & 0 deletions src/fsharp/autobox.fsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.

module internal FSharp.Compiler.AutoBox

open FSharp.Compiler.Tast
open FSharp.Compiler.TcGlobals
open FSharp.Compiler.Import

/// Rewrite mutable locals to reference cells across an entire implementation file
val TransformImplFile: g: TcGlobals -> amap: ImportMap -> implFile: TypedImplFile -> TypedImplFile


2 changes: 0 additions & 2 deletions src/fsharp/import.fs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ type AssemblyLoader =
abstract RecordGeneratedTypeRoot : ProviderGeneratedType -> unit
#endif



//-------------------------------------------------------------------------
// Import an IL types as F# types.
//-------------------------------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions vsintegration/Utils/LanguageServiceProfiling/Options.fs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ let FCS (repositoryDir: string) : Options =
@"src\fsharp\ConstraintSolver.fs"
@"src\fsharp\CheckFormatStrings.fsi"
@"src\fsharp\CheckFormatStrings.fs"
@"src\fsharp\FindUnsolved.fsi"
@"src\fsharp\FindUnsolved.fs"
@"src\fsharp\QuotationTranslator.fsi"
@"src\fsharp\QuotationTranslator.fs"
Expand All @@ -155,7 +156,9 @@ let FCS (repositoryDir: string) : Options =
@"src\fsharp\DetupleArgs.fs"
@"src\fsharp\InnerLambdasToTopLevelFuncs.fsi"
@"src\fsharp\InnerLambdasToTopLevelFuncs.fs"
@"src\fsharp\LowerCallsAndSeqs.fsi"
@"src\fsharp\LowerCallsAndSeqs.fs"
@"src\fsharp\autobox.fsi"
@"src\fsharp\autobox.fs"
@"src\fsharp\IlxGen.fsi"
@"src\fsharp\IlxGen.fs"
Expand Down