Skip to content

Commit 772391c

Browse files
authored
Merge pull request #6643 from Microsoft/merges/master-to-nullness
Merge master to nullness
2 parents 702e12f + 70e1130 commit 772391c

File tree

9 files changed

+189
-67
lines changed

9 files changed

+189
-67
lines changed

fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,9 @@
434434
<Compile Include="$(FSharpSourcesRoot)/fsharp/CheckFormatStrings.fs">
435435
<Link>Logic/CheckFormatStrings.fs</Link>
436436
</Compile>
437+
<Compile Include="$(FSharpSourcesRoot)/fsharp/FindUnsolved.fsi">
438+
<Link>Logic/FindUnsolved.fsi</Link>
439+
</Compile>
437440
<Compile Include="$(FSharpSourcesRoot)/fsharp/FindUnsolved.fs">
438441
<Link>Logic/FindUnsolved.fs</Link>
439442
</Compile>
@@ -473,9 +476,15 @@
473476
<Compile Include="$(FSharpSourcesRoot)/fsharp/InnerLambdasToTopLevelFuncs.fs">
474477
<Link>Optimize/InnerLambdasToTopLevelFuncs.fs</Link>
475478
</Compile>
479+
<Compile Include="$(FSharpSourcesRoot)/fsharp/LowerCallsAndSeqs.fsi">
480+
<Link>Optimize/LowerCallsAndSeqs.fsi</Link>
481+
</Compile>
476482
<Compile Include="$(FSharpSourcesRoot)/fsharp/LowerCallsAndSeqs.fs">
477483
<Link>Optimize/LowerCallsAndSeqs.fs</Link>
478484
</Compile>
485+
<Compile Include="$(FSharpSourcesRoot)/fsharp/autobox.fsi">
486+
<Link>Optimize/autobox.fsi</Link>
487+
</Compile>
479488
<Compile Include="$(FSharpSourcesRoot)/fsharp/autobox.fs">
480489
<Link>Optimize/autobox.fs</Link>
481490
</Compile>

src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,9 @@
448448
<Compile Include="..\CheckFormatStrings.fs">
449449
<Link>Logic\CheckFormatStrings.fs</Link>
450450
</Compile>
451+
<Compile Include="..\FindUnsolved.fsi">
452+
<Link>Logic\FindUnsolved.fsi</Link>
453+
</Compile>
451454
<Compile Include="..\FindUnsolved.fs">
452455
<Link>Logic\FindUnsolved.fs</Link>
453456
</Compile>
@@ -469,8 +472,6 @@
469472
<Compile Include="..\TypeChecker.fs">
470473
<Link>Logic\TypeChecker.fs</Link>
471474
</Compile>
472-
473-
<!-- includes the optimizer and code generator -->
474475
<Compile Include="..\Optimizer.fsi">
475476
<Link>Optimize\Optimizer.fsi</Link>
476477
</Compile>
@@ -489,9 +490,15 @@
489490
<Compile Include="..\InnerLambdasToTopLevelFuncs.fs">
490491
<Link>Optimize\InnerLambdasToTopLevelFuncs.fs</Link>
491492
</Compile>
493+
<Compile Include="..\LowerCallsAndSeqs.fsi">
494+
<Link>Optimize\LowerCallsAndSeqs.fsi</Link>
495+
</Compile>
492496
<Compile Include="..\LowerCallsAndSeqs.fs">
493497
<Link>Optimize\LowerCallsAndSeqs.fs</Link>
494498
</Compile>
499+
<Compile Include="..\autobox.fsi">
500+
<Link>Optimize\autobox.fsi</Link>
501+
</Compile>
495502
<Compile Include="..\autobox.fs">
496503
<Link>Optimize\autobox.fs</Link>
497504
</Compile>

src/fsharp/FindUnsolved.fsi

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
2+
3+
4+
module internal FSharp.Compiler.FindUnsolved
5+
6+
open FSharp.Compiler.Tast
7+
open FSharp.Compiler.Tastops
8+
open FSharp.Compiler.TcGlobals
9+
open FSharp.Compiler.Import
10+
11+
/// Find all unsolved inference variables after type inference for an entire file
12+
val UnsolvedTyparsOfModuleDef: g: TcGlobals -> amap: ImportMap -> denv: DisplayEnv -> mdef : ModuleOrNamespaceExpr * extraAttribs: Attrib list -> Typar list

src/fsharp/LowerCallsAndSeqs.fs

Lines changed: 122 additions & 59 deletions
Large diffs are not rendered by default.

src/fsharp/LowerCallsAndSeqs.fsi

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
2+
3+
module internal FSharp.Compiler.LowerCallsAndSeqs
4+
5+
open FSharp.Compiler.Tast
6+
open FSharp.Compiler.TcGlobals
7+
open FSharp.Compiler.Import
8+
open FSharp.Compiler.Range
9+
10+
/// An "expr -> expr" pass that eta-expands under-applied values of
11+
/// known arity to lambda expressions and beta-var-reduces to bind
12+
/// any known arguments. The results are later optimized by the peephole
13+
/// optimizer in opt.fs
14+
val LowerImplFile: g: TcGlobals -> assembly: TypedImplFile -> TypedImplFile
15+
16+
/// Analyze a TAST expression to detect the elaborated form of a sequence expression.
17+
/// Then compile it to a state machine represented as a TAST containing goto, return and label nodes.
18+
/// The returned state machine will also contain references to state variables (from internal 'let' bindings),
19+
/// a program counter (pc) that records the current state, and a current generated value (current).
20+
/// All these variables are then represented as fields in a hosting closure object along with any additional
21+
/// free variables of the sequence expression.
22+
val LowerSeqExpr: g: TcGlobals -> amap: ImportMap -> overallExpr: Expr -> (ValRef * ValRef * ValRef * ValRef list * Expr * Expr * Expr * TType * range) option

src/fsharp/Optimizer.fs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1689,10 +1689,6 @@ let (|AnyQueryBuilderOpTrans|_|) g = function
16891689
Some (src, (fun newSource -> Expr.App (v, vty, tyargs, [builder; replaceArgs(newSource :: rest)], m)))
16901690
| _ -> None
16911691

1692-
let mkUnitDelayLambda (g: TcGlobals) m e =
1693-
let uv, _ = mkCompGenLocal m "unitVar" g.unit_ty
1694-
mkLambda m uv (e, tyOfExpr g e)
1695-
16961692
/// If this returns "Some" then the source is not IQueryable.
16971693
// <qexprInner> :=
16981694
// | query.Select(<qexprInner>, <other-arguments>) --> Seq.map(qexprInner', ...)

src/fsharp/autobox.fsi

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
2+
3+
module internal FSharp.Compiler.AutoBox
4+
5+
open FSharp.Compiler.Tast
6+
open FSharp.Compiler.TcGlobals
7+
open FSharp.Compiler.Import
8+
9+
/// Rewrite mutable locals to reference cells across an entire implementation file
10+
val TransformImplFile: g: TcGlobals -> amap: ImportMap -> implFile: TypedImplFile -> TypedImplFile
11+
12+

src/fsharp/import.fs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ type AssemblyLoader =
4141
abstract RecordGeneratedTypeRoot : ProviderGeneratedType -> unit
4242
#endif
4343

44-
45-
4644
//-------------------------------------------------------------------------
4745
// Import an IL types as F# types.
4846
//-------------------------------------------------------------------------

vsintegration/Utils/LanguageServiceProfiling/Options.fs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ let FCS (repositoryDir: string) : Options =
142142
@"src\fsharp\ConstraintSolver.fs"
143143
@"src\fsharp\CheckFormatStrings.fsi"
144144
@"src\fsharp\CheckFormatStrings.fs"
145+
@"src\fsharp\FindUnsolved.fsi"
145146
@"src\fsharp\FindUnsolved.fs"
146147
@"src\fsharp\QuotationTranslator.fsi"
147148
@"src\fsharp\QuotationTranslator.fs"
@@ -155,7 +156,9 @@ let FCS (repositoryDir: string) : Options =
155156
@"src\fsharp\DetupleArgs.fs"
156157
@"src\fsharp\InnerLambdasToTopLevelFuncs.fsi"
157158
@"src\fsharp\InnerLambdasToTopLevelFuncs.fs"
159+
@"src\fsharp\LowerCallsAndSeqs.fsi"
158160
@"src\fsharp\LowerCallsAndSeqs.fs"
161+
@"src\fsharp\autobox.fsi"
159162
@"src\fsharp\autobox.fs"
160163
@"src\fsharp\IlxGen.fsi"
161164
@"src\fsharp\IlxGen.fs"

0 commit comments

Comments
 (0)