Skip to content

Commit

Permalink
Merge branch 'main' into feature/nullness
Browse files Browse the repository at this point in the history
  • Loading branch information
T-Gro authored Jan 25, 2024
2 parents 3250b7e + 615475b commit cf735db
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/release-notes/.FSharp.Compiler.Service/8.0.300.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

### Added


* Support for nullable reference types ([PR #15181](https://github.com/dotnet/fsharp/pull/15181))
* The stackguard depth for ILPdbWriter.unshadowScopes can be modified via the environment variable `FSHARP_ILPdb_UnshadowScopes_StackGuardDepth`([PR #16583](https://github.com/dotnet/fsharp/pull/16583))
* Parser recovers on complex primary constructor patterns, better tree representation for primary constructor patterns. ([PR #16425](https://github.com/dotnet/fsharp/pull/16425))
* Name resolution: keep type vars in subsequent checks ([PR #16456](https://github.com/dotnet/fsharp/pull/16456))
* Higher-order-function-based API for working with the untyped abstract syntax tree. ([PR #16462](https://github.com/dotnet/fsharp/pull/16462))
Expand Down
8 changes: 7 additions & 1 deletion src/Compiler/AbstractIL/ilwritepdb.fs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ open Internal.Utilities
open FSharp.Compiler.AbstractIL.IL
open FSharp.Compiler.AbstractIL.Support
open Internal.Utilities.Library
open Internal.Utilities.Library.Extras
open FSharp.Compiler.DiagnosticsLogger
open FSharp.Compiler.IO
open FSharp.Compiler.Text.Range
Expand Down Expand Up @@ -1028,6 +1029,11 @@ let rec pushShadowedLocals (stackGuard: StackGuard) (localsToPush: PdbLocalVar[]
// adding the text " (shadowed)" to the names of those with name conflicts.
let unshadowScopes rootScope =
// Avoid stack overflow when writing linearly nested scopes
let stackGuard = StackGuard(100, "ILPdbWriter.unshadowScopes")
let UnshadowScopesStackGuardDepth =
GetEnvInteger "FSHARP_ILPdb_UnshadowScopes_StackGuardDepth" 100

let stackGuard =
StackGuard(UnshadowScopesStackGuardDepth, "ILPdbWriter.unshadowScopes")

let result, _ = pushShadowedLocals stackGuard [||] rootScope
result

0 comments on commit cf735db

Please sign in to comment.