Skip to content
Open
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
2 changes: 2 additions & 0 deletions docs/release-notes/.FSharp.Compiler.Service/11.0.200.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
### Changed

* Debugger: emit a call for a self tail call in non-optimized builds ([PR #20782](https://github.com/dotnet/fsharp/pull/20782))
* `FSharpMemberOrFunctionOrValue` and non-generic `FSharpEntity` symbols are shared per definition within a `SymbolEnv`, and cache their parameter groups, attributes, generic parameters, declaring entity and full type. `FSharpMemberOrFunctionOrValue.GetHashCode` uses the definition's stamp. ([PR #TODO](https://github.com/dotnet/fsharp/pull/TODO))
* `FSharpMemberOrFunctionOrValue` and non-generic `FSharpEntity` symbols are shared per definition within a `SymbolEnv`, and cache their parameter groups, attributes, generic parameters, declaring entity and full type. `FSharpMemberOrFunctionOrValue.GetHashCode` uses the definition's stamp. ([PR #20845](https://github.com/dotnet/fsharp/pull/20845))
* Remove the unused internal `--test:NoErrorText` switch and its argument-only diagnostic formatting. ([PR #20742](https://github.com/dotnet/fsharp/pull/20742))
* Assign seven previously preview-only features to [F# 11.2](https://fsharp.github.io/fsharp-compiler-docs/release-notes/Language.html#11.2), now the default language version. `default`, `latest`, and `latestmajor` select F# 11.2; explicit `11` and `11.0` retain F# 11.0 behavior. Preview SDK projects use the same compiler default unless `LangVersion` is explicitly set. `FromEndSlicing` remains preview-only. ([PR #20617](https://github.com/dotnet/fsharp/pull/20617))
* Add `SynExceptionDefnReprTrivia` with the range of the `exception` keyword to `SynExceptionDefnRepr`. ([Fantomas Issue #3483](https://github.com/fsprojects/fantomas/issues/3483), [PR #20612](https://github.com/dotnet/fsharp/pull/20612))
Expand Down
14 changes: 7 additions & 7 deletions src/Compiler/Symbols/Exprs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,9 @@ module FSharpExprConvert =
let enclTyArgs, methTyArgs = List.splitAfter numEnclTypeArgs tyargs
let witnessArgsR = GetWitnessArgs cenv env vref m tps tyargs
// tailcall
ConvObjectModelCallLinear cenv env (isNewObj, FSharpMemberOrFunctionOrValue(cenv, vref), enclTyArgs, methTyArgs, witnessArgsR, callArgs) contf2
ConvObjectModelCallLinear cenv env (isNewObj, FSharpMemberOrFunctionOrValue.Shared(cenv, vref), enclTyArgs, methTyArgs, witnessArgsR, callArgs) contf2
else
let v = FSharpMemberOrFunctionOrValue(cenv, vref)
let v = FSharpMemberOrFunctionOrValue.Shared(cenv, vref)
let witnessArgsR = GetWitnessArgs cenv env vref m vref.Typars tyargs
// tailcall
ConvObjectModelCallLinear cenv env (false, v, [], tyargs, witnessArgsR, List.concat untupledCurriedArgs) contf2
Expand Down Expand Up @@ -892,7 +892,7 @@ module FSharpExprConvert =
E.AddressSet(ConvExpr cenv env (exprForValRef m vref), ConvExpr cenv env e)

| TOp.LValueOp (LSet, vref), [], [e] ->
E.ValueSet(FSharpMemberOrFunctionOrValue(cenv, vref), ConvExpr cenv env e)
E.ValueSet(FSharpMemberOrFunctionOrValue.Shared(cenv, vref), ConvExpr cenv env e)

| TOp.LValueOp (LByrefGet, vref), [], [] ->
ConvValRef cenv env m vref
Expand Down Expand Up @@ -1039,7 +1039,7 @@ module FSharpExprConvert =
let minfo = MethInfo.FSMeth(g, enclosingTy, vr, None)
FSharpMemberOrFunctionOrValue(cenv, minfo)
else
FSharpMemberOrFunctionOrValue(cenv, vr)
FSharpMemberOrFunctionOrValue.Shared(cenv, vr)
makeCall memOrVal

// takes a possibly fake ValRef and tries to resolve it to an F# expression
Expand Down Expand Up @@ -1272,11 +1272,11 @@ module FSharpExprConvert =
elif v.IsBaseVal then
E.BaseValue(ConvType cenv v.Type)
else
E.Value(FSharpMemberOrFunctionOrValue(cenv, vref))
E.Value(FSharpMemberOrFunctionOrValue.Shared(cenv, vref))

and ConvVal cenv (v: Val) : FSharpMemberOrFunctionOrValue =
let vref = mkLocalValRef v
FSharpMemberOrFunctionOrValue(cenv, vref)
FSharpMemberOrFunctionOrValue.Shared(cenv, vref)

and ConvConst cenv env m c ty =
let g = cenv.g
Expand Down Expand Up @@ -1401,7 +1401,7 @@ and FSharpImplementationFileContents(cenv, mimpl) =
assert v.IsCompiledAsTopLevel
let valReprInfo = InferValReprInfoOfBinding g AllowTypeDirectedDetupling.Yes v bind.Expr
let tps, _ctorThisValOpt, _baseValOpt, vsl, body, _bodyty = IteratedAdjustLambdaToMatchValReprInfo g cenv.amap valReprInfo bind.Expr
let v = FSharpMemberOrFunctionOrValue(cenv, mkLocalValRef v)
let v = FSharpMemberOrFunctionOrValue.Shared(cenv, mkLocalValRef v)
let gps = v.GenericParameters
let vslR = List.mapSquared (FSharpExprConvert.ConvVal cenv) vsl
let env = ExprTranslationEnv.Empty(g).BindTypars (Seq.zip tps gps |> Seq.toList)
Expand Down
Loading
Loading