diff --git a/.github/instructions/frustration.instructions.md b/.github/instructions/frustration.instructions.md new file mode 100644 index 00000000000..43a8da380a2 --- /dev/null +++ b/.github/instructions/frustration.instructions.md @@ -0,0 +1,9 @@ +# Frustration-Driven Instructions + +--- + +## 2026-06-11 + +NEVER claim a test failure is 'pre-existing', 'flaky', or an 'infra issue' without proof. Default assumption: MY BRANCH CAUSED IT. Required proof before dismissing a failure: (1) the SAME test name failing on at least 2 recent successful or other-PR builds based on the same main commit, AND (2) the same failure mode/diff. Without both pieces of evidence, treat the failure as your own regression and investigate the root cause. + +--- diff --git a/.gitignore b/.gitignore index 58da32ae096..ae438fb2b11 100644 --- a/.gitignore +++ b/.gitignore @@ -161,3 +161,4 @@ tests/projects/CompilerCompat/local-nuget-packages/ tests/projects/CompilerCompat/lib-output-*/ tests/projects/CompilerCompat/**/bin/ tests/projects/CompilerCompat/**/obj/ +.scratch/ diff --git a/azure-pipelines-PR.yml b/azure-pipelines-PR.yml index b627fab985c..714dc54bbec 100644 --- a/azure-pipelines-PR.yml +++ b/azure-pipelines-PR.yml @@ -100,7 +100,7 @@ stages: helixRepo: dotnet/fsharp jobs: # Determinism, we want to run it only in PR builds - - job: Determinism_Debug + - job: Determinism_Release condition: eq(variables['Build.Reason'], 'PullRequest') variables: - name: _SignType @@ -109,13 +109,6 @@ stages: name: $(DncEngPublicBuildPool) demands: ImageOverride -equals $(_WindowsMachineQueueName) timeoutInMinutes: 90 - strategy: - maxParallel: 2 - matrix: - regular: - _experimental_flag: '' - experimental_features: - _experimental_flag: '' steps: - checkout: self clean: true @@ -129,15 +122,15 @@ stages: workingDirectory: $(Build.SourcesDirectory) installationPath: $(Build.SourcesDirectory)/.dotnet - script: .\eng\common\dotnet.cmd - - script: .\eng\test-determinism.cmd -configuration Debug - env: - FSHARP_EXPERIMENTAL_FEATURES: $(_experimental_flag) - displayName: Determinism tests with Debug configuration + - script: .\eng\test-determinism.cmd -configuration Release + displayName: Determinism tests (race detector — same flags both builds) + - script: .\eng\test-determinism.cmd -configuration Release -mode seq-vs-par + displayName: Determinism tests (1-shot diff — sequential vs parallel) - task: PublishPipelineArtifact@1 displayName: Publish Determinism Logs inputs: - targetPath: '$(Build.SourcesDirectory)/artifacts/log/Debug' - artifactName: 'Determinism_Debug Attempt $(System.JobAttempt) Logs' + targetPath: '$(Build.SourcesDirectory)/artifacts/log/Release' + artifactName: 'Determinism_Release Attempt $(System.JobAttempt) Logs' continueOnError: true condition: not(succeeded()) diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index 965957dbc0c..d4950da2bef 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -1,9 +1,12 @@ ### Fixed +* Stabilize codegen order under `--parallelcompilation+` so `--deterministic` Release builds produce byte-identical IL across rebuilds: optimizer Val iteration, IlxGen type/method/field/event emit order, anonymous-record extra-binding drain, and `FileIndex` assignment now follow source position rather than thread-scheduling order. Compiler-generated names are also bucketed by the file being optimized/emitted (per-file naming scope) rather than by inlined source location, so parallel optimization and code generation no longer race on a shared name counter. ([Issue #19732](https://github.com/dotnet/fsharp/issues/19732), [PR #19810](https://github.com/dotnet/fsharp/pull/19810)) * Suppress hover/symbol resolution for wildcard `_` patterns inside `member _.…` bodies that incorrectly showed `val _: T` tooltip. ([PR #19760](https://github.com/dotnet/fsharp/pull/19760)) * Deduplicate format specifier locations in computation expressions so editor tooling no longer reports duplicate entries for the same `%` specifier. ([Issue #16419](https://github.com/dotnet/fsharp/issues/16419), [PR #19791](https://github.com/dotnet/fsharp/pull/19791)) +* Stabilize codegen order under `--parallelcompilation+` so `--deterministic` Release builds produce byte-identical IL across rebuilds: optimizer Val iteration, IlxGen type/method/field/event emit order, anonymous-record extra-binding drain, and `FileIndex` assignment now follow source position rather than thread-scheduling order. ([Issue #19732](https://github.com/dotnet/fsharp/issues/19732), [PR #19810](https://github.com/dotnet/fsharp/pull/19810)) * Reject non-function bindings for single-case and partial active pattern names with FS1209, matching the existing multi-case behavior. ([PR #19763](https://github.com/dotnet/fsharp/pull/19763)) * Fix FS0421 "The address of the variable cannot be used at this point" incorrectly raised for the discard pattern `let _ = &expr` when `let x = &expr` compiles. ([Issue #18841](https://github.com/dotnet/fsharp/issues/18841), [PR #19811](https://github.com/dotnet/fsharp/pull/19811)) +* Make `--deterministic` Release builds byte-reproducible under `--parallelcompilation+`. Compiler-generated names produced by the Detuple/TLR optimizer passes and by closure code-generation are now bucketed by the emitting file rather than by the (possibly inlined) source range, so parallel codegen of distinct consumer files no longer races on a shared name-counter. ([Issue #19732](https://github.com/dotnet/fsharp/issues/19732), [PR #19810](https://github.com/dotnet/fsharp/pull/19810)) * Honor `--nowarn` and `--warnaserror` for warnings emitted during command-line option parsing ([Issue #19576](https://github.com/dotnet/fsharp/issues/19576), [PR #19776](https://github.com/dotnet/fsharp/pull/19776)) * Fix `[]` prefix attributes being silently dropped on class members, and fix false-positive `AllowMultiple=false` errors when `[]` and `[]` are applied to the same binding. ([Issue #17904](https://github.com/dotnet/fsharp/issues/17904), [Issue #19020](https://github.com/dotnet/fsharp/issues/19020), [PR #19738](https://github.com/dotnet/fsharp/pull/19738)) * Preserve type abbreviations (`string`, user-defined aliases) in the refined type of bindings introduced after a `| null` pattern in a `match` expression. ([Issue #19646](https://github.com/dotnet/fsharp/issues/19646), [PR #19745](https://github.com/dotnet/fsharp/pull/19745)) diff --git a/eng/test-determinism.ps1 b/eng/test-determinism.ps1 index a69c677644d..b7c65bffc2c 100644 --- a/eng/test-determinism.ps1 +++ b/eng/test-determinism.ps1 @@ -2,6 +2,8 @@ param([string]$configuration = "Debug", [string]$msbuildEngine = "vs", [string]$altRootDrive = "q:", + [ValidateSet("same", "seq-vs-par")] + [string]$mode = "same", [switch]$help, [switch]$norestore, [switch]$rebuild) @@ -15,6 +17,8 @@ function Print-Usage() { Write-Host " -msbuildEngine Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)." Write-Host " -bootstrapDir Directory containing the bootstrap compiler" Write-Host " -altRootDrive The drive we build on (via subst) for verifying pathmap implementation" + Write-Host " -mode 'same' (default): build twice with identical flags (race-detector)" + Write-Host " 'seq-vs-par': first build sequential, second build parallel (deterministic 1-shot diff)" } if ($help) { @@ -25,7 +29,7 @@ if ($help) { # List of binary names that should be skipped because they have a known issue that # makes them non-deterministic. $script:skipList = @() -function Run-Build([string]$rootDir, [string]$increment) { +function Run-Build([string]$rootDir, [string]$increment, [string]$additionalFscFlags = "") { $logFileName = $increment @@ -62,6 +66,9 @@ function Run-Build([string]$rootDir, [string]$increment) { Stop-Processes Write-Host "Building $solution using $bootstrapDir into '$increment' $incrementDir" + if ($additionalFscFlags -ne "") { + Write-Host " AdditionalFscCmdFlags = '$additionalFscFlags'" + } MSBuild $toolsetBuildProj ` /p:Configuration=$configuration ` /p:Projects=$solution ` @@ -86,6 +93,7 @@ function Run-Build([string]$rootDir, [string]$increment) { /p:RunAnalyzers=false ` /p:RunAnalyzersDuringBuild=false ` /p:BUILDING_USING_DOTNET=false ` + /p:AdditionalFscCmdFlags="$additionalFscFlags" ` /bl:$logFilePath Write-Host "Copy-Item -Path $binDir -Destination $incrementDir -ErrorAction SilentlyContinue -Recurse" @@ -202,9 +210,9 @@ function Test-MapContents($dataMap) { } } -function Test-Build([string]$rootDir, $dataMap, [string]$increment) { +function Test-Build([string]$rootDir, $dataMap, [string]$increment, [string]$additionalFscFlags = "") { $logFileName = $increment - Run-Build $rootDir -increment $increment + Run-Build $rootDir -increment $increment -additionalFscFlags $additionalFscFlags $errorList = @() $allGood = $true @@ -273,14 +281,31 @@ function Test-Build([string]$rootDir, $dataMap, [string]$increment) { } function Run-Test() { + $seqFlags = "" + $parFlags = "" + if ($mode -eq "seq-vs-par") { + # First build: sequential (force single-threaded, disable any parallel test paths) + $seqFlags = "--parallelcompilation- --test:ParallelOff --nowarn:75" + # Second build: parallel (default in modern fsc, made explicit for clarity) + $parFlags = "--parallelcompilation+" + Write-Host "Determinism mode: seq-vs-par" + Write-Host " Initial (seq): $seqFlags" + Write-Host " Test1 (par): $parFlags" + } + else { + Write-Host "Determinism mode: same (race-detector; both builds identical)" + } + # Run the initial build so that we can populate the maps - Run-Build $RepoRoot -increment "Initial" -useBootstrap + Run-Build $RepoRoot -increment "Initial" -additionalFscFlags $seqFlags $dataMap = Record-Binaries $RepoRoot "Initial" Test-MapContents $dataMap - # Run a test against the source in the same directory location - Test-Build -rootDir $RepoRoot -dataMap $dataMap -increment "Test1" + # Run a test against the source in the same directory location. + # In 'same' mode: same flags as Initial (probabilistic race detector). + # In 'seq-vs-par' mode: parallel flags, contrasting against the sequential Initial. + Test-Build -rootDir $RepoRoot -dataMap $dataMap -increment "Test1" -additionalFscFlags $parFlags # Run another build in a different source location and verify that path mapping # allows the build to be identical. To do this we'll copy the entire source diff --git a/src/Compiler/CodeGen/IlxGen.fs b/src/Compiler/CodeGen/IlxGen.fs index 46959e56b22..920d195920c 100644 --- a/src/Compiler/CodeGen/IlxGen.fs +++ b/src/Compiler/CodeGen/IlxGen.fs @@ -1267,6 +1267,14 @@ and IlxGenEnv = /// Collection of code-gen functions where each inner array represents codegen (method bodies) functions for a single file delayedFileGenReverse: list<(unit -> unit)[]> + /// Per-consumer-file closure type-name allocation scope. Cross-file inlined closures + /// receive an `F` marker to avoid racing on the shared + /// StableNiceNameGenerator bucket under parallel codegen. In-file closures keep the + /// legacy `basicName@[-N]` naming. See https://github.com/dotnet/fsharp/issues/19928. + /// When None, falls back to the shared StableNameGenerator directly (used until each + /// file scope is allocated in GenImplFile). + closureNameScope: PerFileClosureNameScope option + /// Other information from the emit of this assembly intraAssemblyInfo: IlxGenIntraAssemblyInfo @@ -1996,13 +2004,57 @@ let MergePropertyDefs m ilPropertyDefs = /// Information collected imperatively for each type definition type TypeDefBuilder(tdef: ILTypeDef, tdefDiscards) = - let gmethods = ResizeArray(tdef.Methods.AsList()) - let gfields = ResizeArray(tdef.Fields.AsList()) + // Methods, fields and events are stored with a monotonically increasing insertion + // index. On Close() they are sorted by (Name, insertion index) so that within each + // type the IL emission order is independent of whether the surrounding method body + // was emitted inline (sequential codegen) or via the deferred queue at IlxGen.fs:12516 + // (parallel codegen). The insertion-index tiebreaker preserves source-order grouping + // for methods that legitimately share a name (e.g. overloaded constructors and + // generic re-instantiations). Method ordering has no IL semantics — metadata tokens + // are assigned by the writer based on input order and any references inside the same + // assembly are re-resolved against that order. + // See https://github.com/dotnet/fsharp/issues/19732. + let mutable methodIdx = 0 + let mutable fieldIdx = 0 + let mutable eventIdx = 0 + + let gmethods = + let initial = tdef.Methods.AsList() + + let xs = ResizeArray(initial.Length) + + for m in initial do + let k = methodIdx + methodIdx <- methodIdx + 1 + xs.Add(struct (m.Name, k), m) + + xs + + let gfields = + let initial = tdef.Fields.AsList() + let xs = ResizeArray(initial.Length) + + for f in initial do + let k = fieldIdx + fieldIdx <- fieldIdx + 1 + xs.Add(struct (f.Name, k), f) + + xs let gproperties: Dictionary = Dictionary<_, _>(3, HashIdentity.Structural) - let gevents = ResizeArray(tdef.Events.AsList()) + let gevents = + let initial = tdef.Events.AsList() + let xs = ResizeArray(initial.Length) + + for e in initial do + let k = eventIdx + eventIdx <- eventIdx + 1 + xs.Add(struct (e.Name, k), e) + + xs + let gnested = TypeDefsBuilder() member _.Close(g: TcGlobals) = @@ -2022,31 +2074,122 @@ type TypeDefBuilder(tdef: ILTypeDef, tdefDiscards) = else tdef.CustomAttrs + // Methods come from two sources with different ordering semantics: + // 1. User method definitions added during the SEQUENTIAL spine walk (e.g. ctors, + // properties, F# `member` bindings). Their insertion order is deterministic + // across SEQ and PAR codegen — preserve to match main's behavior and the + // inline IL baselines. + // + // 2. Method bodies emitted by the DEFERRED codegen pass — primarily closure + // invokers (`Invoke@`, `MoveNext`) and other compiler-generated methods. + // Under `--parallelcompilation+` these race; sort by name for stability. + // + // Splitting by `@` in the method name keeps user-method order stable while making + // the deferred closure-method order deterministic. See + // https://github.com/dotnet/fsharp/issues/19928. + let sortedMethods = + let userMethods = ResizeArray() + let deferredMethods = ResizeArray() + + for entry in gmethods do + let struct (name, _) = fst entry + + if name.Contains("@") then + deferredMethods.Add(entry) + else + userMethods.Add(entry) + + let sortedUser = + userMethods + |> Seq.sortBy (fun (struct (_, k), _) -> k) + |> Seq.map snd + |> List.ofSeq + + let sortedDeferred = deferredMethods |> Seq.sortBy fst |> Seq.map snd |> List.ofSeq + + sortedUser @ sortedDeferred + + // Fields ordering: + // - User-defined fields and most compiler-generated fields preserve insertion order + // (struct [] DU/Record types depend on IL field order for physical memory + // layout — visible via Marshal.SizeOf, P/Invoke ABI, blittable interop). + // - Compiler-generated raw-data static fields generated by GenConstArray have the + // specific shape 'field_@' (line and idx are digits, joined by '_', + // suffix '@'). These are added by deferred parallel codegen in scheduler order; + // sort them by name to make SEQ=PAR deterministic. Append after user fields to + // keep user-field positions unchanged. See https://github.com/dotnet/fsharp/issues/19928. + let preservedFields = + let isGenConstArrayField (name: string) = + // Match the specific 'field_@' shape (digits, '_', digits, '@') + // produced by GetOrCreateRawDataFieldSpec. Avoids false positives like + // 'init@', 'X@', or other compiler-generated fields whose IL order must + // be preserved for struct memory layout. + name.Length > 7 + && name.StartsWith("field", StringComparison.Ordinal) + && name.EndsWith("@", StringComparison.Ordinal) + && (let mid = name.Substring(5, name.Length - 6) + let hasUnderscore = mid.Contains("_") + + hasUnderscore + && (mid |> Seq.forall (fun (c: char) -> Char.IsDigit c || c = '_'))) + + let userFields = ResizeArray() + let rawFields = ResizeArray() + + for entry in gfields do + let struct (name, _) = fst entry + + if isGenConstArrayField name then + rawFields.Add(entry) + else + userFields.Add(entry) + + let sortedUser = + userFields + |> Seq.sortBy (fun (struct (_, k), _) -> k) + |> Seq.map snd + |> List.ofSeq + + let sortedRaw = rawFields |> Seq.sortBy fst |> Seq.map snd |> List.ofSeq + + sortedUser @ sortedRaw + + let preservedEvents = + gevents |> Seq.sortBy (fun (struct (_, k), _) -> k) |> Seq.map snd |> List.ofSeq + tdef.With( - methods = mkILMethods (ResizeArray.toList gmethods), - fields = mkILFields (ResizeArray.toList gfields), + methods = mkILMethods sortedMethods, + fields = mkILFields preservedFields, properties = mkILProperties (tdef.Properties.AsList() @ HashRangeSorted gproperties), - events = mkILEvents (ResizeArray.toList gevents), + events = mkILEvents preservedEvents, nestedTypes = mkILTypeDefs (tdef.NestedTypes.AsList() @ gnested.Close(g)), customAttrs = storeILCustomAttrs attrs ) - member _.AddEventDef edef = gevents.Add edef + member _.AddEventDef(edef: ILEventDef) = + let k = eventIdx + eventIdx <- eventIdx + 1 + gevents.Add(struct (edef.Name, k), edef) - member _.AddFieldDef ilFieldDef = gfields.Add ilFieldDef + member _.AddFieldDef(ilFieldDef: ILFieldDef) = + let k = fieldIdx + fieldIdx <- fieldIdx + 1 + gfields.Add(struct (ilFieldDef.Name, k), ilFieldDef) - member _.AddMethodDef ilMethodDef = + member _.AddMethodDef(ilMethodDef: ILMethodDef) = let discard = match tdefDiscards with | Some(mdefDiscard, _) -> mdefDiscard ilMethodDef | None -> false if not discard then - gmethods.Add ilMethodDef + let k = methodIdx + methodIdx <- methodIdx + 1 + gmethods.Add(struct (ilMethodDef.Name, k), ilMethodDef) member _.NestedTypeDefs = gnested - member _.GetCurrentFields() = gfields |> Seq.readonly + member _.GetCurrentFields() = gfields |> Seq.map snd |> Seq.readonly /// Merge Get and Set property nodes, which we generate independently for F# code /// when we come across their corresponding methods. @@ -2060,22 +2203,56 @@ type TypeDefBuilder(tdef: ILTypeDef, tdefDiscards) = AddPropertyDefToHash m gproperties pdef member _.AppendInstructionsToSpecificMethodDef(cond, instrs, tag, imports) = - match ResizeArray.tryFindIndex cond gmethods with - | Some idx -> gmethods[idx] <- appendInstrsToMethod instrs gmethods[idx] + let findIdx = + let mutable found = -1 + let mutable i = 0 + + for _, md in gmethods do + if found < 0 && cond md then + found <- i + + i <- i + 1 + + if found >= 0 then Some found else None + + match findIdx with + | Some idx -> + let k, md = gmethods[idx] + gmethods[idx] <- (k, appendInstrsToMethod instrs md) | None -> let body = mkMethodBody (false, [], 1, nonBranchingInstrsToCode instrs, tag, imports) - gmethods.Add(mkILClassCtor body) + let cctor = mkILClassCtor body + let k = methodIdx + methodIdx <- methodIdx + 1 + gmethods.Add(struct (cctor.Name, k), cctor) member this.PrependInstructionsToSpecificMethodDef(cond, instrs, tag, imports) = - match ResizeArray.tryFindIndex cond gmethods with - | Some idx -> gmethods[idx] <- prependInstrsToMethod instrs gmethods[idx] + let findIdx = + let mutable found = -1 + let mutable i = 0 + + for _, md in gmethods do + if found < 0 && cond md then + found <- i + + i <- i + 1 + + if found >= 0 then Some found else None + + match findIdx with + | Some idx -> + let k, md = gmethods[idx] + gmethods[idx] <- (k, prependInstrsToMethod instrs md) | None -> let body = mkMethodBody (false, [], 1, nonBranchingInstrsToCode instrs, tag, imports) - gmethods.Add(mkILClassCtor body) + let cctor = mkILClassCtor body + let k = methodIdx + methodIdx <- methodIdx + 1 + gmethods.Add(struct (cctor.Name, k), cctor) this @@ -2083,17 +2260,26 @@ type TypeDefBuilder(tdef: ILTypeDef, tdefDiscards) = and TypeDefsBuilder() = + // Sort key for an entry: (addAtEnd, fileIndex, startLine, startColumn, name, idx) + // - addAtEnd=false entries sort first, in source-position order (so user-declared nested + // types preserve declaration order, and compiler-generated closures interleave at their + // originating expression's source position regardless of when they were emitted). + // - addAtEnd=true entries (PrivateImplementationDetails, anonymous record types, raw-data + // value types) sort last; we order them by name to canonicalize across runs since these + // types have no meaningful user-source position. The auxiliary types are reached via + // memoization tables whose first-writer wins under parallel codegen, so insertion idx is + // not stable for them. + // - idx remains as a final tiebreaker for entries that share an identical (addAtEnd, range, + // name) — currently impossible since name is unique per parent, but kept for safety. let tdefs = - ConcurrentDictionary>(HashIdentity.Structural) + ConcurrentDictionary>( + HashIdentity.Structural + ) let mutable countDown = Int32.MaxValue let mutable countUp = -1 member b.Close(g: TcGlobals) = - //The order we emit type definitions is not deterministic since it is using the reverse of a range from a hash table. We should use an approximation of source order. - // Ideally it shouldn't matter which order we use. - // However, for some tests FSI generated code appears sensitive to the order, especially for nested types. - [ for _, (b, eliminateIfEmpty) in tdefs.Values |> Seq.collect id |> Seq.sortBy fst do let tdef = b.Close(g) @@ -2121,16 +2307,41 @@ and TypeDefsBuilder() = member b.FindNestedTypeDefBuilder(tref: ILTypeRef) = b.FindNestedTypeDefsBuilder(tref.Enclosing).FindTypeDefBuilder(tref.Name) - member b.AddTypeDef(tdef: ILTypeDef, eliminateIfEmpty, addAtEnd, tdefDiscards) = + member b.AddTypeDef(tdef: ILTypeDef, eliminateIfEmpty, addAtEnd, tdefDiscards, m: range) = let idx = if addAtEnd then Interlocked.Decrement(&countDown) else Interlocked.Increment(&countUp) - let newVal = idx, (TypeDefBuilder(tdef, tdefDiscards), eliminateIfEmpty) + let sortKey = + if addAtEnd then + // addAtEnd=true falls into two buckets: + // * Sequential-end (m.FileIndex > 0): per-file StartupCode + user + // modules, added during the sequential GenImplFile walk. Replicate + // OLD Interlocked.Decrement-then-sort-ASC by sorting on idx so + // later-inserted types come earlier (matches main's order so the + // test framework's Array.last .fsx-entry-point heuristic in + // CompilerAssert.fs:362 keeps finding the script's $Script$fsx type). + // * Parallel-shared (m = range0): PrivateImplementationDetails, + // anon-record carriers, T_Bytes raw-data types — added + // eagerly at GenerateCode entry or racily during parallel body emit. + // idx is racy under parallel emit; sort on tdef.Name instead. + // Names are deterministic via PrimeStableNamesForCodegen pre- + // population of primedRawTypeCounter/AnonTypeGenerationTable. + // Bucket 0 (sequential end) sorts before bucket 1 (parallel shared). + if m.FileIndex = 0 then + struct (true, 1, 0, 0, 0, 0, tdef.Name) + else + struct (true, 0, 0, 0, 0, idx, tdef.Name) + else + // User-declared types: source-position ASC. idx is a final tiebreaker + // for sites that legitimately share an exact range (rare). + struct (false, 0, m.FileIndex, m.StartLine, m.StartColumn, idx, tdef.Name) - tdefs.AddOrUpdate(tdef.Name, [ newVal ], (fun key oldList -> newVal :: oldList)) + let newVal = sortKey, (TypeDefBuilder(tdef, tdefDiscards), eliminateIfEmpty) + + tdefs.AddOrUpdate(tdef.Name, [ newVal ], (fun _key oldList -> newVal :: oldList)) |> ignore type AnonTypeGenerationTable() = @@ -2355,7 +2566,7 @@ type AnonTypeGenerationTable() = let ilTypeDef = ilTypeDef.WithSealed(true).WithSerializable(true) - mgbuf.AddTypeDef(ilTypeRef, ilTypeDef, false, true, None) + mgbuf.AddTypeDef(ilTypeRef, ilTypeDef, false, true, None, range0) let extraBindings = [| @@ -2411,13 +2622,27 @@ and AssemblyBuilder(cenv: cenv, anonTypeTable: AnonTypeGenerationTable) as mgbuf StampedDictionary(HashIdentity.Reference) // A memoization table for generating value types for big constant arrays + // + // primedRawTypeCounter is consulted by the factory before falling back to a fresh + // IncrementOnly call. PrimeStableNamesForCodegen populates it in source order so that + // the '@T' counter assigned to each (cloc, size) pair is independent of whether the + // surrounding method body is emitted inline (sequential codegen) or via the deferred + // queue (parallel codegen). The factory still owns AddTypeDef and runs lazily — calling + // GenerateRawDataValueType during priming would fail because the destination host type + // does not exist until GenImplFile creates it. + // See https://github.com/dotnet/fsharp/issues/19732. + let primedRawTypeCounter = + ConcurrentDictionary(HashIdentity.Structural) + let rawDataValueTypeGenerator = MemoizationTable( "rawDataValueTypeGenerator", (fun (cloc, size) -> let unique = - g.CompilerGlobalState.Value.IlxGenNiceNameGenerator.IncrementOnly("@T", cloc.Range) + match primedRawTypeCounter.TryGetValue((cloc, size)) with + | true, c -> c + | _ -> g.CompilerGlobalState.Value.IlxGenNiceNameGenerator.IncrementOnly("@T", cloc.Range) let name = CompilerGeneratedName $"T{unique}_{size}Bytes" // Type names ending ...$T_37Bytes @@ -2428,11 +2653,48 @@ and AssemblyBuilder(cenv: cenv, anonTypeTable: AnonTypeGenerationTable) as mgbuf let vtdef = vtdef.WithAccess(ComputeTypeAccess vtref true taccessInternal cenv.g.realsig) - mgbuf.AddTypeDef(vtref, vtdef, false, true, None) + mgbuf.AddTypeDef(vtref, vtdef, false, true, None, range0) vtspec), keyComparer = HashIdentity.Structural ) + // Stable per-source-location '@field' counter assignment and per-source-range ILFieldSpec + // memoization used by GenConstArray. Populated in source order at codegen entry by + // PrimeStableNamesForCodegen so the field name allocated to each TOp.Bytes / TOp.UInt16s / + // const-array site is independent of whether the surrounding method body is emitted inline + // (sequential codegen) or via the deferred queue (parallel codegen — IlxGen.fs:12516). + // Without this, top-walk emissions vs deferred-walk emissions within the same file's '@field' + // bucket race for the lower IncrementOnly counters and produce different field names across + // --parallelcompilation- and --parallelcompilation+ builds. The fieldSpecByRange cache lets two + // inlined copies of the same TOp.Bytes site share a single static data field (correct: same + // byte data, one field is enough). It is keyed by source range — not by counter — because the + // '@field' counter is per-FileIndex and could otherwise collide across files (e.g. file A's + // counter 1 and file B's counter 1 would alias to the same cached spec from whichever file's + // codegen ran first, silently dropping the second file's field def). + // See https://github.com/dotnet/fsharp/issues/19732. + let primedFieldCounterByRange = + ConcurrentDictionary(HashIdentity.Structural) + + // Counter per (FileIndex, StartLine) for raw-data field names. Each unique (m, bytes) + // pair at a given (file, line) gets a sequential index assigned in source-order encounter. + // Stable across SEQ/PAR because: + // - per-file insertion order is preserved (within-file walks are sequential) + // - the cache below dedupes by (m, bytes), so identical inlines share one slot + let rawDataLineCounters = + ConcurrentDictionary(HashIdentity.Structural) + + let fieldSpecByRange = + ConcurrentDictionary(HashIdentity.Structural) + + // Set of ILTypeRefs that PrimeStableNamesForCodegen has determined will host a static + // raw-data field once GenConstArray runs (whether inline during top-walk or via the + // deferred queue at IlxGen.fs:12516). Consulted by GenModuleBinding's GetCurrentFields + // check at IlxGen.fs:~10940 so that the InitClass-cctor-force is emitted for the same + // set of modules under --parallelcompilation- and --parallelcompilation+. + // See https://github.com/dotnet/fsharp/issues/19732. + let primedRawDataFieldHosts = + ConcurrentDictionary(HashIdentity.Structural) + let mutable explicitEntryPointInfo: ILTypeRef option = None /// static init fields on script modules. @@ -2483,6 +2745,69 @@ and AssemblyBuilder(cenv: cenv, anonTypeTable: AnonTypeGenerationTable) as mgbuf rawDataValueTypeGenerator.Apply((cloc, size)) + /// Pre-allocate the deterministic source-order counter for the (cloc, size) raw-data value type + /// without forcing the underlying rawDataValueTypeGenerator factory (which would prematurely + /// call AddTypeDef before the host type exists). Called from PrimeStableNamesForCodegen. + member _.PrimeRawDataValueTypeCounter(cloc: CompileLocation, size: int) = + let cloc = + if cenv.options.isInteractive then + CompLocForPrivateImplementationDetails cloc + else + cloc + + primedRawTypeCounter.GetOrAdd( + (cloc, size), + (fun _ -> g.CompilerGlobalState.Value.IlxGenNiceNameGenerator.IncrementOnly("@T", cloc.Range)) + ) + |> ignore + + /// Returns the stable '@field' counter for an array-literal expression at source range 'm'. + /// Source-order pre-population by PrimeStableNamesForCodegen guarantees that this returns + /// the same counter regardless of whether the surrounding method body is emitted inline + /// (sequential codegen) or via the deferred queue (parallel codegen). Falls back to a + /// direct IncrementOnly if priming did not cover the site (defensive only). + member _.GetOrAssignFieldCounter(m: range) = + let key = struct (m.FileIndex, m.StartLine, m.StartColumn, m.EndLine, m.EndColumn) + primedFieldCounterByRange.GetOrAdd(key, (fun _ -> g.CompilerGlobalState.Value.IlxGenNiceNameGenerator.IncrementOnly("@field", m))) + + /// Returns the static-field spec for an array-literal site at 'm' with the given byte data. + /// Two emissions of the SAME byte data at the SAME source range (e.g. two inlined copies of + /// the same TOp.Bytes literal) share a single static data field. Different byte data at the + /// same source range (e.g. distinct generic instantiations of an inline quotation that get + /// pickled differently) get DISTINCT fields — without this, the second instantiation would + /// reuse the first instantiation's pickled bytes and the runtime would call the wrong methods + /// (e.g. 'sin x' quotation evaluating as 'abs x'). See + /// https://github.com/dotnet/fsharp/issues/19928. + member this.GetOrCreateRawDataFieldSpec(m: range, bytes: byte[], makeFspec: string -> ILFieldSpec) = + // Distinguish entries by the bytes themselves so different byte data at the same source + // range gets distinct fields. The field NAME suffix is derived deterministically from + // (m.StartLine, per-line counter) so it's stable across SEQ vs PAR codegen — both see + // the same (m, bytes) tuples in source order and produce the same name. + let bytesKey = System.Convert.ToBase64String(bytes) + + let key = + struct (m.FileIndex, m.StartLine, m.StartColumn, m.EndLine, m.EndColumn, bytesKey) + + fieldSpecByRange.GetOrAdd( + key, + (fun _ -> + let counterCell = + rawDataLineCounters.GetOrAdd(struct (m.FileIndex, m.StartLine), (fun _ -> ref 0)) + + let idx = System.Threading.Interlocked.Increment(counterCell) + let nameSuffix = sprintf "%d_%d" m.StartLine idx + makeFspec nameSuffix) + ) + + /// Records that an ILTypeRef will host a static raw-data field once codegen runs. + /// Called from PrimeStableNamesForCodegen for every TOp.Bytes / TOp.UInt16s site in source order. + member _.MarkRawDataFieldHost(tref: ILTypeRef) = + primedRawDataFieldHosts.TryAdd(tref, ()) |> ignore + + /// True if PrimeStableNamesForCodegen recorded this ILTypeRef as a future raw-data field host. + member _.WillHaveRawDataFields(tref: ILTypeRef) = + primedRawDataFieldHosts.ContainsKey(tref) + member _.GenerateAnonType(genToStringMethod, anonInfo: AnonRecdTypeInfo) = anonTypeTable.GenerateAnonType(cenv, mgbuf, genToStringMethod, anonInfo) @@ -2492,8 +2817,8 @@ and AssemblyBuilder(cenv: cenv, anonTypeTable: AnonTypeGenerationTable) as mgbuf member _.GrabExtraBindingsToGenerate() = anonTypeTable.GrabExtraBindingsToGenerate() - member _.AddTypeDef(tref: ILTypeRef, tdef, eliminateIfEmpty, addAtEnd, tdefDiscards) = - gtdefs.FindNestedTypeDefsBuilder(tref.Enclosing).AddTypeDef(tdef, eliminateIfEmpty, addAtEnd, tdefDiscards) + member _.AddTypeDef(tref: ILTypeRef, tdef, eliminateIfEmpty, addAtEnd, tdefDiscards, m: range) = + gtdefs.FindNestedTypeDefsBuilder(tref.Enclosing).AddTypeDef(tdef, eliminateIfEmpty, addAtEnd, tdefDiscards, m) member _.FindNestedTypeDefBuilder(tref: ILTypeRef) = gtdefs.FindNestedTypeDefBuilder(tref) @@ -2873,7 +3198,7 @@ module CG = let GenString cenv cgbuf s = CG.EmitInstr cgbuf (pop 0) (Push [ cenv.g.ilg.typ_String ]) (I_ldstr s) -let GenConstArray cenv (cgbuf: CodeGenBuffer) eenv ilElementType (data: 'a[]) (write: ByteBuffer -> 'a -> unit) = +let GenConstArray cenv (cgbuf: CodeGenBuffer) eenv ilElementType (data: 'a[]) (write: ByteBuffer -> 'a -> unit) (m: range) = let g = cenv.g use buf = ByteBuffer.Create data.Length data |> Array.iter (write buf) @@ -2883,23 +3208,26 @@ let GenConstArray cenv (cgbuf: CodeGenBuffer) eenv ilElementType (data: 'a[]) (w if data.Length = 0 then CG.EmitInstrs cgbuf (pop 0) (Push [ ilArrayType ]) [ mkLdcInt32 0; I_newarr(ILArrayShape.SingleDimensional, ilElementType) ] else - let vtspec = cgbuf.mgbuf.GenerateRawDataValueType(eenv.cloc, bytes.Length) - - let unique = - g.CompilerGlobalState.Value.IlxGenNiceNameGenerator.IncrementOnly("@field", eenv.cloc.Range) - - let ilFieldName = CompilerGeneratedName $"field{unique}" - let fty = ILType.Value vtspec + let fspec = + cgbuf.mgbuf.GetOrCreateRawDataFieldSpec( + m, + bytes, + fun unique -> + let vtspec = cgbuf.mgbuf.GenerateRawDataValueType(eenv.cloc, bytes.Length) + let ilFieldName = CompilerGeneratedName $"field{unique}" + let fty = ILType.Value vtspec - let ilFieldDef = - mkILStaticField (ilFieldName, fty, None, Some bytes, ILMemberAccess.Assembly) + let ilFieldDef = + mkILStaticField (ilFieldName, fty, None, Some bytes, ILMemberAccess.Assembly) - let ilFieldDef = - ilFieldDef.With(customAttrs = mkILCustomAttrs [ g.DebuggerBrowsableNeverAttribute ]) + let ilFieldDef = + ilFieldDef.With(customAttrs = mkILCustomAttrs [ g.DebuggerBrowsableNeverAttribute ]) - let fspec = mkILFieldSpecInTy (mkILTyForCompLoc eenv.cloc, ilFieldName, fty) - CountStaticFieldDef() - cgbuf.mgbuf.AddFieldDef(fspec.DeclaringTypeRef, ilFieldDef) + let fspec = mkILFieldSpecInTy (mkILTyForCompLoc eenv.cloc, ilFieldName, fty) + CountStaticFieldDef() + cgbuf.mgbuf.AddFieldDef(fspec.DeclaringTypeRef, ilFieldDef) + fspec + ) CG.EmitInstrs cgbuf @@ -3255,13 +3583,13 @@ and GenExprAux (cenv: cenv) (cgbuf: CodeGenBuffer) eenv expr (sequel: sequel) = | TOp.Array, elems, [ elemTy ] -> GenNewArray cenv cgbuf eenv (elems, elemTy, m) sequel | TOp.Bytes bytes, [], [] -> if cenv.options.emitConstantArraysUsingStaticDataBlobs then - GenConstArray cenv cgbuf eenv g.ilg.typ_Byte bytes (fun buf b -> buf.EmitByte b) + GenConstArray cenv cgbuf eenv g.ilg.typ_Byte bytes (fun buf b -> buf.EmitByte b) m GenSequel cenv eenv.cloc cgbuf sequel else GenNewArraySimple cenv cgbuf eenv (List.ofArray (Array.map (mkByte g m) bytes), g.byte_ty, m) sequel | TOp.UInt16s arr, [], [] -> if cenv.options.emitConstantArraysUsingStaticDataBlobs then - GenConstArray cenv cgbuf eenv g.ilg.typ_UInt16 arr (fun buf b -> buf.EmitUInt16 b) + GenConstArray cenv cgbuf eenv g.ilg.typ_UInt16 arr (fun buf b -> buf.EmitUInt16 b) m GenSequel cenv eenv.cloc cgbuf sequel else GenNewArraySimple cenv cgbuf eenv (List.ofArray (Array.map (mkUInt16 g m) arr), g.uint16_ty, m) sequel @@ -3975,10 +4303,17 @@ and GenNewArray cenv cgbuf eenv (elems: Expr list, elemTy, m) sequel = then let ilElemTy = GenType cenv m eenv.tyenv elemTy - GenConstArray cenv cgbuf eenv ilElemTy elemsArray (fun buf -> - function - | Expr.Const(c, _, _) -> write buf c - | _ -> failwith "unreachable") + GenConstArray + cenv + cgbuf + eenv + ilElemTy + elemsArray + (fun buf -> + function + | Expr.Const(c, _, _) -> write buf c + | _ -> failwith "unreachable") + m GenSequel cenv eenv.cloc cgbuf sequel @@ -6547,7 +6882,7 @@ and GenStructStateMachine cenv cgbuf eenvouter (res: LoweredStateMachine) sequel .WithEncoding(ILDefaultPInvokeEncoding.Auto) .WithInitSemantics(ILTypeInit.BeforeField) - cgbuf.mgbuf.AddTypeDef(ilCloTypeRef, cloTypeDef, false, false, None) + cgbuf.mgbuf.AddTypeDef(ilCloTypeRef, cloTypeDef, false, false, None, m) CountClosure() @@ -6702,7 +7037,7 @@ and GenObjectExpr cenv cgbuf eenvouter objExpr (baseType, baseValOpt, basecall, Some cloinfo.cloSpec) for cloTypeDef in cloTypeDefs do - cgbuf.mgbuf.AddTypeDef(ilCloTypeRef, cloTypeDef, false, false, None) + cgbuf.mgbuf.AddTypeDef(ilCloTypeRef, cloTypeDef, false, false, None, m) CountClosure() GenWitnessArgsFromWitnessInfos cenv cgbuf eenvouter m cloinfo.cloWitnessInfos @@ -6900,7 +7235,7 @@ and GenSequenceExpr Some ilxCloSpec) for cloTypeDef in cloTypeDefs do - cgbuf.mgbuf.AddTypeDef(ilCloTypeRef, cloTypeDef, false, false, None) + cgbuf.mgbuf.AddTypeDef(ilCloTypeRef, cloTypeDef, false, false, None, m) CountClosure() @@ -7130,7 +7465,7 @@ and GenLambdaClosure cenv (cgbuf: CodeGenBuffer) eenv isLocalTypeFunc thisVars e CountClosure() for cloTypeDef in cloTypeDefs do - cgbuf.mgbuf.AddTypeDef(ilCloTypeRef, cloTypeDef, false, false, None) + cgbuf.mgbuf.AddTypeDef(ilCloTypeRef, cloTypeDef, false, false, None, m) cloinfo, m @@ -7210,7 +7545,24 @@ and GetIlxClosureFreeVars cenv m (thisVars: ValRef list) boxity eenv takenNames let cloName = // Ensure that we have an g.CompilerGlobalState assert (g.CompilerGlobalState |> Option.isSome) - g.CompilerGlobalState.Value.StableNameGenerator.GetUniqueCompilerGeneratedName(basenameSafeForUseAsTypename, expr.Range, uniq) + + // Route in-file closures through StableNameGenerator (legacy `basicName@[-N]`) + // for baseline stability. PrimeStableNamesForCodegen pins those names in source + // order so the suffix assignments are deterministic under parallel codegen. + // Cross-file inlined closures (`expr.Range.FileIndex != consumer file index`) are + // disambiguated through PerFileClosureNameScope with an `F` marker + // — these would otherwise race on the shared StableNameGenerator bucket counter when + // multiple parallel consumer files inline the same source range. + let consumerFileIndex = + eenv.closureNameScope + |> Option.map (fun s -> s.ConsumerFileIndex) + |> Option.defaultValue 0 + + if expr.Range.FileIndex = consumerFileIndex || eenv.closureNameScope.IsNone then + let stableGen = g.CompilerGlobalState.Value.StableNameGenerator + stableGen.GetUniqueCompilerGeneratedName(basenameSafeForUseAsTypename, expr.Range, uniq) + else + eenv.closureNameScope.Value.EmitClosureName(basenameSafeForUseAsTypename, expr.Range, uniq) let ilCloTypeRef = NestedTypeRefForCompLoc eenv.cloc cloName @@ -7528,7 +7880,7 @@ and GenDelegateExpr cenv cgbuf eenvouter expr (TObjExprMethod(slotsig, _attribs, None) for cloTypeDef in cloTypeDefs do - cgbuf.mgbuf.AddTypeDef(ilDelegeeTypeRef, cloTypeDef, false, false, None) + cgbuf.mgbuf.AddTypeDef(ilDelegeeTypeRef, cloTypeDef, false, false, None, m) CountClosure() @@ -10615,7 +10967,7 @@ and GenTypeDefForCompLoc initTrigger) let tdef = tdef.WithSealed(true).WithAbstract(true) - mgbuf.AddTypeDef(tref, tdef, eliminateIfEmpty, addAtEnd, None) + mgbuf.AddTypeDef(tref, tdef, eliminateIfEmpty, addAtEnd, None, cloc.Range) and GenImplFileContents cenv cgbuf qname lazyInitInfo eenv mty def = // REVIEW: the scopeMarks are used for any shadow locals we create for the module bindings @@ -10809,11 +11161,18 @@ and GenModuleBinding cenv (cgbuf: CodeGenBuffer) (qname: QualifiedNameOfFile) la GenModuleOrNamespaceContents cenv cgbuf qname lazyInitInfo eenvinner mdef |> ignore - // If the module has a .cctor for some mutable fields, we need to ensure that when - // those fields are "touched" the InitClass .cctor is forced. The InitClass .cctor will - // then fill in the value of the mutable fields. - if not (cgbuf.mgbuf.GetCurrentFields(tref) |> Seq.isEmpty) then - GenForceWholeFileInitializationAsPartOfCCtor cenv cgbuf.mgbuf lazyInitInfo tref eenv.imports mspec.Range + // Always emit the cctor force for every module, regardless of whether the module + // currently has any static fields. Under --parallelcompilation+ the field defs for + // raw-data static blobs created by GenConstArray (IlxGen.fs:~2870) inside + // member-method bodies are not added until the deferred iter at IlxGen.fs:12516 runs + // — which is long after this check. The original predicate + // `not (GetCurrentFields(tref) |> Seq.isEmpty)` saw an empty field set under parallel + // codegen and silently omitted the cctor force; the sequential codegen saw the field + // immediately and emitted it. Unconditionally calling + // GenForceWholeFileInitializationAsPartOfCCtor restores byte-identical output between + // the two modes for the cost of a small empty .cctor stub on modules that legitimately + // have no static state. See https://github.com/dotnet/fsharp/issues/19732. + GenForceWholeFileInitializationAsPartOfCCtor cenv cgbuf.mgbuf lazyInitInfo tref eenv.imports mspec.Range /// Generate the namespace fragments in a single file and GenImplFile cenv (mgbuf: AssemblyBuilder) mainInfoOpt eenv (implFile: CheckedImplFileAfterOptimization) = @@ -10834,6 +11193,7 @@ and GenImplFile cenv (mgbuf: AssemblyBuilder) mainInfoOpt eenv (implFile: Checke TopImplQualifiedName = qname.Text Range = m } + closureNameScope = Some(PerFileClosureNameScope(m.FileIndex)) } cenv.optimizeDuringCodeGen <- optimizeDuringCodeGen @@ -12227,7 +12587,7 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon: Tycon) : ILTypeRef option let tdef = tdef.WithHasSecurity(not (List.isEmpty securityAttrs)) let tdef = tdef.With(securityDecls = secDecls) - mgbuf.AddTypeDef(tref, tdef, false, false, tdefDiscards) + mgbuf.AddTypeDef(tref, tdef, false, false, tdefDiscards, m) // If a non-generic type is written with "static let" and "static do" (i.e. it has a ".cctor") // then the code for the .cctor is placed into .cctor for the backing static class for the file. @@ -12515,17 +12875,330 @@ and GenExnDef cenv mgbuf eenv m (exnc: Tycon) : ILTypeRef option = ) let tdef = tdef.WithSerializable(true) - mgbuf.AddTypeDef(tref, tdef, false, false, None) + mgbuf.AddTypeDef(tref, tdef, false, false, None, m) Some tref +/// Source-order priming pass that runs once at the entry to CodegenAssembly, before +/// any IlxGen file walk or deferred-method emission. It pre-populates the compiler's +/// shared name caches so that names allocated later during the (parallel or sequential) +/// codegen phase are stable in source order regardless of force/emission order: +/// +/// 1. Top-level Val.CompiledName — Val.CompiledName routes through +/// StableNiceNameGenerator for every Val matching the predicate below. Pinning the +/// suffix in source order makes ComputeStorageForValWithValReprInfo (called from +/// AllocValForBind during parallel method-body emit) deterministic. +/// +/// 2. Closure type names (Expr.Lambda / Expr.TyLambda / Expr.Obj) — GetIlxClosureFreeVars +/// (IlxGen.fs:~7140) calls StableNameGenerator.GetUniqueCompilerGeneratedName with a +/// basename derived from the nearest non-compiler-generated Val on eenv.letBoundVars. +/// The numeric '-N' suffix is allocated by NiceNameGenerator.FreshCompilerGeneratedNameOfBasicName +/// which uses Interlocked.Increment on a per-(basicName, FileIndex) bucket. The bucket +/// is shared across files for any basicName that recurs (e.g. '_fsyacc_reductions', +/// 'abstractLazyModulInfo'). Pinning the suffix here in source order, with a +/// letBoundVars stack mirroring IlxGen's GenBindingAfterDebugPoint/GenLetRecBindings +/// push semantics, gives every closure site a deterministic name regardless of whether +/// the surrounding method body is emitted inline (sequential codegen) or via the +/// deferred queue at IlxGen.fs:12516 (parallel codegen). +/// +/// 3. Raw-data value types (T{N}_{size}Bytes) — GenConstArray (IlxGen.fs:~2850) calls +/// mgbuf.GenerateRawDataValueType(cloc, size) which goes through a memoization keyed +/// by (cloc, size). The factory calls IncrementOnly("@T", cloc.Range) so first-seen +/// (cloc, size) wins the lower counters. Priming the memoization in source order +/// populates the cache deterministically. +/// +/// 4. '@field' counter (field{N} static-data fields) — GenConstArray uses +/// mgbuf.GetOrAssignFieldCounter(m) which memoizes per source range. Walking every +/// array-literal site in source order assigns counters in a deterministic order. +/// +/// Anonymous record types are *not* primed here because they are emitted at the start of +/// each GenImplFile (IlxGen.fs:~10761) in deterministic Stamp order, ahead of any deferred +/// method body — that ordering is already independent of --parallelcompilation. +/// +/// Over-priming (touching a Lambda/Obj that IlxGen eventually does not lower to a closure +/// type) is harmless: the StableNameGenerator's Lazy is forced once on insertion +/// and any later GetUniqueCompilerGeneratedName call with the same (basename, uniq) returns +/// the cached value. Under-priming would leave the race in place, so the walker is biased +/// towards visiting every site IlxGen might consume. +/// +/// See https://github.com/dotnet/fsharp/issues/19732 and PR #19810. +let PrimeStableNamesForCodegen (cenv: cenv) (mgbuf: AssemblyBuilder) (implFiles: CheckedImplFileAfterOptimization list) = + let g = cenv.g + + match g.CompilerGlobalState with + | None -> () + | Some cgs -> + + let stableNameGen = cgs.StableNameGenerator + + let primeVal (v: Val) = + // Mirrors the predicate in Val.CompiledName that routes through StableNiceNameGenerator. + if + v.IsCompiledAsTopLevel + && not v.IsMember + && (v.IsCompilerGenerated || not v.IsMemberOrModuleBinding) + then + v.CompiledName g.CompilerGlobalState |> ignore + + let _primeClosureName (letBoundVars: ValRef list) (uniq: int64) (m: range) = + // Replicates the basename-selection in GetIlxClosureFreeVars (IlxGen.fs:~7132). + // Currently UNUSED — see Expr.Lambda/TyLambda/Obj cases below for the rationale. + // Kept here as a reference for the basename-selection logic if priming is + // reintroduced after state-machine lowering moves earlier. + let boundvar = + letBoundVars |> List.tryFind (fun v -> not v.Deref.IsCompilerGenerated) + + let basename = + match boundvar with + | Some v -> v.Deref.CompiledName g.CompilerGlobalState + | None -> "clo" + + let basenameSafeForUseAsTypename = CleanUpGeneratedTypeName basename + + stableNameGen.GetUniqueCompilerGeneratedName(basenameSafeForUseAsTypename, m, uniq) + |> ignore + + // GenConstArray re-routes cloc through CompLocForPrivateImplementationDetails when + // running under FSI; PrimeRawDataValueTypeCounter performs the same rewrite internally, + // so the walker only needs to track the un-rewritten cloc. + let stackGuard = StackGuard("PrimeStableNamesForCodegen") + + let rec walkExpr (letBoundVars: ValRef list) (cloc: CompileLocation) (expr: Expr) = + stackGuard.Guard + <| fun () -> + match stripDebugPoints expr with + | Expr.Const _ + | Expr.Val _ + | Expr.WitnessArg _ -> () + + | Expr.Lambda(_, _, _, _, body, _, _) -> + // Don't prime closure names — state-machine lowering and other late + // transforms create/remove Lambdas after this pass, so priming would + // register phantom (basename, uniq) cache entries that push real codegen + // closures to suffix '-N'. Just recurse to keep walking the AST for raw + // data sites (TOp.Bytes/UInt16s) which still need priming. + walkExpr letBoundVars cloc body + + | Expr.TyLambda(_, _, body, _, _) -> walkExpr letBoundVars cloc body + + | Expr.Obj(_, _, _, basecall, overrides, iimpls, _) -> + walkExpr letBoundVars cloc basecall + + for TObjExprMethod(_, _, _, _, e, _) in overrides do + walkExpr letBoundVars cloc e + + for _, ims in iimpls do + for TObjExprMethod(_, _, _, _, e, _) in ims do + walkExpr letBoundVars cloc e + + | Expr.Let(TBind(v, rhs, _), body, _, _) -> + // Mirror GenBindingAfterDebugPoint (IlxGen.fs:~8643-8654): both the RHS AND + // the body see the let-bound var on letBoundVars — the binding mutates eenv + // and all subsequent generation (including the body) uses the updated eenv. + // + // Also prime the Val's CompiledName in source order. Let-bound Vals that + // were lifted to top-level methods by TLR/Detuple (IsCompiledAsTopLevel + // && not IsMemberOrModuleBinding) route through StableNiceNameGenerator + // and race for the per-(basicName, FileIndex) bucket counter under + // parallel codegen. Priming them here in source order pins the suffix + // before any deferred method-body codegen can race. + // See https://github.com/dotnet/fsharp/issues/19928. + // + // Restrict priming to Vals that are clearly TLR fHat names (already carry + // the compiler-generated '@' marker). This avoids registering names for + // user-written compiler-generated locals that the codegen path doesn't + // actually route through StableNiceNameGenerator, which would otherwise + // shift cache occupancy for the bucket counter. + if IsCompilerGeneratedName v.LogicalName then + primeVal v + + walkExpr (mkLocalValRef v :: letBoundVars) cloc rhs + walkExpr (mkLocalValRef v :: letBoundVars) cloc body + + | Expr.LetRec(binds, body, _, _) -> + // Mirror GenLetRecBindings: all rec siblings' Vars are added to letBoundVars + // for BOTH the RHSs and the body. The original "RHS sees only its own bound + // var" comment was incorrect — IlxGen's GenLetRecBindings adds every rec + // sibling's val before generating any of their bodies. + for TBind(v, _, _) in binds do + if IsCompilerGeneratedName v.LogicalName then + primeVal v + + let lbvs = + (binds |> List.map (fun (TBind(v, _, _)) -> mkLocalValRef v)) @ letBoundVars + + for TBind(_, rhs, _) in binds do + walkExpr lbvs cloc rhs + + walkExpr lbvs cloc body + + | Expr.Op(op, _, args, m) -> + match op with + | TOp.Bytes bytes when cenv.options.emitConstantArraysUsingStaticDataBlobs -> + mgbuf.PrimeRawDataValueTypeCounter(cloc, bytes.Length) + mgbuf.GetOrAssignFieldCounter(m) |> ignore + mgbuf.MarkRawDataFieldHost(TypeRefForCompLoc cloc) + | TOp.UInt16s arr when cenv.options.emitConstantArraysUsingStaticDataBlobs -> + mgbuf.PrimeRawDataValueTypeCounter(cloc, arr.Length * 2) + mgbuf.GetOrAssignFieldCounter(m) |> ignore + mgbuf.MarkRawDataFieldHost(TypeRefForCompLoc cloc) + | _ -> () + + for a in args do + walkExpr letBoundVars cloc a + + | Expr.App(f, _, _, args, _) -> + walkExpr letBoundVars cloc f + + for a in args do + walkExpr letBoundVars cloc a + + | Expr.Sequential(e1, e2, _, _) -> + walkExpr letBoundVars cloc e1 + walkExpr letBoundVars cloc e2 + + | Expr.Match(_, _, dt, targets, _, _) -> + walkDtree letBoundVars cloc dt + + for TTarget(_, body, _) in targets do + walkExpr letBoundVars cloc body + + | Expr.StaticOptimization(_, e2, e3, _) -> + walkExpr letBoundVars cloc e2 + walkExpr letBoundVars cloc e3 + + | Expr.TyChoose(_, body, _) -> walkExpr letBoundVars cloc body + + | Expr.Quote(e, _, _, _, _) -> + // Quotations are lowered by GenQuotation (IlxGen.fs:~5754) to a TOp.Bytes + // expression whose pickled AST is materialized only at codegen time, so the + // TOp.Bytes site is not visible to this AST walker. Mark the enclosing cloc as + // a raw-data field host to make the line-10940 check consistent across + // --parallelcompilation- and --parallelcompilation+ builds. + if cenv.options.emitConstantArraysUsingStaticDataBlobs then + mgbuf.MarkRawDataFieldHost(TypeRefForCompLoc cloc) + + walkExpr letBoundVars cloc e + + | Expr.Link r -> walkExpr letBoundVars cloc r.Value + + | Expr.DebugPoint(_, inner) -> walkExpr letBoundVars cloc inner + + and walkDtree (letBoundVars: ValRef list) cloc dt = + match dt with + | TDBind(TBind(v, rhs, _), rest) -> + walkExpr (mkLocalValRef v :: letBoundVars) cloc rhs + walkDtree letBoundVars cloc rest + | TDSuccess(args, _) -> + for a in args do + walkExpr letBoundVars cloc a + | TDSwitch(test, cases, dflt, _) -> + walkExpr letBoundVars cloc test + + for TCase(_, sub) in cases do + walkDtree letBoundVars cloc sub + + match dflt with + | Some d -> walkDtree letBoundVars cloc d + | None -> () + + let walkTopBindRhs (v: Val) (rhs: Expr) (cloc: CompileLocation) = + // For Vals compiled as top-level methods, the outer TyLambda/Lambda(s) of the RHS + // are emitted as method type-args / value-args by GenMethodForBinding, NOT closure- + // converted via GetIlxClosureFreeVars. Skip them in priming so we don't register a + // phantom (v.CompiledName, range, uniq) entry that pushes the user's real nested + // closures to suffix '-N'. + // + // We can't use stripTopLambda directly — it errors on Lambdas carrying + // ctorThisValOpt/baseValOpt (constructors/instance methods). Inline a safe variant + // that just walks past plain Lambda/TyLambda nesting without raising. + let rec stripOuterTopLambdas (e: Expr) = + match e with + | Expr.TyLambda(_, _, body, _, _) -> stripOuterTopLambdas body + | Expr.Lambda(_, ctorThisValOpt, baseValOpt, _, body, _, _) when Option.isNone ctorThisValOpt && Option.isNone baseValOpt -> + stripOuterTopLambdas body + | _ -> e + + if v.IsCompiledAsTopLevel then + walkExpr [ mkLocalValRef v ] cloc (stripOuterTopLambdas rhs) + else + walkExpr [ mkLocalValRef v ] cloc rhs + + let rec walkModuleContents (cloc: CompileLocation) (x: ModuleOrNamespaceContents) = + match x with + | TMDefRec(_, _, _, mbinds, _) -> + for mb in mbinds do + walkModuleBinding cloc mb + | TMDefLet(TBind(v, rhs, _), _) -> + primeVal v + walkTopBindRhs v rhs cloc + | TMDefDo(e, _) -> walkExpr [] cloc e + | TMDefOpens _ -> () + | TMDefs defs -> + for d in defs do + walkModuleContents cloc d + + and walkModuleBinding (cloc: CompileLocation) (mb: ModuleOrNamespaceBinding) = + match mb with + | ModuleOrNamespaceBinding.Binding(TBind(v, rhs, _)) -> + primeVal v + walkTopBindRhs v rhs cloc + | ModuleOrNamespaceBinding.Module(mspec, mdef) -> + let cloc' = + if mspec.IsNamespace then + cloc + else + CompLocForFixedModule cloc.QualifiedNameOfFile cloc.TopImplQualifiedName mspec + + walkModuleContents cloc' mdef + + // Initial cloc derivation mirrors GenImplFile (IlxGen.fs:~10764): the file's contents are + // walked under cloc = CompLocForInitClass({fragmentCloc with TopImplQualifiedName = qname.Text; + // Range = qname.Range}). Nested module contents are walked under a freshly computed cloc. + let fragCloc = CompLocForFragment cenv.options.fragName cenv.viewCcu + + for implFile in implFiles do + let (CheckedImplFile(qname, _, contents, _, _, _, _)) = implFile.ImplFile + + let fileCloc = + { fragCloc with + TopImplQualifiedName = qname.Text + Range = qname.Range + } + + let initCloc = CompLocForInitClass fileCloc + walkModuleContents initCloc contents + +/// Post-IlxGen pass that re-orders the members of every emitted ILTypeDef into a deterministic +/// alphabetical order. IlxGen adds method/field/event/property/nested-type defs to the assembly +/// builder in non-deterministic order under parallel codegen — the builder's internal lists +/// reflect whichever thread emitted first. Sorting them after IlxGen finishes (but before +/// ILBinaryWriter consumes the module) makes the #String/#Blob/#TypeDef/#MethodDef metadata +/// streams byte-identical across runs without changing IL semantics, since tokens are assigned +/// by the writer based on input order and references inside the same assembly are re-resolved +/// against that order. See https://github.com/dotnet/fsharp/issues/19732. let CodegenAssembly cenv eenv mgbuf implFiles = match List.tryFrontAndBack implFiles with | None -> () | Some(firstImplFiles, lastImplFile) -> + // Prime the StableNiceNameGenerator's niceNames cache by visiting every top-level Val + // in source-deterministic order (files in source order from ParseAndCheckInputs, then + // module-binding-list order which is single-threaded per file in typecheck and TLR + // pass4_rewrite). This pins the suffix assignment for every Val whose CompiledName routes + // through StableNiceNameGenerator, so the later parallel codegen calls hit the cache + // and return deterministic names regardless of thread scheduling. + // See https://github.com/dotnet/fsharp/issues/19732. + PrimeStableNamesForCodegen cenv mgbuf implFiles + let eenv = List.fold (GenImplFile cenv mgbuf None) eenv firstImplFiles let eenv = GenImplFile cenv mgbuf cenv.options.mainMethodInfo eenv lastImplFile + // Restore parallel body emission across files. PrimeStableNamesForCodegen has populated + // every (basename, uniq) cache entry deterministically and the deterministic ordering + // keys threaded through AddTypeDef / AddMethodDef ensure within-type and cross-type + // emit order is independent of thread scheduling. Within a file, the inner Array.iter + // stays sequential so AllocVal / TypeDefsBuilder mutation inside a single file remains + // single-threaded. See https://github.com/dotnet/fsharp/issues/19732. eenv.delayedFileGenReverse |> Array.ofList |> Array.rev @@ -12592,6 +13265,7 @@ let GetEmptyIlxGenEnv (g: TcGlobals) ccu = imports = None delayCodeGen = true delayedFileGenReverse = [] + closureNameScope = None intraAssemblyInfo = IlxGenIntraAssemblyInfo.Create() realsig = g.realsig initClassFieldSpec = None diff --git a/src/Compiler/Driver/OptimizeInputs.fs b/src/Compiler/Driver/OptimizeInputs.fs index 78bca4bf979..c8a984fe06e 100644 --- a/src/Compiler/Driver/OptimizeInputs.fs +++ b/src/Compiler/Driver/OptimizeInputs.fs @@ -437,6 +437,14 @@ let ApplyAllOptimizations if tcConfig.extraOptimizationIterations > 0 then addPhase "ExtraLoop" extraLoop + // A per-file naming scope is created at this per-file optimization boundary so that + // compiler-generated names from the Detuple and TLR passes are bucketed by the consumer + // file currently being optimized, rather than by the (possibly inlined) source range of + // each value. This keeps those names deterministic under parallel optimization. + // See https://github.com/dotnet/fsharp/issues/19732. + let mkFileNamingScope (file: CheckedImplFile) = + tcGlobals.CompilerGlobalState.Value.NewFileScope(file.QualifiedNameOfFile.Range) + let detuple ({ File = file @@ -444,7 +452,8 @@ let ApplyAllOptimizations PrevFile = _prevFile }: PhaseInputs) : PhaseRes = - let file = file |> Detuple.DetupleImplFile ccu tcGlobals + let scope = mkFileNamingScope file + let file = file |> Detuple.DetupleImplFile scope ccu tcGlobals file, prevPhase if tcConfig.doDetuple then @@ -457,9 +466,11 @@ let ApplyAllOptimizations PrevFile = _prevFile }: PhaseInputs) : PhaseRes = + let scope = mkFileNamingScope file + let file = file - |> InnerLambdasToTopLevelFuncs.MakeTopLevelRepresentationDecisions ccu tcGlobals + |> InnerLambdasToTopLevelFuncs.MakeTopLevelRepresentationDecisions scope ccu tcGlobals file, prevPhase @@ -511,8 +522,12 @@ let ApplyAllOptimizations let results, optEnvFirstLoop = match tcConfig.optSettings.processingMode with - // Parallel optimization breaks determinism - turn it off in deterministic builds. | Optimizer.OptimizationProcessingMode.Parallel -> + // Determinism under Parallel mode relies on the per-pass sorts in + // DetupleArgs.determineTransforms and InnerLambdasToTopLevelFuncs.CreateNewValuesForTLR + // (via valSourceOrderKey). Any new pass calling NiceNameGenerator from a + // parallel optimizer phase must sort its Val collection the same way. + // See https://github.com/dotnet/fsharp/issues/19732. let results, optEnvFirstPhase = ParallelOptimization.optimizeFilesInParallel optEnv phases implFiles diff --git a/src/Compiler/Driver/ParseAndCheckInputs.fs b/src/Compiler/Driver/ParseAndCheckInputs.fs index 6c53e11ab14..399656d9ada 100644 --- a/src/Compiler/Driver/ParseAndCheckInputs.fs +++ b/src/Compiler/Driver/ParseAndCheckInputs.fs @@ -736,6 +736,13 @@ let ParseInputFilesInParallel (tcConfig: TcConfig, lexResourceManager, sourceFil for fileName in sourceFiles do checkInputFile tcConfig fileName + // Pre-register FileIndex values in source-file order. Without this, parallel + // parsing races for indices via fileIndexOfFile -> FileIndexTable lock, + // producing non-deterministic FileIndex assignments that leak into IL + // (via debug info, NiceNameGenerator keys, and sort orders downstream). + for fileName in sourceFiles do + FileIndex.fileIndexOfFile fileName |> ignore + let sourceFiles = List.zip sourceFiles isLastCompiland UseMultipleDiagnosticLoggers (sourceFiles, delayLogger, None) (fun sourceFilesWithDelayLoggers -> diff --git a/src/Compiler/Optimize/DetupleArgs.fs b/src/Compiler/Optimize/DetupleArgs.fs index b0dd2d62835..4155484d379 100644 --- a/src/Compiler/Optimize/DetupleArgs.fs +++ b/src/Compiler/Optimize/DetupleArgs.fs @@ -5,6 +5,7 @@ module internal FSharp.Compiler.Detuple open Internal.Utilities.Collections open Internal.Utilities.Library open FSharp.Compiler.DiagnosticsLogger +open FSharp.Compiler.CompilerGlobalState open FSharp.Compiler.Syntax open FSharp.Compiler.TcGlobals open FSharp.Compiler.Text @@ -496,7 +497,7 @@ type Transform = // transform - mkTransform - decided, create necessary stuff //------------------------------------------------------------------------- -let mkTransform g (f: Val) m tps x1Ntys retTy (callPattern, tyfringes: (TType list * Val list) list) = +let mkTransform (scope: PerFileNamingScope) g (f: Val) m tps x1Ntys retTy (callPattern, tyfringes: (TType list * Val list) list) = // Create formal choices for x1...xp under callPattern let transformedFormals = (callPattern, tyfringes) @@ -547,12 +548,12 @@ let mkTransform g (f: Val) m tps x1Ntys retTy (callPattern, tyfringes: (TType li let fCty = mkLambdaTy g tps argTys retTy let transformedVal = - // Ensure that we have an g.CompilerGlobalState - assert (g.CompilerGlobalState |> Option.isSome) - + // Names are bucketed by the per-file optimization scope (not by f.Range, which may point at + // inlined source from another file) to keep compiler-generated names deterministic under + // parallel optimization. f.Range is still used as the Val's source location below. mkLocalVal f.Range - (g.CompilerGlobalState.Value.NiceNameGenerator.FreshCompilerGeneratedName(f.LogicalName, f.Range)) + (scope.Fresh(f.LogicalName, f.Range)) fCty valReprInfo @@ -638,7 +639,7 @@ let decideFormalSuggestedCP g z tys vss = // transform - decideTransform //------------------------------------------------------------------------- -let decideTransform g z v callPatterns (m, tps, vss: Val list list, retTy) = +let decideTransform (scope: PerFileNamingScope) g z v callPatterns (m, tps, vss: Val list list, retTy) = let tys = List.map (typeOfLambdaArg m) vss // NOTE: 'a in arg types may have been instanced at different tuples... @@ -664,7 +665,7 @@ let decideTransform g z v callPatterns (m, tps, vss: Val list list, retTy) = if isTrivialCP callPattern then None // no transform else - Some(v, mkTransform g v m tps tys retTy (callPattern, tyfringes)) + Some(v, mkTransform scope g v m tps tys retTy (callPattern, tyfringes)) //------------------------------------------------------------------------- @@ -686,7 +687,7 @@ let eligibleVal g m (v: Val) = && not // .IsCompiledAsTopLevel && v.IsCompiledAsTopLevel -let determineTransforms g (z: Results) = +let determineTransforms (scope: PerFileNamingScope) g (z: Results) = let selectTransform (f: Val) sites = if not (eligibleVal g f.Range f) then None @@ -702,9 +703,13 @@ let determineTransforms g (z: Results) = | arg1 :: _ -> // consider f let m = arg1.Range // mark of first arg, mostly for error reporting let callPatterns = sitesCPs sites // callPatterns from sites - decideTransform g z f callPatterns (m, tps, vss, retTy) // make transform (if required) + decideTransform scope g z f callPatterns (m, tps, vss, retTy) // make transform (if required) - let vtransforms = Zmap.chooseL selectTransform z.Uses + // See https://github.com/dotnet/fsharp/issues/19732 for why we sort here. + let vtransforms = + Zmap.toList z.Uses + |> List.sortWith (fun (v1, _) (v2, _) -> compare (valSourceOrderKey v1) (valSourceOrderKey v2)) + |> List.choose (fun (f, sites) -> selectTransform f sites) let vtransforms = Zmap.ofList valOrder vtransforms vtransforms @@ -948,12 +953,12 @@ let passImplFile penv assembly = // entry point //------------------------------------------------------------------------- -let DetupleImplFile ccu g expr = +let DetupleImplFile (scope: PerFileNamingScope) ccu g expr = // Collect expr info - wanting usage contexts and bindings let z = GetUsageInfoOfImplFile g expr // For each Val, decide Some "transform", or None if not changing - let vtrans = determineTransforms g z + let vtrans = determineTransforms scope g z // Pass over term, rewriting bindings and fixing up call sites, under penv let penv = diff --git a/src/Compiler/Optimize/DetupleArgs.fsi b/src/Compiler/Optimize/DetupleArgs.fsi index 4dc7c1ac487..787a3cfb688 100644 --- a/src/Compiler/Optimize/DetupleArgs.fsi +++ b/src/Compiler/Optimize/DetupleArgs.fsi @@ -3,10 +3,11 @@ module internal FSharp.Compiler.Detuple open Internal.Utilities.Collections +open FSharp.Compiler.CompilerGlobalState open FSharp.Compiler.TcGlobals open FSharp.Compiler.TypedTree -val DetupleImplFile: CcuThunk -> TcGlobals -> CheckedImplFile -> CheckedImplFile +val DetupleImplFile: PerFileNamingScope -> CcuThunk -> TcGlobals -> CheckedImplFile -> CheckedImplFile module GlobalUsageAnalysis = val GetValsBoundInExpr: Expr -> Zset diff --git a/src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fs b/src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fs index 885917fee37..4156adbab60 100644 --- a/src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fs +++ b/src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fs @@ -818,7 +818,7 @@ let ChooseReqdItemPackings g fclassM topValS declist reqdItemsMap = // REVIEW: could do better here by preserving names let MakeSimpleArityInfo tps n = ValReprInfo (ValReprInfo.InferTyparInfo tps, List.replicate n ValReprInfo.unnamedTopArg, ValReprInfo.unnamedRetVal) -let CreateNewValuesForTLR g tlrS arityM fclassM envPackM = +let CreateNewValuesForTLR (scope: PerFileNamingScope) g tlrS arityM fclassM envPackM = let createFHat (f: Val) = let wf = Zmap.force f arityM ("createFHat - wf", (valL >> showL)) @@ -837,14 +837,18 @@ let CreateNewValuesForTLR g tlrS arityM fclassM envPackM = let fHatArity = MakeSimpleArityInfo newTps (envp.ep_aenvs.Length + wf) let fHatName = - // Ensure that we have an g.CompilerGlobalState - assert(g.CompilerGlobalState |> Option.isSome) - g.CompilerGlobalState.Value.NiceNameGenerator.FreshCompilerGeneratedName(name, m) + // Names are bucketed by the per-file optimization scope (not by m, which may point at + // inlined source from another file) to keep compiler-generated names deterministic under + // parallel optimization. m is still used as the new Val's source location below. + scope.Fresh(name, m) let fHat = mkLocalNameTypeArity f.IsCompilerGenerated m fHatName fHatTy (Some fHatArity) fHat - let fs = Zset.elements tlrS + // See https://github.com/dotnet/fsharp/issues/19732 for why we sort here. + let fs = + Zset.elements tlrS + |> List.sortWith (fun v1 v2 -> compare (valSourceOrderKey v1) (valSourceOrderKey v2)) let ffHats = List.map (fun f -> f, createFHat f) fs let fHatM = Zmap.ofList valOrder ffHats fHatM @@ -1345,7 +1349,7 @@ let RecreateUniqueBounds g expr = // entry point //------------------------------------------------------------------------- -let MakeTopLevelRepresentationDecisions ccu g expr = +let MakeTopLevelRepresentationDecisions (scope: PerFileNamingScope) ccu g expr = try // pass1: choose the f to be TLR with arity(f) let tlrS, topValS, arityM = Pass1_DetermineTLRAndArities.DetermineTLRAndArities g expr @@ -1355,7 +1359,7 @@ let MakeTopLevelRepresentationDecisions ccu g expr = // pass3 let envPackM = ChooseReqdItemPackings g fclassM topValS declist reqdItemsMap - let fHatM = CreateNewValuesForTLR g tlrS arityM fclassM envPackM + let fHatM = CreateNewValuesForTLR scope g tlrS arityM fclassM envPackM // pass4: rewrite if verboseTLR then dprintf "TransExpr(rw)------\n" diff --git a/src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fsi b/src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fsi index 5a745306764..e563469cc16 100644 --- a/src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fsi +++ b/src/Compiler/Optimize/InnerLambdasToTopLevelFuncs.fsi @@ -2,7 +2,9 @@ module internal FSharp.Compiler.InnerLambdasToTopLevelFuncs +open FSharp.Compiler.CompilerGlobalState open FSharp.Compiler.TypedTree open FSharp.Compiler.TcGlobals -val MakeTopLevelRepresentationDecisions: CcuThunk -> TcGlobals -> CheckedImplFile -> CheckedImplFile +val MakeTopLevelRepresentationDecisions: + PerFileNamingScope -> CcuThunk -> TcGlobals -> CheckedImplFile -> CheckedImplFile diff --git a/src/Compiler/Optimize/Optimizer.fs b/src/Compiler/Optimize/Optimizer.fs index a6fa90d1e3a..9bd52e4ea48 100644 --- a/src/Compiler/Optimize/Optimizer.fs +++ b/src/Compiler/Optimize/Optimizer.fs @@ -4452,7 +4452,33 @@ and p_ValInfo (v: ValInfo) st = p_bool v.ValMakesNoCriticalTailcalls st and p_ModuleInfo x st = - p_array (p_tup2 (p_vref "opttab") p_ValInfo) (x.ValInfos.Entries |> Seq.toArray) st + // Sort entries by stable identity (logical-name + full linkage key) so the pickled bytes + // do not depend on the hash-table iteration order of ValInfos. The unpickled side reads + // them as a flat array so order does not affect correctness. See + // https://github.com/dotnet/fsharp/issues/19732. + let entries = + x.ValInfos.Entries + |> Seq.toArray + |> Array.sortBy (fun (vref: ValRef, _) -> + let k = vref.Deref.GetLinkageFullKey() + struct (vref.LogicalName, k.PartialKey.MemberParentMangledName, k.PartialKey.LogicalName)) + // Canonicalize ValMakesNoCriticalTailcalls against the final, fully-merged Val flag + // before pickling. Under parallel optimization (ParallelOptimization.optimizeFilesInParallel) + // a ValInfo is constructed via mkValInfo (line 554) capturing v.MakesNoCriticalTailcalls + // at one moment, while another parallel OptimizeImplFile task may later call + // v.SetMakesNoCriticalTailcalls() (line 3849) or, via RemapOptimizationInfo (line 1513), + // raise the bit on the shared mutable Val. The Val flag is an idempotent OR, so the + // post-optimization Val state is the canonical merged truth. Reading it here removes + // a race that produces one-byte differences in FSharpOptimizationCompressedData under + // high CPU concurrency, without serializing the optimizer pipeline. + // See https://github.com/dotnet/fsharp/issues/19732. + |> Array.map (fun (vref, vinfo) -> + let merged = vinfo.ValMakesNoCriticalTailcalls || vref.Deref.MakesNoCriticalTailcalls + if merged = vinfo.ValMakesNoCriticalTailcalls then + vref, vinfo + else + vref, { vinfo with ValMakesNoCriticalTailcalls = merged }) + p_array (p_tup2 (p_vref "opttab") p_ValInfo) entries st p_namemap p_LazyModuleInfo x.ModuleOrNamespaceInfos st and p_LazyModuleInfo x st = diff --git a/src/Compiler/TypedTree/CompilerGlobalState.fs b/src/Compiler/TypedTree/CompilerGlobalState.fs index ab1dde178f0..2936ad16f61 100644 --- a/src/Compiler/TypedTree/CompilerGlobalState.fs +++ b/src/Compiler/TypedTree/CompilerGlobalState.fs @@ -22,20 +22,36 @@ type NiceNameGenerator() = // Cache this as a delegate. let basicNameCountsAddDelegate = Func(fun _ -> ref 0) - let increment basicName (m: range) = - let key = struct (basicName, m.FileIndex) + let incrementBucket basicName (fileIndex: int) = + let key = struct (basicName, fileIndex) let countCell = basicNameCounts.GetOrAdd(key, basicNameCountsAddDelegate) Interlocked.Increment(countCell) - + + let increment basicName (m: range) = incrementBucket basicName m.FileIndex + + let mkName basicName (m: range) count = + CompilerGeneratedNameSuffix basicName (string m.StartLine + (match (count - 1) with 0 -> "" | n -> "-" + string n)) + member _.FreshCompilerGeneratedNameOfBasicName (basicName, m: range) = let count = increment basicName m - CompilerGeneratedNameSuffix basicName (string m.StartLine + (match (count - 1) with 0 -> "" | n -> "-" + string n)) + mkName basicName m count member this.FreshCompilerGeneratedName (name, m: range) = this.FreshCompilerGeneratedNameOfBasicName (GetBasicNameOfPossibleCompilerGeneratedName name, m) member _.IncrementOnly(name: string, m: range) = increment name m + /// Allocate a fresh compiler-generated name whose uniqueness counter is bucketed by an + /// explicit per-file scope (see PerFileNamingScope) rather than by the file index of 'm'. + /// 'm' is used only for the human-readable start-line marker baked into the generated name, + /// so passing a range that points at inlined source code can no longer make compiler-generated + /// names non-deterministic under parallel optimization. See + /// https://github.com/dotnet/fsharp/issues/19732. + member _.FreshCompilerGeneratedNameInScope (scopeFileIndex: int, name: string, m: range) = + let basicName = GetBasicNameOfPossibleCompilerGeneratedName name + let count = incrementBucket basicName scopeFileIndex + mkName basicName m count + /// Generates compiler-generated names marked up with a source code location, but if given the same unique value then /// return precisely the same name. Each name generated also includes the StartLine number of the range passed in /// at the point of first generation. @@ -44,13 +60,83 @@ type NiceNameGenerator() = /// It is made concurrency-safe since a global instance of the type is allocated in tast.fs. type StableNiceNameGenerator() = - let niceNames = ConcurrentDictionary(max Environment.ProcessorCount 1, 127) + // The value is wrapped in Lazy<_> so the inner counter-incrementing factory runs exactly once + // per cache key, even when ConcurrentDictionary.GetOrAdd's value-factory is invoked on multiple + // threads under contention. Without the Lazy wrapper, spurious factory invocations would + // increment the counter and produce non-deterministic suffixes. See + // https://github.com/dotnet/fsharp/issues/19732. + let niceNames = ConcurrentDictionary>(max Environment.ProcessorCount 1, 127) let innerGenerator = NiceNameGenerator() member x.GetUniqueCompilerGeneratedName (name, m: range, uniq) = let basicName = GetBasicNameOfPossibleCompilerGeneratedName name let key = basicName, uniq - niceNames.GetOrAdd(key, fun (basicName, _) -> innerGenerator.FreshCompilerGeneratedNameOfBasicName(basicName, m)) + let lazyName = + niceNames.GetOrAdd(key, fun (basicName, _) -> + lazy innerGenerator.FreshCompilerGeneratedNameOfBasicName(basicName, m)) + lazyName.Value + +/// A compiler-generated-name allocation scope bound to a single ImplFile being optimized. The +/// constructor is not part of the public signature: a scope can only be obtained from +/// CompilerGlobalState.NewFileScope so a call site can't accidentally bucket names by the wrong +/// (e.g. inlined-source) file and reintroduce the non-determinism fixed by +/// https://github.com/dotnet/fsharp/issues/19732. +[] +type PerFileNamingScope internal (nng: NiceNameGenerator, fileIndex: int) = + + /// Allocate a fresh compiler-generated name within this file's scope. 'm' contributes only the + /// source-location marker in the generated name; the determinism-critical uniqueness bucket is + /// fixed by this scope's file and never by 'm'. + member _.Fresh (name: string, m: range) = + nng.FreshCompilerGeneratedNameInScope(fileIndex, name, m) + +/// Per-consumer-file closure type-name allocation scope used by IlxGen for cross-file +/// inlined closures only. In-file closures are handled directly through +/// StableNiceNameGenerator (with priming) to keep their names identical to the legacy +/// format. See https://github.com/dotnet/fsharp/issues/19928. +/// +/// Cross-file inlined closures get an `F` marker to disambiguate +/// parallel consumer files inlining the same source range. +[] +type PerFileClosureNameScope(consumerFileIndex: int) = + + let byUniq = System.Collections.Generic.Dictionary() + let buckets = + System.Collections.Generic.Dictionary() + + member _.ConsumerFileIndex = consumerFileIndex + + member _.EmitClosureName(basicName: string, m: range, uniq: int64) = + match byUniq.TryGetValue uniq with + | true, cached -> + cached + | false, _ -> + // Bucket key omits StartColumn so two Lambdas sharing a line (different columns) + // share one bucket and produce different `-N` suffixes. + let bucketKey = + struct (basicName, m.FileIndex, m.StartLine) + + let occ = + match buckets.TryGetValue bucketKey with + | true, n -> + buckets[bucketKey] <- n + 1 + n + | false, _ -> + buckets[bucketKey] <- 1 + 0 + + let lineMarker = + string m.StartLine + "F" + string consumerFileIndex + + let suffix = + if occ = 0 then "" + else "-" + string occ + + let name = + CompilerGeneratedNameSuffix basicName (lineMarker + suffix) + + byUniq[uniq] <- name + name type internal CompilerGlobalState () = /// A global generator of compiler generated names @@ -68,6 +154,12 @@ type internal CompilerGlobalState () = member _.IlxGenNiceNameGenerator = ilxgenGlobalNng + /// Create a per-file naming scope tied to a single ImplFile. Names allocated through the returned + /// scope are bucketed by 'fileRange.FileIndex', so parallel optimization of different files cannot + /// race on a shared name-counter bucket. See https://github.com/dotnet/fsharp/issues/19732. + member _.NewFileScope (fileRange: range) = + PerFileNamingScope(globalNng, fileRange.FileIndex) + /// Unique name generator for stamps attached to lambdas and object expressions type Unique = int64 diff --git a/src/Compiler/TypedTree/CompilerGlobalState.fsi b/src/Compiler/TypedTree/CompilerGlobalState.fsi index b308cbe25a7..a3c3d8e5222 100644 --- a/src/Compiler/TypedTree/CompilerGlobalState.fsi +++ b/src/Compiler/TypedTree/CompilerGlobalState.fsi @@ -30,6 +30,36 @@ type StableNiceNameGenerator = new: unit -> StableNiceNameGenerator member GetUniqueCompilerGeneratedName: name: string * m: range * uniq: int64 -> string +/// A compiler-generated-name allocation scope bound to a single ImplFile being optimized. +/// Instances can only be obtained from CompilerGlobalState.NewFileScope so a call site can't +/// accidentally bucket names by the wrong (e.g. inlined-source) file and reintroduce the +/// non-determinism fixed by https://github.com/dotnet/fsharp/issues/19732. +[] +type PerFileNamingScope = + + /// Allocate a fresh compiler-generated name within this file's scope. 'm' contributes only the + /// source-location marker baked into the generated name; the uniqueness bucket is this scope's file. + member Fresh: name: string * m: range -> string + +/// Per-consumer-file closure type-name allocation scope used by IlxGen for cross-file +/// inlined closures only. See https://github.com/dotnet/fsharp/issues/19928. +[] +type PerFileClosureNameScope = + + new: consumerFileIndex: int -> PerFileClosureNameScope + + /// File index of the consumer file that this scope was allocated for. Used by the caller + /// to gate routing through this scope vs. the legacy StableNameGenerator. + member ConsumerFileIndex: int + + /// Allocate (or reuse cached) closure type name. Repeat calls with the same `uniq` return + /// the same name. New `uniq`s at the same source line get an incrementing `-N` suffix. + /// Emitted name format: `basicName@F[-N]`. Intended for + /// closures inlined from another file (m.FileIndex ≠ consumerFileIndex); for in-file + /// closures, callers should route through StableNiceNameGenerator directly for baseline + /// stability. + member EmitClosureName: basicName: string * m: range * uniq: int64 -> string + type internal CompilerGlobalState = new: unit -> CompilerGlobalState @@ -43,6 +73,11 @@ type internal CompilerGlobalState = /// A global generator of stable compiler generated names member StableNameGenerator: StableNiceNameGenerator + /// Create a per-file naming scope for the ImplFile identified by 'fileRange'. All names allocated + /// through the returned scope are bucketed by that file's FileIndex, guaranteeing determinism + /// under parallel optimization. See https://github.com/dotnet/fsharp/issues/19732. + member NewFileScope: fileRange: range -> PerFileNamingScope + type Unique = int64 /// Concurrency-safe diff --git a/src/Compiler/TypedTree/TypedTreeOps.ExprConstruction.fs b/src/Compiler/TypedTree/TypedTreeOps.ExprConstruction.fs index 00761538123..83401b7a9ae 100644 --- a/src/Compiler/TypedTree/TypedTreeOps.ExprConstruction.fs +++ b/src/Compiler/TypedTree/TypedTreeOps.ExprConstruction.fs @@ -44,6 +44,15 @@ module internal ExprConstruction = member _.Compare(v1, v2) = compareBy v1 v2 _.Stamp } + // Source-position-derived order key for Vals. Used to walk Val collections + // in a stable, build-independent order before calling NiceNameGenerator + // from parallel optimizer passes. Stamp is the final tiebreaker for + // synthetic Vals at the same location; stamps are fixed within a single + // process so the order is total. See https://github.com/dotnet/fsharp/issues/19732. + let valSourceOrderKey (v: Val) = + let r = v.Range + struct (r.FileIndex, r.StartLine, r.StartColumn, v.LogicalName, v.Stamp) + let tyconOrder = { new IComparer with member _.Compare(tycon1, tycon2) = compareBy tycon1 tycon2 _.Stamp diff --git a/src/Compiler/TypedTree/TypedTreeOps.ExprConstruction.fsi b/src/Compiler/TypedTree/TypedTreeOps.ExprConstruction.fsi index 36942be52f1..09a00276dfe 100644 --- a/src/Compiler/TypedTree/TypedTreeOps.ExprConstruction.fsi +++ b/src/Compiler/TypedTree/TypedTreeOps.ExprConstruction.fsi @@ -22,6 +22,12 @@ module internal ExprConstruction = /// An ordering for value definitions, based on stamp val valOrder: IComparer + /// Stable, source-position-derived key for ordering Vals. + /// Use this before calling NiceNameGenerator from parallel optimizer passes + /// so the generated names do not depend on Val.Stamp assignment race. + /// See https://github.com/dotnet/fsharp/issues/19732. + val valSourceOrderKey: Val -> struct (int * int * int * string * int64) + /// An ordering for type definitions, based on stamp val tyconOrder: IComparer diff --git a/tests/AheadOfTime/Trimming/check.ps1 b/tests/AheadOfTime/Trimming/check.ps1 index 1695a3684f0..f272bd497c9 100644 --- a/tests/AheadOfTime/Trimming/check.ps1 +++ b/tests/AheadOfTime/Trimming/check.ps1 @@ -63,13 +63,13 @@ function CheckTrim($root, $tfm, $outputfile, $expected_len, $callerLineNumber) { $allErrors = @() # Check net9.0 trimmed assemblies -$allErrors += CheckTrim -root "SelfContained_Trimming_Test" -tfm "net9.0" -outputfile "FSharp.Core.dll" -expected_len 311808 -callerLineNumber 66 +$allErrors += CheckTrim -root "SelfContained_Trimming_Test" -tfm "net9.0" -outputfile "FSharp.Core.dll" -expected_len 316928 -callerLineNumber 66 # Check net9.0 trimmed assemblies with static linked FSharpCore -$allErrors += CheckTrim -root "StaticLinkedFSharpCore_Trimming_Test" -tfm "net9.0" -outputfile "StaticLinkedFSharpCore_Trimming_Test.dll" -expected_len 9169408 -callerLineNumber 69 +$allErrors += CheckTrim -root "StaticLinkedFSharpCore_Trimming_Test" -tfm "net9.0" -outputfile "StaticLinkedFSharpCore_Trimming_Test.dll" -expected_len 9179136 -callerLineNumber 69 # Check net9.0 trimmed assemblies with F# metadata resources removed -$allErrors += CheckTrim -root "FSharpMetadataResource_Trimming_Test" -tfm "net9.0" -outputfile "FSharpMetadataResource_Trimming_Test.dll" -expected_len 7609344 -callerLineNumber 72 +$allErrors += CheckTrim -root "FSharpMetadataResource_Trimming_Test" -tfm "net9.0" -outputfile "FSharpMetadataResource_Trimming_Test.dll" -expected_len 7612928 -callerLineNumber 72 # Report all errors and exit with failure if any occurred if ($allErrors.Count -gt 0) { diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs.RealInternalSignatureOff.il.bsl index ab736a3c457..9cd8322cd36 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs.RealInternalSignatureOff.il.bsl @@ -50,12 +50,15 @@ } - .method assembly specialname static class [runtime]System.Tuple`2 get_patternInput@8() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class [runtime]System.Tuple`2 ''.$OutOptionalTests::patternInput@8 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$OutOptionalTests::init@ + IL_0006: ldsfld int32 ''.$OutOptionalTests::init@ + IL_000b: pop + IL_000c: ret } .method assembly specialname static int32 get_outArg@8() cil managed @@ -66,13 +69,20 @@ IL_0005: ret } - .method assembly specialname static void set_outArg@8(int32 'value') cil managed + .method assembly specialname static int32 'get_outArg@9-1'() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld int32 ''.$OutOptionalTests::outArg@8 - IL_0006: ret + IL_0000: ldsfld int32 ''.$OutOptionalTests::'outArg@9-1' + IL_0005: ret + } + + .method assembly specialname static class [runtime]System.Tuple`2 get_patternInput@8() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [runtime]System.Tuple`2 ''.$OutOptionalTests::patternInput@8 + IL_0005: ret } .method assembly specialname static class [runtime]System.Tuple`2 'get_patternInput@9-1'() cil managed @@ -83,12 +93,13 @@ IL_0005: ret } - .method assembly specialname static int32 'get_outArg@9-1'() cil managed + .method assembly specialname static void set_outArg@8(int32 'value') cil managed { .maxstack 8 - IL_0000: ldsfld int32 ''.$OutOptionalTests::'outArg@9-1' - IL_0005: ret + IL_0000: ldarg.0 + IL_0001: stsfld int32 ''.$OutOptionalTests::outArg@8 + IL_0006: ret } .method assembly specialname static void 'set_outArg@9-1'(int32 'value') cil managed @@ -179,4 +190,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs.RealInternalSignatureOn.il.bsl index 320273baa2d..ccdd1726cac 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/MethodResolution/OptionalAndOutParameters.fs.RealInternalSignatureOn.il.bsl @@ -58,12 +58,15 @@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly int32 'outArg@9-1' .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .method assembly specialname static class [runtime]System.Tuple`2 get_patternInput@8() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class [runtime]System.Tuple`2 OutOptionalTests::patternInput@8 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$OutOptionalTests::init@ + IL_0006: ldsfld int32 ''.$OutOptionalTests::init@ + IL_000b: pop + IL_000c: ret } .method assembly specialname static int32 get_outArg@8() cil managed @@ -74,49 +77,46 @@ IL_0005: ret } - .method assembly specialname static void set_outArg@8(int32 'value') cil managed + .method assembly specialname static int32 'get_outArg@9-1'() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld int32 OutOptionalTests::outArg@8 - IL_0006: ret + IL_0000: ldsfld int32 OutOptionalTests::'outArg@9-1' + IL_0005: ret } - .method assembly specialname static class [runtime]System.Tuple`2 'get_patternInput@9-1'() cil managed + .method assembly specialname static class [runtime]System.Tuple`2 get_patternInput@8() cil managed { .maxstack 8 - IL_0000: ldsfld class [runtime]System.Tuple`2 OutOptionalTests::'patternInput@9-1' + IL_0000: ldsfld class [runtime]System.Tuple`2 OutOptionalTests::patternInput@8 IL_0005: ret } - .method assembly specialname static int32 'get_outArg@9-1'() cil managed + .method assembly specialname static class [runtime]System.Tuple`2 'get_patternInput@9-1'() cil managed { .maxstack 8 - IL_0000: ldsfld int32 OutOptionalTests::'outArg@9-1' + IL_0000: ldsfld class [runtime]System.Tuple`2 OutOptionalTests::'patternInput@9-1' IL_0005: ret } - .method assembly specialname static void 'set_outArg@9-1'(int32 'value') cil managed + .method assembly specialname static void set_outArg@8(int32 'value') cil managed { .maxstack 8 IL_0000: ldarg.0 - IL_0001: stsfld int32 OutOptionalTests::'outArg@9-1' + IL_0001: stsfld int32 OutOptionalTests::outArg@8 IL_0006: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method assembly specialname static void 'set_outArg@9-1'(int32 'value') cil managed { .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$OutOptionalTests::init@ - IL_0006: ldsfld int32 ''.$OutOptionalTests::init@ - IL_000b: pop - IL_000c: ret + IL_0000: ldarg.0 + IL_0001: stsfld int32 OutOptionalTests::'outArg@9-1' + IL_0006: ret } .method assembly static void staticInitialization@() cil managed @@ -198,4 +198,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/StaticLet/StaticLetInUnionsAndRecords.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/StaticLet/StaticLetInUnionsAndRecords.fs index d75accd96f8..2f4a25c1e0b 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/StaticLet/StaticLetInUnionsAndRecords.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/StaticLet/StaticLetInUnionsAndRecords.fs @@ -272,8 +272,21 @@ let ``Static let record - generics - IL test`` compilation = compilation |> withLangVersion80 |> compile - |> verifyIL [""" .method private specialname rtspecialname static - void .cctor() cil managed + |> verifyIL [""" .method public specialname rtspecialname instance void .ctor(!T x) cil managed + { + .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, + class [runtime]System.Type) = ( 01 00 60 06 00 00 0F 54 65 73 74 2B 4D 79 52 65 + 63 6F 72 64 60 31 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [runtime]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class Test/MyRecord`1::X@ + IL_000d: ret + } """; + """ .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 @@ -289,9 +302,8 @@ let ``Static let record - generics - IL test`` compilation = IL_0029: volatile. IL_002b: stsfld int32 class Test/MyRecord`1::init@7 IL_0030: ret - } - - .method public static string GetMyName() cil managed + } """; + """ .method public static string GetMyName() cil managed { .maxstack 8 @@ -400,8 +412,7 @@ do Console.WriteLine("module after type") .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoEqualityAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [FSharp.Core]Microsoft.FSharp.Core.NoComparisonAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) - .method private specialname rtspecialname static - void .cctor() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 @@ -414,6 +425,17 @@ do Console.WriteLine("module after type") } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$Test::init@ + IL_0006: ldsfld int32 ''.$Test::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$Test @@ -423,8 +445,7 @@ do Console.WriteLine("module after type") .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method private specialname rtspecialname static - void .cctor() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 @@ -566,8 +587,7 @@ Console.Write(MyTypes.X.GetX) .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) .field static assembly int32 x_value .field static assembly int32 init@6 - .method public specialname static int32 - get_GetX() cil managed + .method public specialname static int32 get_GetX() cil managed { .maxstack 8 @@ -583,8 +603,7 @@ Console.Write(MyTypes.X.GetX) IL_0016: ret } - .method private specialname rtspecialname static - void .cctor() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 @@ -605,6 +624,17 @@ Console.Write(MyTypes.X.GetX) extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$ProgramMain::init@ + IL_0006: ldsfld int32 ''.$ProgramMain::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$ProgramMain @@ -614,8 +644,7 @@ Console.Write(MyTypes.X.GetX) .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method private specialname rtspecialname static - void .cctor() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionStructTypes.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionStructTypes.fs index 33849ca2d49..17f931c8c7f 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionStructTypes.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Types/UnionTypes/UnionStructTypes.fs @@ -953,25 +953,13 @@ let main args = IL_0001: ldarg.1 IL_0002: stfld int32 Foo/StructUnion::_tag IL_0007: ret - } """;(*This is getter for a data-less case, just calling into the constructor above*)""" - get_Case11() cil managed - { - .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, - int32) = ( 01 00 08 00 00 00 0A 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldc.i4.s 10 - IL_0002: newobj instance void Foo/StructUnion::.ctor(int32) - IL_0007: ret - }""";(*This is a 'maker method' New{CaseName} used for cases which do have fields associated with them, + the _tag gets initialized*)""" + } """;(*This is a 'maker method' New{CaseName} used for cases which do have fields associated with them, + the _tag gets initialized*)""" NewCase3(string _field1_3, string _field2_3) cil managed { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, int32) = ( 01 00 08 00 00 00 02 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 3 .locals init (valuetype Foo/StructUnion V_0) @@ -990,6 +978,19 @@ let main args = IL_0021: ret } +""";(*This is getter for a data-less case, just calling into the constructor above*)""" + get_Case11() cil managed + { + .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags, + int32) = ( 01 00 08 00 00 00 0A 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldc.i4.s 10 + IL_0002: newobj instance void Foo/StructUnion::.ctor(int32) + IL_0007: ret + }""";(*This is the getter on a per-instance basis, used as a way to check if a given instance is of a given case*)""" .method public hidebysig instance bool get_IsCase3() cil managed { diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 3b17732b0a1..aa62e42c0ea 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -98,6 +98,28 @@ IL_0014: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index f29f5d1d42a..0b558cc3d31 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -114,6 +114,17 @@ IL_0011: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_arg@1() cil managed { @@ -144,6 +155,17 @@ } } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index d6eb89b1d4c..37249ee8536 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -118,31 +118,31 @@ IL_0011: ret } - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_arg@1() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::arg@1 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret } - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_computation@10() cil managed + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_arg@1() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::computation@10 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::arg@1 IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_computation@10() cil managed { .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly::init@ - IL_0006: ldsfld int32 ''.$assembly::init@ - IL_000b: pop - IL_000c: ret + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::computation@10 + IL_0005: ret } .method assembly static void staticInitialization@() cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index fe00078e075..66bbae6af7d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -37,6 +37,57 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable sealed nested assembly beforefieldinit f2@6 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x, class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/f2@6::x + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f2@6::builder@ + IL_0014: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + { + + .maxstack 9 + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f2@6::builder@ + IL_0006: ldarg.0 + IL_0007: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/f2@6::x + IL_000c: newobj instance void assembly/assembly/'f2@6-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0011: ldarg.0 + IL_0012: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f2@6::builder@ + IL_0017: ldarg.0 + IL_0018: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/f2@6::x + IL_001d: ldarg.0 + IL_001e: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f2@6::builder@ + IL_0023: newobj instance void assembly/assembly/'f2@7-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) + IL_0028: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_002d: tail. + IL_002f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::While(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1) + IL_0034: ret + } + + } + .class auto ansi serializable sealed nested assembly beforefieldinit 'f2@6-1' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { @@ -120,57 +171,6 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit f2@6 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x, class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/f2@6::x - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f2@6::builder@ - IL_0014: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { - - .maxstack 9 - IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f2@6::builder@ - IL_0006: ldarg.0 - IL_0007: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/f2@6::x - IL_000c: newobj instance void assembly/assembly/'f2@6-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0011: ldarg.0 - IL_0012: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f2@6::builder@ - IL_0017: ldarg.0 - IL_0018: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/f2@6::x - IL_001d: ldarg.0 - IL_001e: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f2@6::builder@ - IL_0023: newobj instance void assembly/assembly/'f2@7-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) - IL_0028: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_002d: tail. - IL_002f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::While(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1) - IL_0034: ret - } - - } - .method public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f2() cil managed { @@ -192,6 +192,28 @@ IL_001c: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index a86732cfe55..1a77c8286c1 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -42,6 +42,45 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable sealed nested assembly beforefieldinit f2@6 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/f2@6::x + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + { + + .maxstack 8 + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0005: ldarg.0 + IL_0006: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/f2@6::x + IL_000b: newobj instance void assembly/assembly/'f2@6-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0010: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0015: ldarg.0 + IL_0016: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/f2@6::x + IL_001b: newobj instance void assembly/assembly/'f2@7-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0020: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0025: tail. + IL_0027: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::While(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1) + IL_002c: ret + } + + } + .class auto ansi serializable sealed nested assembly beforefieldinit 'f2@6-1' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { @@ -121,45 +160,6 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit f2@6 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/f2@6::x - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { - - .maxstack 8 - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() - IL_0005: ldarg.0 - IL_0006: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/f2@6::x - IL_000b: newobj instance void assembly/assembly/'f2@6-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0010: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() - IL_0015: ldarg.0 - IL_0016: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/f2@6::x - IL_001b: newobj instance void assembly/assembly/'f2@7-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0020: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0025: tail. - IL_0027: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::While(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1) - IL_002c: ret - } - - } - .method public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f2() cil managed { @@ -176,6 +176,17 @@ IL_0019: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_arg@1() cil managed { @@ -206,6 +217,17 @@ } } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index b3ffadbbe72..1af6676a69c 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOn.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -37,6 +37,57 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable sealed nested assembly beforefieldinit f2@6 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x, class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/f2@6::x + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f2@6::builder@ + IL_0014: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + { + + .maxstack 9 + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f2@6::builder@ + IL_0006: ldarg.0 + IL_0007: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/f2@6::x + IL_000c: newobj instance void assembly/assembly/'f2@6-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0011: ldarg.0 + IL_0012: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f2@6::builder@ + IL_0017: ldarg.0 + IL_0018: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/f2@6::x + IL_001d: ldarg.0 + IL_001e: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f2@6::builder@ + IL_0023: newobj instance void assembly/assembly/'f2@7-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) + IL_0028: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_002d: tail. + IL_002f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::While(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1) + IL_0034: ret + } + + } + .class auto ansi serializable sealed nested assembly beforefieldinit 'f2@6-1' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { @@ -120,57 +171,6 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit f2@6 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x, class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/f2@6::x - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f2@6::builder@ - IL_0014: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { - - .maxstack 9 - IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f2@6::builder@ - IL_0006: ldarg.0 - IL_0007: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/f2@6::x - IL_000c: newobj instance void assembly/assembly/'f2@6-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0011: ldarg.0 - IL_0012: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f2@6::builder@ - IL_0017: ldarg.0 - IL_0018: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/f2@6::x - IL_001d: ldarg.0 - IL_001e: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f2@6::builder@ - IL_0023: newobj instance void assembly/assembly/'f2@7-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) - IL_0028: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_002d: tail. - IL_002f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::While(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1) - IL_0034: ret - } - - } - .method public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f2() cil managed { diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index 2451852f925..6510c6014d6 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -42,6 +42,45 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .class auto ansi serializable sealed nested assembly beforefieldinit f2@6 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/f2@6::x + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + { + + .maxstack 8 + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0005: ldarg.0 + IL_0006: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/f2@6::x + IL_000b: newobj instance void assembly/assembly/'f2@6-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0010: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0015: ldarg.0 + IL_0016: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/f2@6::x + IL_001b: newobj instance void assembly/assembly/'f2@7-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0020: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0025: tail. + IL_0027: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::While(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1) + IL_002c: ret + } + + } + .class auto ansi serializable sealed nested assembly beforefieldinit 'f2@6-1' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { @@ -121,45 +160,6 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit f2@6 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/f2@6::x - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { - - .maxstack 8 - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() - IL_0005: ldarg.0 - IL_0006: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/f2@6::x - IL_000b: newobj instance void assembly/assembly/'f2@6-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0010: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() - IL_0015: ldarg.0 - IL_0016: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/f2@6::x - IL_001b: newobj instance void assembly/assembly/'f2@7-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0020: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0025: tail. - IL_0027: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::While(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1) - IL_002c: ret - } - - } - .field static assembly class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 arg@1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation@11 @@ -180,31 +180,31 @@ IL_0019: ret } - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_arg@1() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::arg@1 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret } - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_computation@11() cil managed + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_arg@1() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::computation@11 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::arg@1 IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_computation@11() cil managed { .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly::init@ - IL_0006: ldsfld int32 ''.$assembly::init@ - IL_000b: pop - IL_000c: ret + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::computation@11 + IL_0005: ret } .method assembly static void staticInitialization@() cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 3cd259184db..a3d92870ee6 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -37,42 +37,6 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@10-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> - { - .field public int32 'value' - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(int32 'value') cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld int32 assembly/assembly/'f3@10-1'::'value' - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed - { - - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: ldfld int32 assembly/assembly/'f3@10-1'::'value' - IL_0007: tail. - IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - !0) - IL_000e: ret - } - - } - .class auto ansi serializable sealed nested assembly beforefieldinit f3@5 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { @@ -143,6 +107,42 @@ } + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@10-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public int32 'value' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname instance void .ctor(int32 'value') cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/assembly/'f3@10-1'::'value' + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld int32 assembly/assembly/'f3@10-1'::'value' + IL_0007: tail. + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + !0) + IL_000e: ret + } + + } + .method public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f3() cil managed { @@ -158,6 +158,28 @@ IL_0014: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index c8d7cdc2080..e3c86e6b7e1 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -37,39 +37,6 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@10-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> - { - .field public int32 z - .method assembly specialname rtspecialname instance void .ctor(int32 z) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld int32 assembly/assembly/'f3@10-1'::z - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed - { - - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: ldfld int32 assembly/assembly/'f3@10-1'::z - IL_0007: tail. - IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - !0) - IL_000e: ret - } - - } - .class auto ansi serializable sealed nested assembly beforefieldinit f3@5 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { @@ -134,6 +101,39 @@ } + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@10-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public int32 z + .method assembly specialname rtspecialname instance void .ctor(int32 z) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/assembly/'f3@10-1'::z + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld int32 assembly/assembly/'f3@10-1'::z + IL_0007: tail. + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + !0) + IL_000e: ret + } + + } + .method public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f3() cil managed { @@ -145,6 +145,17 @@ IL_0011: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_arg@1() cil managed { @@ -175,6 +186,17 @@ } } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index 1f5c0f27046..f0fcf820baf 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOn.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -37,42 +37,6 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@10-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> - { - .field public int32 'value' - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(int32 'value') cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld int32 assembly/assembly/'f3@10-1'::'value' - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed - { - - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: ldfld int32 assembly/assembly/'f3@10-1'::'value' - IL_0007: tail. - IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - !0) - IL_000e: ret - } - - } - .class auto ansi serializable sealed nested assembly beforefieldinit f3@5 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { @@ -143,6 +107,42 @@ } + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@10-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public int32 'value' + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname instance void .ctor(int32 'value') cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/assembly/'f3@10-1'::'value' + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld int32 assembly/assembly/'f3@10-1'::'value' + IL_0007: tail. + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + !0) + IL_000e: ret + } + + } + .method public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f3() cil managed { diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index a20b2c309fd..aa72b835a08 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -37,39 +37,6 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@10-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> - { - .field public int32 z - .method assembly specialname rtspecialname instance void .ctor(int32 z) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld int32 assembly/assembly/'f3@10-1'::z - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed - { - - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: ldfld int32 assembly/assembly/'f3@10-1'::z - IL_0007: tail. - IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - !0) - IL_000e: ret - } - - } - .class auto ansi serializable sealed nested assembly beforefieldinit f3@5 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { @@ -134,6 +101,39 @@ } + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@10-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public int32 z + .method assembly specialname rtspecialname instance void .ctor(int32 z) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/assembly/'f3@10-1'::z + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld int32 assembly/assembly/'f3@10-1'::z + IL_0007: tail. + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + !0) + IL_000e: ret + } + + } + .field static assembly class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 arg@1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation@12 @@ -149,31 +149,31 @@ IL_0011: ret } - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_arg@1() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::arg@1 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret } - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_computation@12() cil managed + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_arg@1() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::computation@12 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::arg@1 IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_computation@12() cil managed { .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly::init@ - IL_0006: ldsfld int32 ''.$assembly::init@ - IL_000b: pop - IL_000c: ret + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::computation@12 + IL_0005: ret } .method assembly static void staticInitialization@() cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 348b1d1471d..d4383dc4e7f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -37,14 +37,76 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@10-2' + .class auto ansi serializable sealed nested assembly beforefieldinit f4@5 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f4@5::builder@ + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + { + + .maxstack 7 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_3) + IL_0000: ldc.i4.0 + IL_0001: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f4@5::builder@ + IL_000d: stloc.1 + IL_000e: ldarg.0 + IL_000f: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f4@5::builder@ + IL_0014: ldarg.0 + IL_0015: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f4@5::builder@ + IL_001a: ldloc.0 + IL_001b: newobj instance void assembly/assembly/'f4@7-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0020: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0025: stloc.2 + IL_0026: ldloc.0 + IL_0027: newobj instance void assembly/assembly/'f4@12-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_002c: stloc.3 + IL_002d: ldloc.2 + IL_002e: ldloc.3 + IL_002f: newobj instance void assembly/assembly/'f4@6-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0034: tail. + IL_0036: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_003b: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@6-4' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { - .field public int32 'value' + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(int32 'value') cil managed + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 compensation + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 compensation) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) @@ -54,8 +116,11 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld int32 assembly/assembly/'f4@10-2'::'value' - IL_000d: ret + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f4@6-4'::computation + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/assembly/'f4@6-4'::compensation + IL_0014: ret } .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed @@ -64,11 +129,14 @@ .maxstack 8 IL_0000: ldarg.1 IL_0001: ldarg.0 - IL_0002: ldfld int32 assembly/assembly/'f4@10-2'::'value' - IL_0007: tail. - IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - !0) - IL_000e: ret + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f4@6-4'::computation + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/assembly/'f4@6-4'::compensation + IL_000d: tail. + IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::TryFinally(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0014: ret } } @@ -136,57 +204,14 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@12-3' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f4@12-3'::x - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { - - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f4@12-3'::x - IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f4@12-3'::x - IL_000d: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() - IL_0012: callvirt instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_Value(!0) - IL_0017: nop - IL_0018: ldstr "done" - IL_001d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0022: tail. - IL_0024: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0029: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@6-4' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@10-2' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 compensation + .field public int32 'value' .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 compensation) cil managed + .method assembly specialname rtspecialname instance void .ctor(int32 'value') cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) @@ -196,11 +221,8 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f4@6-4'::computation - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/assembly/'f4@6-4'::compensation - IL_0014: ret + IL_0008: stfld int32 assembly/assembly/'f4@10-2'::'value' + IL_000d: ret } .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed @@ -209,72 +231,50 @@ .maxstack 8 IL_0000: ldarg.1 IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f4@6-4'::computation - IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/assembly/'f4@6-4'::compensation - IL_000d: tail. - IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::TryFinally(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0014: ret + IL_0002: ldfld int32 assembly/assembly/'f4@10-2'::'value' + IL_0007: tail. + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + !0) + IL_000e: ret } } - .class auto ansi serializable sealed nested assembly beforefieldinit f4@5 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@12-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f4@5::builder@ + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f4@12-3'::x IL_000d: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - .maxstack 7 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_1, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_3) - IL_0000: ldc.i4.0 - IL_0001: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) - IL_0006: stloc.0 + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f4@12-3'::x IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f4@5::builder@ - IL_000d: stloc.1 - IL_000e: ldarg.0 - IL_000f: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f4@5::builder@ - IL_0014: ldarg.0 - IL_0015: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f4@5::builder@ - IL_001a: ldloc.0 - IL_001b: newobj instance void assembly/assembly/'f4@7-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0020: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0025: stloc.2 - IL_0026: ldloc.0 - IL_0027: newobj instance void assembly/assembly/'f4@12-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_002c: stloc.3 - IL_002d: ldloc.2 - IL_002e: ldloc.3 - IL_002f: newobj instance void assembly/assembly/'f4@6-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0034: tail. - IL_0036: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_003b: ret + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f4@12-3'::x + IL_000d: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0012: callvirt instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_Value(!0) + IL_0017: nop + IL_0018: ldstr "done" + IL_001d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0022: tail. + IL_0024: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0029: ret } } @@ -294,6 +294,28 @@ IL_0014: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index c204c7e95a1..209b06385f4 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -42,11 +42,71 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@10-2' + .class auto ansi serializable sealed nested assembly beforefieldinit f4@5 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field static assembly initonly class assembly/assembly/f4@5 @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + { + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_2) + IL_0000: ldc.i4.0 + IL_0001: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) + IL_0006: stloc.0 + IL_0007: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_000c: ldloc.0 + IL_000d: newobj instance void assembly/assembly/'f4@7-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0012: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0017: stloc.1 + IL_0018: ldloc.0 + IL_0019: newobj instance void assembly/assembly/'f4@12-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_001e: stloc.2 + IL_001f: ldloc.1 + IL_0020: ldloc.2 + IL_0021: newobj instance void assembly/assembly/'f4@6-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0026: tail. + IL_0028: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_002d: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/assembly/f4@5::.ctor() + IL_0005: stsfld class assembly/assembly/f4@5 assembly/assembly/f4@5::@_instance + IL_000a: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@6-4' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { - .field public int32 z - .method assembly specialname rtspecialname instance void .ctor(int32 z) cil managed + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 compensation + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 compensation) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) @@ -56,8 +116,11 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld int32 assembly/assembly/'f4@10-2'::z - IL_000d: ret + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f4@6-4'::computation + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/assembly/'f4@6-4'::compensation + IL_0014: ret } .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed @@ -66,11 +129,14 @@ .maxstack 8 IL_0000: ldarg.1 IL_0001: ldarg.0 - IL_0002: ldfld int32 assembly/assembly/'f4@10-2'::z - IL_0007: tail. - IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - !0) - IL_000e: ret + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f4@6-4'::computation + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/assembly/'f4@6-4'::compensation + IL_000d: tail. + IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::TryFinally(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0014: ret } } @@ -123,6 +189,39 @@ } + .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@10-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public int32 z + .method assembly specialname rtspecialname instance void .ctor(int32 z) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/assembly/'f4@10-2'::z + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld int32 assembly/assembly/'f4@10-2'::z + IL_0007: tail. + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + !0) + IL_000e: ret + } + + } + .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@12-3' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { @@ -166,105 +265,6 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@6-4' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> - { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 compensation - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 compensation) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f4@6-4'::computation - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/assembly/'f4@6-4'::compensation - IL_0014: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed - { - - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f4@6-4'::computation - IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/assembly/'f4@6-4'::compensation - IL_000d: tail. - IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::TryFinally(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0014: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit f4@5 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field static assembly initonly class assembly/assembly/f4@5 @_instance - .method assembly specialname rtspecialname instance void .ctor() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() - IL_0006: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { - - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_2) - IL_0000: ldc.i4.0 - IL_0001: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) - IL_0006: stloc.0 - IL_0007: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() - IL_000c: ldloc.0 - IL_000d: newobj instance void assembly/assembly/'f4@7-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0012: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0017: stloc.1 - IL_0018: ldloc.0 - IL_0019: newobj instance void assembly/assembly/'f4@12-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_001e: stloc.2 - IL_001f: ldloc.1 - IL_0020: ldloc.2 - IL_0021: newobj instance void assembly/assembly/'f4@6-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0026: tail. - IL_0028: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_002d: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/assembly/f4@5::.ctor() - IL_0005: stsfld class assembly/assembly/f4@5 assembly/assembly/f4@5::@_instance - IL_000a: ret - } - - } - .method public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 f4() cil managed { @@ -276,6 +276,17 @@ IL_0011: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_arg@1() cil managed { @@ -306,6 +317,17 @@ } } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index 143ba00c7de..6026899e9ad 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOn.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -37,14 +37,76 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@10-2' + .class auto ansi serializable sealed nested assembly beforefieldinit f4@5 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f4@5::builder@ + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + { + + .maxstack 7 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_3) + IL_0000: ldc.i4.0 + IL_0001: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f4@5::builder@ + IL_000d: stloc.1 + IL_000e: ldarg.0 + IL_000f: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f4@5::builder@ + IL_0014: ldarg.0 + IL_0015: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f4@5::builder@ + IL_001a: ldloc.0 + IL_001b: newobj instance void assembly/assembly/'f4@7-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0020: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0025: stloc.2 + IL_0026: ldloc.0 + IL_0027: newobj instance void assembly/assembly/'f4@12-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_002c: stloc.3 + IL_002d: ldloc.2 + IL_002e: ldloc.3 + IL_002f: newobj instance void assembly/assembly/'f4@6-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0034: tail. + IL_0036: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_003b: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@6-4' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { - .field public int32 'value' + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(int32 'value') cil managed + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 compensation + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 compensation) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) @@ -54,8 +116,11 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld int32 assembly/assembly/'f4@10-2'::'value' - IL_000d: ret + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f4@6-4'::computation + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/assembly/'f4@6-4'::compensation + IL_0014: ret } .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed @@ -64,11 +129,14 @@ .maxstack 8 IL_0000: ldarg.1 IL_0001: ldarg.0 - IL_0002: ldfld int32 assembly/assembly/'f4@10-2'::'value' - IL_0007: tail. - IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - !0) - IL_000e: ret + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f4@6-4'::computation + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/assembly/'f4@6-4'::compensation + IL_000d: tail. + IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::TryFinally(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0014: ret } } @@ -136,57 +204,14 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@12-3' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f4@12-3'::x - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { - - .maxstack 8 - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f4@12-3'::x - IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f4@12-3'::x - IL_000d: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() - IL_0012: callvirt instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_Value(!0) - IL_0017: nop - IL_0018: ldstr "done" - IL_001d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0022: tail. - IL_0024: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0029: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@6-4' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@10-2' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 compensation + .field public int32 'value' .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 compensation) cil managed + .method assembly specialname rtspecialname instance void .ctor(int32 'value') cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) @@ -196,11 +221,8 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f4@6-4'::computation - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/assembly/'f4@6-4'::compensation - IL_0014: ret + IL_0008: stfld int32 assembly/assembly/'f4@10-2'::'value' + IL_000d: ret } .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed @@ -209,72 +231,50 @@ .maxstack 8 IL_0000: ldarg.1 IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f4@6-4'::computation - IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/assembly/'f4@6-4'::compensation - IL_000d: tail. - IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::TryFinally(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0014: ret + IL_0002: ldfld int32 assembly/assembly/'f4@10-2'::'value' + IL_0007: tail. + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + !0) + IL_000e: ret } } - .class auto ansi serializable sealed nested assembly beforefieldinit f4@5 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@12-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f4@5::builder@ + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f4@12-3'::x IL_000d: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - .maxstack 7 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_1, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_3) - IL_0000: ldc.i4.0 - IL_0001: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) - IL_0006: stloc.0 + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f4@12-3'::x IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f4@5::builder@ - IL_000d: stloc.1 - IL_000e: ldarg.0 - IL_000f: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f4@5::builder@ - IL_0014: ldarg.0 - IL_0015: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f4@5::builder@ - IL_001a: ldloc.0 - IL_001b: newobj instance void assembly/assembly/'f4@7-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0020: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0025: stloc.2 - IL_0026: ldloc.0 - IL_0027: newobj instance void assembly/assembly/'f4@12-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_002c: stloc.3 - IL_002d: ldloc.2 - IL_002e: ldloc.3 - IL_002f: newobj instance void assembly/assembly/'f4@6-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0034: tail. - IL_0036: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_003b: ret + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f4@12-3'::x + IL_000d: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0012: callvirt instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::set_Value(!0) + IL_0017: nop + IL_0018: ldstr "done" + IL_001d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0022: tail. + IL_0024: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0029: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index cb50efcdbce..4592eab7442 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -42,11 +42,71 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@10-2' + .class auto ansi serializable sealed nested assembly beforefieldinit f4@5 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field static assembly initonly class assembly/assembly/f4@5 @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + { + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_2) + IL_0000: ldc.i4.0 + IL_0001: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) + IL_0006: stloc.0 + IL_0007: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_000c: ldloc.0 + IL_000d: newobj instance void assembly/assembly/'f4@7-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0012: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0017: stloc.1 + IL_0018: ldloc.0 + IL_0019: newobj instance void assembly/assembly/'f4@12-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_001e: stloc.2 + IL_001f: ldloc.1 + IL_0020: ldloc.2 + IL_0021: newobj instance void assembly/assembly/'f4@6-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0026: tail. + IL_0028: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_002d: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/assembly/f4@5::.ctor() + IL_0005: stsfld class assembly/assembly/f4@5 assembly/assembly/f4@5::@_instance + IL_000a: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@6-4' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { - .field public int32 z - .method assembly specialname rtspecialname instance void .ctor(int32 z) cil managed + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 compensation + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 compensation) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) @@ -56,8 +116,11 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld int32 assembly/assembly/'f4@10-2'::z - IL_000d: ret + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f4@6-4'::computation + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/assembly/'f4@6-4'::compensation + IL_0014: ret } .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed @@ -66,11 +129,14 @@ .maxstack 8 IL_0000: ldarg.1 IL_0001: ldarg.0 - IL_0002: ldfld int32 assembly/assembly/'f4@10-2'::z - IL_0007: tail. - IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - !0) - IL_000e: ret + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f4@6-4'::computation + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/assembly/'f4@6-4'::compensation + IL_000d: tail. + IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::TryFinally(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0014: ret } } @@ -123,6 +189,39 @@ } + .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@10-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public int32 z + .method assembly specialname rtspecialname instance void .ctor(int32 z) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/assembly/'f4@10-2'::z + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld int32 assembly/assembly/'f4@10-2'::z + IL_0007: tail. + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + !0) + IL_000e: ret + } + + } + .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@12-3' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { @@ -166,105 +265,6 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@6-4' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> - { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 compensation - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 compensation) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f4@6-4'::computation - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/assembly/'f4@6-4'::compensation - IL_0014: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed - { - - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f4@6-4'::computation - IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 assembly/assembly/'f4@6-4'::compensation - IL_000d: tail. - IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::TryFinally(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0014: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit f4@5 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field static assembly initonly class assembly/assembly/f4@5 @_instance - .method assembly specialname rtspecialname instance void .ctor() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() - IL_0006: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { - - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_2) - IL_0000: ldc.i4.0 - IL_0001: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::.ctor(!0) - IL_0006: stloc.0 - IL_0007: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() - IL_000c: ldloc.0 - IL_000d: newobj instance void assembly/assembly/'f4@7-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0012: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0017: stloc.1 - IL_0018: ldloc.0 - IL_0019: newobj instance void assembly/assembly/'f4@12-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_001e: stloc.2 - IL_001f: ldloc.1 - IL_0020: ldloc.2 - IL_0021: newobj instance void assembly/assembly/'f4@6-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0026: tail. - IL_0028: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_002d: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/assembly/f4@5::.ctor() - IL_0005: stsfld class assembly/assembly/f4@5 assembly/assembly/f4@5::@_instance - IL_000a: ret - } - - } - .field static assembly class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 arg@1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation@15 @@ -280,31 +280,31 @@ IL_0011: ret } - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_arg@1() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::arg@1 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret } - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_computation@15() cil managed + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_arg@1() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::computation@15 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::arg@1 IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_computation@15() cil managed { .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly::init@ - IL_0006: ldsfld int32 ''.$assembly::init@ - IL_000b: pop - IL_000c: ret + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::computation@15 + IL_0005: ret } .method assembly static void staticInitialization@() cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 1c4d13e1c30..23133ed146e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -82,90 +82,6 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-3' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f7@9-3'::builder@ - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg2) cil managed - { - - .maxstack 5 - .locals init (int32 V_0) - IL_0000: ldarg.1 - IL_0001: stloc.0 - IL_0002: ldstr "goodbye" - IL_0007: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_000c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0011: pop - IL_0012: ldstr "goodbye 2" - IL_0017: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_001c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0021: pop - IL_0022: ldarg.0 - IL_0023: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f7@9-3'::builder@ - IL_0028: tail. - IL_002a: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Zero() - IL_002f: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-2' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f7@9-2'::builder@ - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f7@9-2'::builder@ - IL_0006: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly/assembly::get_es() - IL_000b: ldarg.0 - IL_000c: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f7@9-2'::builder@ - IL_0011: newobj instance void assembly/assembly/'f7@9-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) - IL_0016: tail. - IL_0018: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::For(class [runtime]System.Collections.Generic.IEnumerable`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_001d: ret - } - - } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-4' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { @@ -306,6 +222,90 @@ } + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f7@9-3'::builder@ + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg2) cil managed + { + + .maxstack 5 + .locals init (int32 V_0) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldstr "goodbye" + IL_0007: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0011: pop + IL_0012: ldstr "goodbye 2" + IL_0017: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_001c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0021: pop + IL_0022: ldarg.0 + IL_0023: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f7@9-3'::builder@ + IL_0028: tail. + IL_002a: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Zero() + IL_002f: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f7@9-2'::builder@ + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f7@9-2'::builder@ + IL_0006: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly/assembly::get_es() + IL_000b: ldarg.0 + IL_000c: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f7@9-2'::builder@ + IL_0011: newobj instance void assembly/assembly/'f7@9-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) + IL_0016: tail. + IL_0018: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::For(class [runtime]System.Collections.Generic.IEnumerable`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_001d: ret + } + + } + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_es() cil managed { @@ -329,6 +329,17 @@ IL_0014: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 es() { @@ -337,6 +348,17 @@ } } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index c75634fd515..d1513f8aeba 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -95,98 +95,6 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-3' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field static assembly initonly class assembly/assembly/'f7@9-3' @_instance - .method assembly specialname rtspecialname instance void .ctor() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() - IL_0006: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg2) cil managed - { - - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) - IL_0000: ldstr "goodbye" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_000a: stloc.0 - IL_000b: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() - IL_0010: ldloc.0 - IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, - class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0016: pop - IL_0017: ldstr "goodbye 2" - IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0021: stloc.0 - IL_0022: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() - IL_0027: ldloc.0 - IL_0028: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, - class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_002d: pop - IL_002e: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() - IL_0033: tail. - IL_0035: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Zero() - IL_003a: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/assembly/'f7@9-3'::.ctor() - IL_0005: stsfld class assembly/assembly/'f7@9-3' assembly/assembly/'f7@9-3'::@_instance - IL_000a: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-2' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field static assembly initonly class assembly/assembly/'f7@9-2' @_instance - .method assembly specialname rtspecialname instance void .ctor() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() - IL_0006: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { - - .maxstack 8 - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() - IL_0005: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly/assembly::get_es() - IL_000a: ldsfld class assembly/assembly/'f7@9-3' assembly/assembly/'f7@9-3'::@_instance - IL_000f: tail. - IL_0011: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::For(class [runtime]System.Collections.Generic.IEnumerable`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0016: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/assembly/'f7@9-2'::.ctor() - IL_0005: stsfld class assembly/assembly/'f7@9-2' assembly/assembly/'f7@9-2'::@_instance - IL_000a: ret - } - - } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-4' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { @@ -320,6 +228,98 @@ } + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field static assembly initonly class assembly/assembly/'f7@9-3' @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg2) cil managed + { + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) + IL_0000: ldstr "goodbye" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000a: stloc.0 + IL_000b: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0010: ldloc.0 + IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0016: pop + IL_0017: ldstr "goodbye 2" + IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0021: stloc.0 + IL_0022: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0027: ldloc.0 + IL_0028: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_002d: pop + IL_002e: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0033: tail. + IL_0035: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Zero() + IL_003a: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/assembly/'f7@9-3'::.ctor() + IL_0005: stsfld class assembly/assembly/'f7@9-3' assembly/assembly/'f7@9-3'::@_instance + IL_000a: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field static assembly initonly class assembly/assembly/'f7@9-2' @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + { + + .maxstack 8 + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0005: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly/assembly::get_es() + IL_000a: ldsfld class assembly/assembly/'f7@9-3' assembly/assembly/'f7@9-3'::@_instance + IL_000f: tail. + IL_0011: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::For(class [runtime]System.Collections.Generic.IEnumerable`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0016: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/assembly/'f7@9-2'::.ctor() + IL_0005: stsfld class assembly/assembly/'f7@9-2' assembly/assembly/'f7@9-2'::@_instance + IL_000a: ret + } + + } + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_es() cil managed { @@ -339,6 +339,17 @@ IL_0011: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_arg@1() cil managed { @@ -375,6 +386,17 @@ } } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index f2f84fbd489..c2833516f0b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOn.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -82,90 +82,6 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-3' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f7@9-3'::builder@ - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg2) cil managed - { - - .maxstack 5 - .locals init (int32 V_0) - IL_0000: ldarg.1 - IL_0001: stloc.0 - IL_0002: ldstr "goodbye" - IL_0007: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_000c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0011: pop - IL_0012: ldstr "goodbye 2" - IL_0017: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_001c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0021: pop - IL_0022: ldarg.0 - IL_0023: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f7@9-3'::builder@ - IL_0028: tail. - IL_002a: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Zero() - IL_002f: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-2' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f7@9-2'::builder@ - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f7@9-2'::builder@ - IL_0006: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly/assembly::get_es() - IL_000b: ldarg.0 - IL_000c: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f7@9-2'::builder@ - IL_0011: newobj instance void assembly/assembly/'f7@9-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) - IL_0016: tail. - IL_0018: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::For(class [runtime]System.Collections.Generic.IEnumerable`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_001d: ret - } - - } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-4' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { @@ -306,6 +222,90 @@ } + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f7@9-3'::builder@ + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg2) cil managed + { + + .maxstack 5 + .locals init (int32 V_0) + IL_0000: ldarg.1 + IL_0001: stloc.0 + IL_0002: ldstr "goodbye" + IL_0007: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0011: pop + IL_0012: ldstr "goodbye 2" + IL_0017: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_001c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0021: pop + IL_0022: ldarg.0 + IL_0023: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f7@9-3'::builder@ + IL_0028: tail. + IL_002a: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Zero() + IL_002f: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f7@9-2'::builder@ + IL_000d: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f7@9-2'::builder@ + IL_0006: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly/assembly::get_es() + IL_000b: ldarg.0 + IL_000c: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f7@9-2'::builder@ + IL_0011: newobj instance void assembly/assembly/'f7@9-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) + IL_0016: tail. + IL_0018: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::For(class [runtime]System.Collections.Generic.IEnumerable`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_001d: ret + } + + } + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 es@4 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_es() cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index ecbd8da79cd..34fa5736198 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -95,98 +95,6 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-3' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field static assembly initonly class assembly/assembly/'f7@9-3' @_instance - .method assembly specialname rtspecialname instance void .ctor() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() - IL_0006: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg2) cil managed - { - - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) - IL_0000: ldstr "goodbye" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_000a: stloc.0 - IL_000b: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() - IL_0010: ldloc.0 - IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, - class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0016: pop - IL_0017: ldstr "goodbye 2" - IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0021: stloc.0 - IL_0022: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() - IL_0027: ldloc.0 - IL_0028: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, - class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_002d: pop - IL_002e: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() - IL_0033: tail. - IL_0035: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Zero() - IL_003a: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/assembly/'f7@9-3'::.ctor() - IL_0005: stsfld class assembly/assembly/'f7@9-3' assembly/assembly/'f7@9-3'::@_instance - IL_000a: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-2' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field static assembly initonly class assembly/assembly/'f7@9-2' @_instance - .method assembly specialname rtspecialname instance void .ctor() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() - IL_0006: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { - - .maxstack 8 - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() - IL_0005: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly/assembly::get_es() - IL_000a: ldsfld class assembly/assembly/'f7@9-3' assembly/assembly/'f7@9-3'::@_instance - IL_000f: tail. - IL_0011: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::For(class [runtime]System.Collections.Generic.IEnumerable`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0016: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/assembly/'f7@9-2'::.ctor() - IL_0005: stsfld class assembly/assembly/'f7@9-2' assembly/assembly/'f7@9-2'::@_instance - IL_000a: ret - } - - } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-4' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { @@ -320,6 +228,98 @@ } + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field static assembly initonly class assembly/assembly/'f7@9-3' @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg2) cil managed + { + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_0) + IL_0000: ldstr "goodbye" + IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000a: stloc.0 + IL_000b: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0010: ldloc.0 + IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0016: pop + IL_0017: ldstr "goodbye 2" + IL_001c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0021: stloc.0 + IL_0022: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0027: ldloc.0 + IL_0028: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter(class [runtime]System.IO.TextWriter, + class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_002d: pop + IL_002e: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0033: tail. + IL_0035: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Zero() + IL_003a: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/assembly/'f7@9-3'::.ctor() + IL_0005: stsfld class assembly/assembly/'f7@9-3' assembly/assembly/'f7@9-3'::@_instance + IL_000a: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field static assembly initonly class assembly/assembly/'f7@9-2' @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + { + + .maxstack 8 + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0005: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly/assembly::get_es() + IL_000a: ldsfld class assembly/assembly/'f7@9-3' assembly/assembly/'f7@9-3'::@_instance + IL_000f: tail. + IL_0011: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::For(class [runtime]System.Collections.Generic.IEnumerable`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0016: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/assembly/'f7@9-2'::.ctor() + IL_0005: stsfld class assembly/assembly/'f7@9-2' assembly/assembly/'f7@9-2'::@_instance + IL_000a: ret + } + + } + .field static assembly class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 es@4 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 arg@1 @@ -345,31 +345,31 @@ IL_0011: ret } - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_arg@1() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::arg@1 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret } - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_computation@13() cil managed + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_arg@1() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::computation@13 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::arg@1 IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_computation@13() cil managed { .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly::init@ - IL_0006: ldsfld int32 ''.$assembly::init@ - IL_000b: pop - IL_000c: ret + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::computation@13 + IL_0005: ret } .method assembly static void staticInitialization@() cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 791fe74ed50..914171e99fb 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -37,42 +37,6 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .class auto ansi serializable sealed nested assembly beforefieldinit 'f2@10-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> - { - .field public int32 'value' - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(int32 'value') cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld int32 assembly/assembly/'f2@10-1'::'value' - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed - { - - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: ldfld int32 assembly/assembly/'f2@10-1'::'value' - IL_0007: tail. - IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - !0) - IL_000e: ret - } - - } - .class auto ansi serializable sealed nested assembly beforefieldinit f2@5 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { @@ -143,7 +107,7 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@20-5' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f2@10-1' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { .field public int32 'value' @@ -160,7 +124,7 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld int32 assembly/assembly/'f3@20-5'::'value' + IL_0008: stfld int32 assembly/assembly/'f2@10-1'::'value' IL_000d: ret } @@ -170,7 +134,7 @@ .maxstack 8 IL_0000: ldarg.1 IL_0001: ldarg.0 - IL_0002: ldfld int32 assembly/assembly/'f3@20-5'::'value' + IL_0002: ldfld int32 assembly/assembly/'f2@10-1'::'value' IL_0007: tail. IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, !0) @@ -179,19 +143,14 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@19-4' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@14-1' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public int32 x1 - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y - .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@, - int32 x1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y) cil managed + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) @@ -201,91 +160,96 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@19-4'::builder@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld int32 assembly/assembly/'f3@19-4'::x1 - IL_0014: ldarg.0 - IL_0015: ldarg.3 - IL_0016: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f3@19-4'::y - IL_001b: ret + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@14-1'::builder@ + IL_000d: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg4) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg1) cil managed { .maxstack 6 .locals init (int32 V_0, - int32 V_1, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_2, - int32 V_3) + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_3) IL_0000: ldarg.1 IL_0001: stloc.0 IL_0002: ldarg.0 - IL_0003: ldfld int32 assembly/assembly/'f3@19-4'::x1 - IL_0008: ldarg.0 - IL_0009: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f3@19-4'::y - IL_000e: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() - IL_0013: add - IL_0014: ldloc.0 - IL_0015: add - IL_0016: stloc.1 - IL_0017: ldarg.0 - IL_0018: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@19-4'::builder@ - IL_001d: stloc.2 - IL_001e: ldloc.1 - IL_001f: stloc.3 - IL_0020: ldloc.3 - IL_0021: newobj instance void assembly/assembly/'f3@20-5'::.ctor(int32) - IL_0026: tail. - IL_0028: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_002d: ret + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@14-1'::builder@ + IL_0008: stloc.1 + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::f2() + IL_000e: stloc.2 + IL_000f: ldarg.0 + IL_0010: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@14-1'::builder@ + IL_0015: ldloc.0 + IL_0016: newobj instance void assembly/assembly/'f3@15-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder, + int32) + IL_001b: stloc.3 + IL_001c: ldloc.2 + IL_001d: ldloc.3 + IL_001e: newobj instance void assembly/assembly/'f3@16-8'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0023: tail. + IL_0025: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_002a: ret } } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@19-6' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@15-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> binder + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> binder) cil managed + .field public int32 x1 + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@, int32 x1) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@19-6'::computation + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@15-2'::builder@ IL_000d: ldarg.0 IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@19-6'::binder + IL_000f: stfld int32 assembly/assembly/'f3@15-2'::x1 IL_0014: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg2) cil managed { - .maxstack 8 + .maxstack 6 + .locals init (int32 V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_3) IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@19-6'::computation - IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@19-6'::binder - IL_000d: tail. - IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0014: ret + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@15-2'::builder@ + IL_0008: stloc.1 + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::f2() + IL_000e: stloc.2 + IL_000f: ldarg.0 + IL_0010: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@15-2'::builder@ + IL_0015: ldarg.0 + IL_0016: ldfld int32 assembly/assembly/'f3@15-2'::x1 + IL_001b: newobj instance void assembly/assembly/'f3@16-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder, + int32) + IL_0020: stloc.3 + IL_0021: ldloc.2 + IL_0022: ldloc.3 + IL_0023: newobj instance void assembly/assembly/'f3@16-7'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0028: tail. + IL_002a: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_002f: ret } } @@ -407,65 +371,53 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@15-2' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@16-8' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public int32 x1 - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@, int32 x1) cil managed + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> binder + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> binder) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@15-2'::builder@ + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-8'::computation IL_000d: ldarg.0 IL_000e: ldarg.2 - IL_000f: stfld int32 assembly/assembly/'f3@15-2'::x1 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-8'::binder IL_0014: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg2) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed { - .maxstack 6 - .locals init (int32 V_0, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_1, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_3) + .maxstack 8 IL_0000: ldarg.1 - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@15-2'::builder@ - IL_0008: stloc.1 - IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::f2() - IL_000e: stloc.2 - IL_000f: ldarg.0 - IL_0010: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@15-2'::builder@ - IL_0015: ldarg.0 - IL_0016: ldfld int32 assembly/assembly/'f3@15-2'::x1 - IL_001b: newobj instance void assembly/assembly/'f3@16-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder, - int32) - IL_0020: stloc.3 - IL_0021: ldloc.2 - IL_0022: ldloc.3 - IL_0023: newobj instance void assembly/assembly/'f3@16-7'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0028: tail. - IL_002a: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_002f: ret + IL_0001: ldarg.0 + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-8'::computation + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-8'::binder + IL_000d: tail. + IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0014: ret } } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@16-8' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@16-9' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation @@ -486,10 +438,10 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-8'::computation + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-9'::computation IL_000d: ldarg.0 IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-8'::binder + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-9'::binder IL_0014: ret } @@ -499,9 +451,9 @@ .maxstack 8 IL_0000: ldarg.1 IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-8'::computation + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-9'::computation IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-8'::binder + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-9'::binder IL_000d: tail. IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, @@ -511,8 +463,8 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@14-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + .class auto ansi serializable sealed nested assembly beforefieldinit f3@16 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -525,46 +477,106 @@ .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@14-1'::builder@ + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f3@16::builder@ IL_000d: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg1) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + { + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_2) + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f3@16::builder@ + IL_0006: stloc.0 + IL_0007: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::f2() + IL_000c: stloc.1 + IL_000d: ldarg.0 + IL_000e: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f3@16::builder@ + IL_0013: newobj instance void assembly/assembly/'f3@14-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) + IL_0018: stloc.2 + IL_0019: ldloc.1 + IL_001a: ldloc.2 + IL_001b: newobj instance void assembly/assembly/'f3@16-9'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0020: tail. + IL_0022: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_0027: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@19-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .field public int32 x1 + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@, + int32 x1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@19-4'::builder@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/assembly/'f3@19-4'::x1 + IL_0014: ldarg.0 + IL_0015: ldarg.3 + IL_0016: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f3@19-4'::y + IL_001b: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg4) cil managed { .maxstack 6 .locals init (int32 V_0, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_1, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_3) + int32 V_1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_2, + int32 V_3) IL_0000: ldarg.1 IL_0001: stloc.0 IL_0002: ldarg.0 - IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@14-1'::builder@ - IL_0008: stloc.1 - IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::f2() - IL_000e: stloc.2 - IL_000f: ldarg.0 - IL_0010: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@14-1'::builder@ - IL_0015: ldloc.0 - IL_0016: newobj instance void assembly/assembly/'f3@15-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder, - int32) - IL_001b: stloc.3 - IL_001c: ldloc.2 - IL_001d: ldloc.3 - IL_001e: newobj instance void assembly/assembly/'f3@16-8'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0023: tail. - IL_0025: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_002a: ret + IL_0003: ldfld int32 assembly/assembly/'f3@19-4'::x1 + IL_0008: ldarg.0 + IL_0009: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f3@19-4'::y + IL_000e: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0013: add + IL_0014: ldloc.0 + IL_0015: add + IL_0016: stloc.1 + IL_0017: ldarg.0 + IL_0018: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@19-4'::builder@ + IL_001d: stloc.2 + IL_001e: ldloc.1 + IL_001f: stloc.3 + IL_0020: ldloc.3 + IL_0021: newobj instance void assembly/assembly/'f3@20-5'::.ctor(int32) + IL_0026: tail. + IL_0028: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_002d: ret } } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@16-9' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@19-6' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation @@ -585,10 +597,10 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-9'::computation + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@19-6'::computation IL_000d: ldarg.0 IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-9'::binder + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@19-6'::binder IL_0014: ret } @@ -598,9 +610,9 @@ .maxstack 8 IL_0000: ldarg.1 IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-9'::computation + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@19-6'::computation IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-9'::binder + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@19-6'::binder IL_000d: tail. IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, @@ -610,50 +622,38 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit f3@16 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@20-5' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ + .field public int32 'value' .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed + .method assembly specialname rtspecialname instance void .ctor(int32 'value') cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f3@16::builder@ + IL_0008: stfld int32 assembly/assembly/'f3@20-5'::'value' IL_000d: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed { - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_2) - IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f3@16::builder@ - IL_0006: stloc.0 - IL_0007: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::f2() - IL_000c: stloc.1 - IL_000d: ldarg.0 - IL_000e: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f3@16::builder@ - IL_0013: newobj instance void assembly/assembly/'f3@14-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) - IL_0018: stloc.2 - IL_0019: ldloc.1 - IL_001a: ldloc.2 - IL_001b: newobj instance void assembly/assembly/'f3@16-9'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0020: tail. - IL_0022: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_0027: ret + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld int32 assembly/assembly/'f3@20-5'::'value' + IL_0007: tail. + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + !0) + IL_000e: ret } } @@ -688,6 +688,28 @@ IL_0014: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index fe7a8801068..7265f8a09d0 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -37,39 +37,6 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .class auto ansi serializable sealed nested assembly beforefieldinit 'f2@10-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> - { - .field public int32 z - .method assembly specialname rtspecialname instance void .ctor(int32 z) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld int32 assembly/assembly/'f2@10-1'::z - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed - { - - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: ldfld int32 assembly/assembly/'f2@10-1'::z - IL_0007: tail. - IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - !0) - IL_000e: ret - } - - } - .class auto ansi serializable sealed nested assembly beforefieldinit f2@5 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { @@ -134,7 +101,7 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@20-5' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f2@10-1' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { .field public int32 z @@ -148,7 +115,7 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld int32 assembly/assembly/'f3@20-5'::z + IL_0008: stfld int32 assembly/assembly/'f2@10-1'::z IL_000d: ret } @@ -158,7 +125,7 @@ .maxstack 8 IL_0000: ldarg.1 IL_0001: ldarg.0 - IL_0002: ldfld int32 assembly/assembly/'f3@20-5'::z + IL_0002: ldfld int32 assembly/assembly/'f2@10-1'::z IL_0007: tail. IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, !0) @@ -167,12 +134,11 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@19-4' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@14-1' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { - .field public int32 x1 - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y - .method assembly specialname rtspecialname instance void .ctor(int32 x1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y) cil managed + .field static assembly initonly class assembly/assembly/'f3@14-1' @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) @@ -180,80 +146,77 @@ .maxstack 8 IL_0000: ldarg.0 IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld int32 assembly/assembly/'f3@19-4'::x1 - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f3@19-4'::y - IL_0014: ret + IL_0006: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 x4) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 x1) cil managed { .maxstack 6 - .locals init (int32 V_0) - IL_0000: ldarg.0 - IL_0001: ldfld int32 assembly/assembly/'f3@19-4'::x1 - IL_0006: ldarg.0 - IL_0007: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f3@19-4'::y - IL_000c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_0011: add - IL_0012: ldarg.1 - IL_0013: add - IL_0014: stloc.0 - IL_0015: ldloc.0 - IL_0016: newobj instance void assembly/assembly/'f3@20-5'::.ctor(int32) - IL_001b: tail. - IL_001d: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_0022: ret + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_1) + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::f2() + IL_0005: stloc.0 + IL_0006: ldarg.1 + IL_0007: newobj instance void assembly/assembly/'f3@15-2'::.ctor(int32) + IL_000c: stloc.1 + IL_000d: ldloc.0 + IL_000e: ldloc.1 + IL_000f: newobj instance void assembly/assembly/'f3@16-8'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0014: tail. + IL_0016: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_001b: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/assembly/'f3@14-1'::.ctor() + IL_0005: stsfld class assembly/assembly/'f3@14-1' assembly/assembly/'f3@14-1'::@_instance + IL_000a: ret } } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@19-6' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@15-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> binder - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> binder) cil managed + .field public int32 x1 + .method assembly specialname rtspecialname instance void .ctor(int32 x1) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@19-6'::computation - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@19-6'::binder - IL_0014: ret + IL_0008: stfld int32 assembly/assembly/'f3@15-2'::x1 + IL_000d: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg2) cil managed { - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@19-6'::computation - IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@19-6'::binder - IL_000d: tail. - IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0014: ret + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_1) + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::f2() + IL_0005: stloc.0 + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/assembly/'f3@15-2'::x1 + IL_000c: newobj instance void assembly/assembly/'f3@16-3'::.ctor(int32) + IL_0011: stloc.1 + IL_0012: ldloc.0 + IL_0013: ldloc.1 + IL_0014: newobj instance void assembly/assembly/'f3@16-7'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0019: tail. + IL_001b: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_0020: ret } } @@ -357,48 +320,53 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@15-2' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@16-8' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { - .field public int32 x1 - .method assembly specialname rtspecialname instance void .ctor(int32 x1) cil managed + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> binder + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> binder) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld int32 assembly/assembly/'f3@15-2'::x1 - IL_000d: ret + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-8'::computation + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-8'::binder + IL_0014: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg2) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed { - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_1) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::f2() - IL_0005: stloc.0 - IL_0006: ldarg.0 - IL_0007: ldfld int32 assembly/assembly/'f3@15-2'::x1 - IL_000c: newobj instance void assembly/assembly/'f3@16-3'::.ctor(int32) - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldloc.1 - IL_0014: newobj instance void assembly/assembly/'f3@16-7'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0019: tail. - IL_001b: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_0020: ret + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-8'::computation + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-8'::binder + IL_000d: tail. + IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0014: ret } } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@16-8' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@16-9' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation @@ -419,10 +387,10 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-8'::computation + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-9'::computation IL_000d: ldarg.0 IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-8'::binder + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-9'::binder IL_0014: ret } @@ -432,9 +400,9 @@ .maxstack 8 IL_0000: ldarg.1 IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-8'::computation + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-9'::computation IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-8'::binder + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-9'::binder IL_000d: tail. IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, @@ -444,10 +412,10 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@14-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + .class auto ansi serializable sealed nested assembly beforefieldinit f3@16 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { - .field static assembly initonly class assembly/assembly/'f3@14-1' @_instance + .field static assembly initonly class assembly/assembly/f3@16 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -455,11 +423,11 @@ .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() IL_0006: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 x1) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { .maxstack 6 @@ -467,30 +435,74 @@ class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_1) IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::f2() IL_0005: stloc.0 - IL_0006: ldarg.1 - IL_0007: newobj instance void assembly/assembly/'f3@15-2'::.ctor(int32) - IL_000c: stloc.1 - IL_000d: ldloc.0 - IL_000e: ldloc.1 - IL_000f: newobj instance void assembly/assembly/'f3@16-8'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + IL_0006: ldsfld class assembly/assembly/'f3@14-1' assembly/assembly/'f3@14-1'::@_instance + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldloc.1 + IL_000e: newobj instance void assembly/assembly/'f3@16-9'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0014: tail. - IL_0016: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_001b: ret + IL_0013: tail. + IL_0015: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_001a: ret } .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/assembly/'f3@14-1'::.ctor() - IL_0005: stsfld class assembly/assembly/'f3@14-1' assembly/assembly/'f3@14-1'::@_instance + IL_0000: newobj instance void assembly/assembly/f3@16::.ctor() + IL_0005: stsfld class assembly/assembly/f3@16 assembly/assembly/f3@16::@_instance IL_000a: ret } } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@16-9' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@19-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public int32 x1 + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y + .method assembly specialname rtspecialname instance void .ctor(int32 x1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/assembly/'f3@19-4'::x1 + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f3@19-4'::y + IL_0014: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 x4) cil managed + { + + .maxstack 6 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/assembly/'f3@19-4'::x1 + IL_0006: ldarg.0 + IL_0007: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f3@19-4'::y + IL_000c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_0011: add + IL_0012: ldarg.1 + IL_0013: add + IL_0014: stloc.0 + IL_0015: ldloc.0 + IL_0016: newobj instance void assembly/assembly/'f3@20-5'::.ctor(int32) + IL_001b: tail. + IL_001d: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_0022: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@19-6' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation @@ -511,10 +523,10 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-9'::computation + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@19-6'::computation IL_000d: ldarg.0 IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-9'::binder + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@19-6'::binder IL_0014: ret } @@ -524,9 +536,9 @@ .maxstack 8 IL_0000: ldarg.1 IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-9'::computation + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@19-6'::computation IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-9'::binder + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@19-6'::binder IL_000d: tail. IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, @@ -536,47 +548,35 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit f3@16 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@20-5' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { - .field static assembly initonly class assembly/assembly/f3@16 @_instance - .method assembly specialname rtspecialname instance void .ctor() cil managed + .field public int32 z + .method assembly specialname rtspecialname instance void .ctor(int32 z) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() - IL_0006: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { - - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_1) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::f2() - IL_0005: stloc.0 - IL_0006: ldsfld class assembly/assembly/'f3@14-1' assembly/assembly/'f3@14-1'::@_instance - IL_000b: stloc.1 - IL_000c: ldloc.0 - IL_000d: ldloc.1 - IL_000e: newobj instance void assembly/assembly/'f3@16-9'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0013: tail. - IL_0015: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_001a: ret + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/assembly/'f3@20-5'::z + IL_000d: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed { - .maxstack 10 - IL_0000: newobj instance void assembly/assembly/f3@16::.ctor() - IL_0005: stsfld class assembly/assembly/f3@16 assembly/assembly/f3@16::@_instance - IL_000a: ret + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld int32 assembly/assembly/'f3@20-5'::z + IL_0007: tail. + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + !0) + IL_000e: ret } } @@ -603,6 +603,17 @@ IL_0011: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_arg@1() cil managed { @@ -633,6 +644,17 @@ } } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index 8afb27a6f74..851a08cafd7 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOn.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -37,42 +37,6 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .class auto ansi serializable sealed nested assembly beforefieldinit 'f2@10-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> - { - .field public int32 'value' - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(int32 'value') cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld int32 assembly/assembly/'f2@10-1'::'value' - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed - { - - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: ldfld int32 assembly/assembly/'f2@10-1'::'value' - IL_0007: tail. - IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - !0) - IL_000e: ret - } - - } - .class auto ansi serializable sealed nested assembly beforefieldinit f2@5 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { @@ -143,7 +107,7 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@20-5' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f2@10-1' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { .field public int32 'value' @@ -160,7 +124,7 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld int32 assembly/assembly/'f3@20-5'::'value' + IL_0008: stfld int32 assembly/assembly/'f2@10-1'::'value' IL_000d: ret } @@ -170,7 +134,7 @@ .maxstack 8 IL_0000: ldarg.1 IL_0001: ldarg.0 - IL_0002: ldfld int32 assembly/assembly/'f3@20-5'::'value' + IL_0002: ldfld int32 assembly/assembly/'f2@10-1'::'value' IL_0007: tail. IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, !0) @@ -179,19 +143,14 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@19-4' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@14-1' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public int32 x1 - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y - .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@, - int32 x1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y) cil managed + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) @@ -201,91 +160,96 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@19-4'::builder@ - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld int32 assembly/assembly/'f3@19-4'::x1 - IL_0014: ldarg.0 - IL_0015: ldarg.3 - IL_0016: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f3@19-4'::y - IL_001b: ret + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@14-1'::builder@ + IL_000d: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg4) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg1) cil managed { .maxstack 6 .locals init (int32 V_0, - int32 V_1, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_2, - int32 V_3) + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_3) IL_0000: ldarg.1 IL_0001: stloc.0 IL_0002: ldarg.0 - IL_0003: ldfld int32 assembly/assembly/'f3@19-4'::x1 - IL_0008: ldarg.0 - IL_0009: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f3@19-4'::y - IL_000e: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() - IL_0013: add - IL_0014: ldloc.0 - IL_0015: add - IL_0016: stloc.1 - IL_0017: ldarg.0 - IL_0018: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@19-4'::builder@ - IL_001d: stloc.2 - IL_001e: ldloc.1 - IL_001f: stloc.3 - IL_0020: ldloc.3 - IL_0021: newobj instance void assembly/assembly/'f3@20-5'::.ctor(int32) - IL_0026: tail. - IL_0028: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_002d: ret + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@14-1'::builder@ + IL_0008: stloc.1 + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::f2() + IL_000e: stloc.2 + IL_000f: ldarg.0 + IL_0010: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@14-1'::builder@ + IL_0015: ldloc.0 + IL_0016: newobj instance void assembly/assembly/'f3@15-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder, + int32) + IL_001b: stloc.3 + IL_001c: ldloc.2 + IL_001d: ldloc.3 + IL_001e: newobj instance void assembly/assembly/'f3@16-8'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0023: tail. + IL_0025: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_002a: ret } } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@19-6' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@15-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> binder + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> binder) cil managed + .field public int32 x1 + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@, int32 x1) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@19-6'::computation + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@15-2'::builder@ IL_000d: ldarg.0 IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@19-6'::binder + IL_000f: stfld int32 assembly/assembly/'f3@15-2'::x1 IL_0014: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg2) cil managed { - .maxstack 8 + .maxstack 6 + .locals init (int32 V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_3) IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@19-6'::computation - IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@19-6'::binder - IL_000d: tail. - IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0014: ret + IL_0001: stloc.0 + IL_0002: ldarg.0 + IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@15-2'::builder@ + IL_0008: stloc.1 + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::f2() + IL_000e: stloc.2 + IL_000f: ldarg.0 + IL_0010: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@15-2'::builder@ + IL_0015: ldarg.0 + IL_0016: ldfld int32 assembly/assembly/'f3@15-2'::x1 + IL_001b: newobj instance void assembly/assembly/'f3@16-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder, + int32) + IL_0020: stloc.3 + IL_0021: ldloc.2 + IL_0022: ldloc.3 + IL_0023: newobj instance void assembly/assembly/'f3@16-7'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0028: tail. + IL_002a: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_002f: ret } } @@ -407,65 +371,53 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@15-2' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@16-8' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public int32 x1 - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@, int32 x1) cil managed + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> binder + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> binder) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@15-2'::builder@ + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-8'::computation IL_000d: ldarg.0 IL_000e: ldarg.2 - IL_000f: stfld int32 assembly/assembly/'f3@15-2'::x1 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-8'::binder IL_0014: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg2) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed { - .maxstack 6 - .locals init (int32 V_0, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_1, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_3) + .maxstack 8 IL_0000: ldarg.1 - IL_0001: stloc.0 - IL_0002: ldarg.0 - IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@15-2'::builder@ - IL_0008: stloc.1 - IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::f2() - IL_000e: stloc.2 - IL_000f: ldarg.0 - IL_0010: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@15-2'::builder@ - IL_0015: ldarg.0 - IL_0016: ldfld int32 assembly/assembly/'f3@15-2'::x1 - IL_001b: newobj instance void assembly/assembly/'f3@16-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder, - int32) - IL_0020: stloc.3 - IL_0021: ldloc.2 - IL_0022: ldloc.3 - IL_0023: newobj instance void assembly/assembly/'f3@16-7'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0028: tail. - IL_002a: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_002f: ret + IL_0001: ldarg.0 + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-8'::computation + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-8'::binder + IL_000d: tail. + IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0014: ret } } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@16-8' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@16-9' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation @@ -486,10 +438,10 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-8'::computation + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-9'::computation IL_000d: ldarg.0 IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-8'::binder + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-9'::binder IL_0014: ret } @@ -499,9 +451,9 @@ .maxstack 8 IL_0000: ldarg.1 IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-8'::computation + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-9'::computation IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-8'::binder + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-9'::binder IL_000d: tail. IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, @@ -511,8 +463,8 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@14-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + .class auto ansi serializable sealed nested assembly beforefieldinit f3@16 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -525,46 +477,106 @@ .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@14-1'::builder@ + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f3@16::builder@ IL_000d: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg1) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + { + + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_2) + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f3@16::builder@ + IL_0006: stloc.0 + IL_0007: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::f2() + IL_000c: stloc.1 + IL_000d: ldarg.0 + IL_000e: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f3@16::builder@ + IL_0013: newobj instance void assembly/assembly/'f3@14-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) + IL_0018: stloc.2 + IL_0019: ldloc.1 + IL_001a: ldloc.2 + IL_001b: newobj instance void assembly/assembly/'f3@16-9'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0020: tail. + IL_0022: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_0027: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@19-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .field public int32 x1 + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@, + int32 x1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@19-4'::builder@ + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld int32 assembly/assembly/'f3@19-4'::x1 + IL_0014: ldarg.0 + IL_0015: ldarg.3 + IL_0016: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f3@19-4'::y + IL_001b: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg4) cil managed { .maxstack 6 .locals init (int32 V_0, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_1, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_3) + int32 V_1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_2, + int32 V_3) IL_0000: ldarg.1 IL_0001: stloc.0 IL_0002: ldarg.0 - IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@14-1'::builder@ - IL_0008: stloc.1 - IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::f2() - IL_000e: stloc.2 - IL_000f: ldarg.0 - IL_0010: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@14-1'::builder@ - IL_0015: ldloc.0 - IL_0016: newobj instance void assembly/assembly/'f3@15-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder, - int32) - IL_001b: stloc.3 - IL_001c: ldloc.2 - IL_001d: ldloc.3 - IL_001e: newobj instance void assembly/assembly/'f3@16-8'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0023: tail. - IL_0025: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_002a: ret + IL_0003: ldfld int32 assembly/assembly/'f3@19-4'::x1 + IL_0008: ldarg.0 + IL_0009: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f3@19-4'::y + IL_000e: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_Value() + IL_0013: add + IL_0014: ldloc.0 + IL_0015: add + IL_0016: stloc.1 + IL_0017: ldarg.0 + IL_0018: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/'f3@19-4'::builder@ + IL_001d: stloc.2 + IL_001e: ldloc.1 + IL_001f: stloc.3 + IL_0020: ldloc.3 + IL_0021: newobj instance void assembly/assembly/'f3@20-5'::.ctor(int32) + IL_0026: tail. + IL_0028: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_002d: ret } } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@16-9' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@19-6' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation @@ -585,10 +597,10 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-9'::computation + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@19-6'::computation IL_000d: ldarg.0 IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-9'::binder + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@19-6'::binder IL_0014: ret } @@ -598,9 +610,9 @@ .maxstack 8 IL_0000: ldarg.1 IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-9'::computation + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@19-6'::computation IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-9'::binder + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@19-6'::binder IL_000d: tail. IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, @@ -610,50 +622,38 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit f3@16 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@20-5' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ + .field public int32 'value' .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed + .method assembly specialname rtspecialname instance void .ctor(int32 'value') cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f3@16::builder@ + IL_0008: stfld int32 assembly/assembly/'f3@20-5'::'value' IL_000d: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed { - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_2) - IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f3@16::builder@ - IL_0006: stloc.0 - IL_0007: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::f2() - IL_000c: stloc.1 - IL_000d: ldarg.0 - IL_000e: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder assembly/assembly/f3@16::builder@ - IL_0013: newobj instance void assembly/assembly/'f3@14-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) - IL_0018: stloc.2 - IL_0019: ldloc.1 - IL_001a: ldloc.2 - IL_001b: newobj instance void assembly/assembly/'f3@16-9'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0020: tail. - IL_0022: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_0027: ret + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld int32 assembly/assembly/'f3@20-5'::'value' + IL_0007: tail. + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + !0) + IL_000e: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index 0da6bda6b85..c28dd6c5a73 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -37,39 +37,6 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .class auto ansi serializable sealed nested assembly beforefieldinit 'f2@10-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> - { - .field public int32 z - .method assembly specialname rtspecialname instance void .ctor(int32 z) cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld int32 assembly/assembly/'f2@10-1'::z - IL_000d: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed - { - - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: ldfld int32 assembly/assembly/'f2@10-1'::z - IL_0007: tail. - IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - !0) - IL_000e: ret - } - - } - .class auto ansi serializable sealed nested assembly beforefieldinit f2@5 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { @@ -134,7 +101,7 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@20-5' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f2@10-1' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { .field public int32 z @@ -148,7 +115,7 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld int32 assembly/assembly/'f3@20-5'::z + IL_0008: stfld int32 assembly/assembly/'f2@10-1'::z IL_000d: ret } @@ -158,7 +125,7 @@ .maxstack 8 IL_0000: ldarg.1 IL_0001: ldarg.0 - IL_0002: ldfld int32 assembly/assembly/'f3@20-5'::z + IL_0002: ldfld int32 assembly/assembly/'f2@10-1'::z IL_0007: tail. IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, !0) @@ -167,12 +134,11 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@19-4' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@14-1' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { - .field public int32 x1 - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y - .method assembly specialname rtspecialname instance void .ctor(int32 x1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y) cil managed + .field static assembly initonly class assembly/assembly/'f3@14-1' @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) @@ -180,80 +146,77 @@ .maxstack 8 IL_0000: ldarg.0 IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld int32 assembly/assembly/'f3@19-4'::x1 - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f3@19-4'::y - IL_0014: ret + IL_0006: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 x4) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 x1) cil managed { .maxstack 6 - .locals init (int32 V_0) - IL_0000: ldarg.0 - IL_0001: ldfld int32 assembly/assembly/'f3@19-4'::x1 - IL_0006: ldarg.0 - IL_0007: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f3@19-4'::y - IL_000c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() - IL_0011: add - IL_0012: ldarg.1 - IL_0013: add - IL_0014: stloc.0 - IL_0015: ldloc.0 - IL_0016: newobj instance void assembly/assembly/'f3@20-5'::.ctor(int32) - IL_001b: tail. - IL_001d: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_0022: ret + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_1) + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::f2() + IL_0005: stloc.0 + IL_0006: ldarg.1 + IL_0007: newobj instance void assembly/assembly/'f3@15-2'::.ctor(int32) + IL_000c: stloc.1 + IL_000d: ldloc.0 + IL_000e: ldloc.1 + IL_000f: newobj instance void assembly/assembly/'f3@16-8'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0014: tail. + IL_0016: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_001b: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/assembly/'f3@14-1'::.ctor() + IL_0005: stsfld class assembly/assembly/'f3@14-1' assembly/assembly/'f3@14-1'::@_instance + IL_000a: ret } } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@19-6' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@15-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> binder - .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> binder) cil managed + .field public int32 x1 + .method assembly specialname rtspecialname instance void .ctor(int32 x1) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@19-6'::computation - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@19-6'::binder - IL_0014: ret + IL_0008: stfld int32 assembly/assembly/'f3@15-2'::x1 + IL_000d: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg2) cil managed { - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@19-6'::computation - IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@19-6'::binder - IL_000d: tail. - IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0014: ret + .maxstack 6 + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_1) + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::f2() + IL_0005: stloc.0 + IL_0006: ldarg.0 + IL_0007: ldfld int32 assembly/assembly/'f3@15-2'::x1 + IL_000c: newobj instance void assembly/assembly/'f3@16-3'::.ctor(int32) + IL_0011: stloc.1 + IL_0012: ldloc.0 + IL_0013: ldloc.1 + IL_0014: newobj instance void assembly/assembly/'f3@16-7'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0019: tail. + IL_001b: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_0020: ret } } @@ -357,48 +320,53 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@15-2' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@16-8' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { - .field public int32 x1 - .method assembly specialname rtspecialname instance void .ctor(int32 x1) cil managed + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> binder + .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> binder) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld int32 assembly/assembly/'f3@15-2'::x1 - IL_000d: ret + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-8'::computation + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-8'::binder + IL_0014: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 _arg2) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed { - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_1) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::f2() - IL_0005: stloc.0 - IL_0006: ldarg.0 - IL_0007: ldfld int32 assembly/assembly/'f3@15-2'::x1 - IL_000c: newobj instance void assembly/assembly/'f3@16-3'::.ctor(int32) - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldloc.1 - IL_0014: newobj instance void assembly/assembly/'f3@16-7'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0019: tail. - IL_001b: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_0020: ret + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-8'::computation + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-8'::binder + IL_000d: tail. + IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0014: ret } } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@16-8' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@16-9' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation @@ -419,10 +387,10 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-8'::computation + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-9'::computation IL_000d: ldarg.0 IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-8'::binder + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-9'::binder IL_0014: ret } @@ -432,9 +400,9 @@ .maxstack 8 IL_0000: ldarg.1 IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-8'::computation + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-9'::computation IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-8'::binder + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-9'::binder IL_000d: tail. IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, @@ -444,10 +412,10 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@14-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + .class auto ansi serializable sealed nested assembly beforefieldinit f3@16 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { - .field static assembly initonly class assembly/assembly/'f3@14-1' @_instance + .field static assembly initonly class assembly/assembly/f3@16 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -455,11 +423,11 @@ .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() IL_0006: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 x1) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { .maxstack 6 @@ -467,30 +435,74 @@ class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_1) IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::f2() IL_0005: stloc.0 - IL_0006: ldarg.1 - IL_0007: newobj instance void assembly/assembly/'f3@15-2'::.ctor(int32) - IL_000c: stloc.1 - IL_000d: ldloc.0 - IL_000e: ldloc.1 - IL_000f: newobj instance void assembly/assembly/'f3@16-8'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + IL_0006: ldsfld class assembly/assembly/'f3@14-1' assembly/assembly/'f3@14-1'::@_instance + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldloc.1 + IL_000e: newobj instance void assembly/assembly/'f3@16-9'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0014: tail. - IL_0016: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_001b: ret + IL_0013: tail. + IL_0015: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_001a: ret } .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/assembly/'f3@14-1'::.ctor() - IL_0005: stsfld class assembly/assembly/'f3@14-1' assembly/assembly/'f3@14-1'::@_instance + IL_0000: newobj instance void assembly/assembly/f3@16::.ctor() + IL_0005: stsfld class assembly/assembly/f3@16 assembly/assembly/f3@16::@_instance IL_000a: ret } } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@16-9' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@19-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public int32 x1 + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y + .method assembly specialname rtspecialname instance void .ctor(int32 x1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y) cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/assembly/'f3@19-4'::x1 + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f3@19-4'::y + IL_0014: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(int32 x4) cil managed + { + + .maxstack 6 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: ldfld int32 assembly/assembly/'f3@19-4'::x1 + IL_0006: ldarg.0 + IL_0007: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 assembly/assembly/'f3@19-4'::y + IL_000c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1::get_contents() + IL_0011: add + IL_0012: ldarg.1 + IL_0013: add + IL_0014: stloc.0 + IL_0015: ldloc.0 + IL_0016: newobj instance void assembly/assembly/'f3@20-5'::.ctor(int32) + IL_001b: tail. + IL_001d: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_0022: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@19-6' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation @@ -511,10 +523,10 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-9'::computation + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@19-6'::computation IL_000d: ldarg.0 IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-9'::binder + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@19-6'::binder IL_0014: ret } @@ -524,9 +536,9 @@ .maxstack 8 IL_0000: ldarg.1 IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@16-9'::computation + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly/'f3@19-6'::computation IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@16-9'::binder + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> assembly/assembly/'f3@19-6'::binder IL_000d: tail. IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, @@ -536,47 +548,35 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit f3@16 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + .class auto ansi serializable sealed nested assembly beforefieldinit 'f3@20-5' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { - .field static assembly initonly class assembly/assembly/f3@16 @_instance - .method assembly specialname rtspecialname instance void .ctor() cil managed + .field public int32 z + .method assembly specialname rtspecialname instance void .ctor(int32 z) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() - IL_0006: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { - - .maxstack 6 - .locals init (class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_1) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::f2() - IL_0005: stloc.0 - IL_0006: ldsfld class assembly/assembly/'f3@14-1' assembly/assembly/'f3@14-1'::@_instance - IL_000b: stloc.1 - IL_000c: ldloc.0 - IL_000d: ldloc.1 - IL_000e: newobj instance void assembly/assembly/'f3@16-9'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0013: tail. - IL_0015: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_001a: ret + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld int32 assembly/assembly/'f3@20-5'::z + IL_000d: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed { - .maxstack 10 - IL_0000: newobj instance void assembly/assembly/f3@16::.ctor() - IL_0005: stsfld class assembly/assembly/f3@16 assembly/assembly/f3@16::@_instance - IL_000a: ret + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld int32 assembly/assembly/'f3@20-5'::z + IL_0007: tail. + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::Success(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + !0) + IL_000e: ret } } @@ -607,31 +607,31 @@ IL_0011: ret } - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_arg@1() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::arg@1 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret } - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_computation@22() cil managed + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_arg@1() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::computation@22 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::arg@1 IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 get_computation@22() cil managed { .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly::init@ - IL_0006: ldsfld int32 ''.$assembly::init@ - IL_000b: pop - IL_000c: ret + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 assembly/assembly::computation@22 + IL_0005: ret } .method assembly static void staticInitialization@() cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Default.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Default.fs.RealInternalSignatureOff.il.bsl index 7ab702c8659..1e915100715 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Default.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Default.fs.RealInternalSignatureOff.il.bsl @@ -59,6 +59,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$M::init@ + IL_0006: ldsfld int32 ''.$M::init@ + IL_000b: pop + IL_000c: ret + } + .property int32 T() { .custom instance void M/ExportAttribute::.ctor() = ( 01 00 00 00 ) @@ -100,4 +111,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Default.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Default.fs.RealInternalSignatureOn.il.bsl index eb9b96288bf..5fec34b0076 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Default.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Default.fs.RealInternalSignatureOn.il.bsl @@ -116,4 +116,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Field.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Field.fs.RealInternalSignatureOff.il.bsl index 0ef01952cf6..29e80779a01 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Field.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Field.fs.RealInternalSignatureOff.il.bsl @@ -59,6 +59,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$M::init@ + IL_0006: ldsfld int32 ''.$M::init@ + IL_000b: pop + IL_000c: ret + } + .property int32 T() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -99,4 +110,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Field.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Field.fs.RealInternalSignatureOn.il.bsl index b57d01a963c..16dcf5c782a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Field.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Field.fs.RealInternalSignatureOn.il.bsl @@ -115,4 +115,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Property.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Property.fs.RealInternalSignatureOff.il.bsl index ba73193b92b..2b7b9cbdf2d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Property.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Property.fs.RealInternalSignatureOff.il.bsl @@ -59,6 +59,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$M::init@ + IL_0006: ldsfld int32 ''.$M::init@ + IL_000b: pop + IL_000c: ret + } + .property int32 T() { .custom instance void M/ExportAttribute::.ctor() = ( 01 00 00 00 ) @@ -99,4 +110,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Property.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Property.fs.RealInternalSignatureOn.il.bsl index cb933d99b4a..f83d147e91a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Property.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/AttributeTargets/Property.fs.RealInternalSignatureOn.il.bsl @@ -115,4 +115,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.RealInternalSignatureOff.il.netcore.bsl index ef7653c9e65..51e728c847c 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.RealInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.RealInternalSignatureOff.il.netcore.bsl @@ -517,6 +517,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property class assembly/C e2() { .get class assembly/C assembly::get_e2() @@ -546,4 +557,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.RealInternalSignatureOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.RealInternalSignatureOn.il.netcore.bsl index 5178c62e41d..4161d72b62e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.RealInternalSignatureOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01a.fs.RealInternalSignatureOn.il.netcore.bsl @@ -532,4 +532,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02a.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02a.fs.RealInternalSignatureOff.il.bsl index 3f56fe7dec5..61cdc64bbfe 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02a.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02a.fs.RealInternalSignatureOff.il.bsl @@ -73,6 +73,17 @@ IL_0006: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property int32 x() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -89,6 +100,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property int32 y() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -141,4 +163,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02a.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02a.fs.RealInternalSignatureOn.il.bsl index 9504bb02af9..84a6d81c0c9 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02a.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02a.fs.RealInternalSignatureOn.il.bsl @@ -176,4 +176,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03a.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03a.fs.RealInternalSignatureOff.il.bsl index 1bf6de34036..74efcd2f771 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03a.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03a.fs.RealInternalSignatureOff.il.bsl @@ -69,6 +69,17 @@ IL_0006: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property int32 x() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -101,4 +112,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03a.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03a.fs.RealInternalSignatureOn.il.bsl index 97a5efc842e..2a4c9ccd2cb 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03a.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03a.fs.RealInternalSignatureOn.il.bsl @@ -120,4 +120,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04a.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04a.fs.RealInternalSignatureOff.il.bsl index 3fe818badb4..1ec6654801f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04a.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04a.fs.RealInternalSignatureOff.il.bsl @@ -33,6 +33,17 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$Program::init@ + IL_0006: ldsfld int32 ''.$Program::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$Program @@ -72,6 +83,17 @@ IL_0001: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property int32 x() { .get int32 assembly::get_x() @@ -101,4 +123,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOff.il.netcore.bsl index be57eb1b539..df694992a70 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOff.il.netcore.bsl @@ -329,6 +329,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$Program::init@ + IL_0006: ldsfld int32 ''.$Program::init@ + IL_000b: pop + IL_000c: ret + } + .property class Program/ITestInterface a() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -364,4 +375,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOn.il.netcore.bsl index d2a0b799b03..df2b88bcb6f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.fs.RealInternalSignatureOn.il.netcore.bsl @@ -380,4 +380,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute06.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute06.fs.il.bsl index 3827e0c166e..4926775502c 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute06.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute06.fs.il.bsl @@ -111,4 +111,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute07.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute07.fs.il.bsl index 6f9307db070..1e59226953b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute07.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/CompiledNameAttribute/CompiledNameAttribute07.fs.il.bsl @@ -108,4 +108,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeArrays.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeArrays.fs.il.bsl index 89c764be9d5..58769d891c2 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeArrays.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeArrays.fs.il.bsl @@ -139,10 +139,10 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f34@48-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + .class auto ansi serializable sealed nested assembly beforefieldinit 'f34@48-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { - .field static assembly initonly class assembly/'f34@48-1' @_instance + .field static assembly initonly class assembly/'f34@48-2' @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -150,33 +150,35 @@ .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() IL_0006: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit x) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 x) cil managed { .maxstack 8 IL_0000: ldarg.1 - IL_0001: ret + IL_0001: tail. + IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Identity>(!!0) + IL_0008: ret } .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/'f34@48-1'::.ctor() - IL_0005: stsfld class assembly/'f34@48-1' assembly/'f34@48-1'::@_instance + IL_0000: newobj instance void assembly/'f34@48-2'::.ctor() + IL_0005: stsfld class assembly/'f34@48-2' assembly/'f34@48-2'::@_instance IL_000a: ret } } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f34@48-2' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + .class auto ansi serializable sealed nested assembly beforefieldinit 'f34@48-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { - .field static assembly initonly class assembly/'f34@48-2' @_instance + .field static assembly initonly class assembly/'f34@48-1' @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -184,26 +186,24 @@ .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() IL_0006: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 x) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit x) cil managed { .maxstack 8 IL_0000: ldarg.1 - IL_0001: tail. - IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Identity>(!!0) - IL_0008: ret + IL_0001: ret } .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/'f34@48-2'::.ctor() - IL_0005: stsfld class assembly/'f34@48-2' assembly/'f34@48-2'::@_instance + IL_0000: newobj instance void assembly/'f34@48-1'::.ctor() + IL_0005: stsfld class assembly/'f34@48-1' assembly/'f34@48-1'::@_instance IL_000a: ret } @@ -279,10 +279,10 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f35@49-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + .class auto ansi serializable sealed nested assembly beforefieldinit 'f35@49-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { - .field static assembly initonly class assembly/'f35@49-1' @_instance + .field static assembly initonly class assembly/'f35@49-2' @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -290,33 +290,35 @@ .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() IL_0006: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit x) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 x) cil managed { .maxstack 8 IL_0000: ldarg.1 - IL_0001: ret + IL_0001: tail. + IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Identity>(!!0) + IL_0008: ret } .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/'f35@49-1'::.ctor() - IL_0005: stsfld class assembly/'f35@49-1' assembly/'f35@49-1'::@_instance + IL_0000: newobj instance void assembly/'f35@49-2'::.ctor() + IL_0005: stsfld class assembly/'f35@49-2' assembly/'f35@49-2'::@_instance IL_000a: ret } } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f35@49-2' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + .class auto ansi serializable sealed nested assembly beforefieldinit 'f35@49-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { - .field static assembly initonly class assembly/'f35@49-2' @_instance + .field static assembly initonly class assembly/'f35@49-1' @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -324,26 +326,24 @@ .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() IL_0006: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 x) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit x) cil managed { .maxstack 8 IL_0000: ldarg.1 - IL_0001: tail. - IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Identity>(!!0) - IL_0008: ret + IL_0001: ret } .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/'f35@49-2'::.ctor() - IL_0005: stsfld class assembly/'f35@49-2' assembly/'f35@49-2'::@_instance + IL_0000: newobj instance void assembly/'f35@49-1'::.ctor() + IL_0005: stsfld class assembly/'f35@49-1' assembly/'f35@49-1'::@_instance IL_000a: ret } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeLists.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeLists.fs.il.bsl index 4f629775f5f..95778a716bd 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeLists.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeLists.fs.il.bsl @@ -139,10 +139,10 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f34@48-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + .class auto ansi serializable sealed nested assembly beforefieldinit 'f34@48-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { - .field static assembly initonly class assembly/'f34@48-1' @_instance + .field static assembly initonly class assembly/'f34@48-2' @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -150,33 +150,35 @@ .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() IL_0006: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit x) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 x) cil managed { .maxstack 8 IL_0000: ldarg.1 - IL_0001: ret + IL_0001: tail. + IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Identity>(!!0) + IL_0008: ret } .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/'f34@48-1'::.ctor() - IL_0005: stsfld class assembly/'f34@48-1' assembly/'f34@48-1'::@_instance + IL_0000: newobj instance void assembly/'f34@48-2'::.ctor() + IL_0005: stsfld class assembly/'f34@48-2' assembly/'f34@48-2'::@_instance IL_000a: ret } } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f34@48-2' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + .class auto ansi serializable sealed nested assembly beforefieldinit 'f34@48-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { - .field static assembly initonly class assembly/'f34@48-2' @_instance + .field static assembly initonly class assembly/'f34@48-1' @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -184,26 +186,24 @@ .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() IL_0006: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 x) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit x) cil managed { .maxstack 8 IL_0000: ldarg.1 - IL_0001: tail. - IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Identity>(!!0) - IL_0008: ret + IL_0001: ret } .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/'f34@48-2'::.ctor() - IL_0005: stsfld class assembly/'f34@48-2' assembly/'f34@48-2'::@_instance + IL_0000: newobj instance void assembly/'f34@48-1'::.ctor() + IL_0005: stsfld class assembly/'f34@48-1' assembly/'f34@48-1'::@_instance IL_000a: ret } @@ -279,10 +279,10 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f35@49-1' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + .class auto ansi serializable sealed nested assembly beforefieldinit 'f35@49-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { - .field static assembly initonly class assembly/'f35@49-1' @_instance + .field static assembly initonly class assembly/'f35@49-2' @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -290,33 +290,35 @@ .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() IL_0006: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit x) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 x) cil managed { .maxstack 8 IL_0000: ldarg.1 - IL_0001: ret + IL_0001: tail. + IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Identity>(!!0) + IL_0008: ret } .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/'f35@49-1'::.ctor() - IL_0005: stsfld class assembly/'f35@49-1' assembly/'f35@49-1'::@_instance + IL_0000: newobj instance void assembly/'f35@49-2'::.ctor() + IL_0005: stsfld class assembly/'f35@49-2' assembly/'f35@49-2'::@_instance IL_000a: ret } } - .class auto ansi serializable sealed nested assembly beforefieldinit 'f35@49-2' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + .class auto ansi serializable sealed nested assembly beforefieldinit 'f35@49-1' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { - .field static assembly initonly class assembly/'f35@49-2' @_instance + .field static assembly initonly class assembly/'f35@49-1' @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -324,26 +326,24 @@ .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() IL_0006: ret } - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 x) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit x) cil managed { .maxstack 8 IL_0000: ldarg.1 - IL_0001: tail. - IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Identity>(!!0) - IL_0008: ret + IL_0001: ret } .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 10 - IL_0000: newobj instance void assembly/'f35@49-2'::.ctor() - IL_0005: stsfld class assembly/'f35@49-2' assembly/'f35@49-2'::@_instance + IL_0000: newobj instance void assembly/'f35@49-1'::.ctor() + IL_0005: stsfld class assembly/'f35@49-1' assembly/'f35@49-1'::@_instance IL_000a: ret } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/Int32RangeArrays.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/Int32RangeArrays.fs.il.bsl index d8aaef6ffbc..296b02ebf58 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/Int32RangeArrays.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/Int32RangeArrays.fs.il.bsl @@ -1796,4 +1796,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/Int32RangeLists.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/Int32RangeLists.fs.il.bsl index c4c1db5bb91..fdcf9dd08c4 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/Int32RangeLists.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/Int32RangeLists.fs.il.bsl @@ -1547,4 +1547,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/UInt64RangeArrays.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/UInt64RangeArrays.fs.il.bsl index e0320085bcd..d50273c36de 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/UInt64RangeArrays.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/UInt64RangeArrays.fs.il.bsl @@ -1951,4 +1951,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/UInt64RangeLists.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/UInt64RangeLists.fs.il.bsl index 65744637ab8..1bb59ac9eaa 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/UInt64RangeLists.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/UInt64RangeLists.fs.il.bsl @@ -1628,4 +1628,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface.fs.il.bsl index 8d223fff20c..73af99edeb0 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface.fs.il.bsl @@ -104,4 +104,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.fs.il.bsl index c439ae9b1b1..91481830abe 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_ArrayOfArray_FSInterface_NoExtMeth.fs.il.bsl @@ -87,4 +87,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface.fs.il.bsl index 0b35213466f..f7cbeeb6b02 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface.fs.il.bsl @@ -102,4 +102,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface_NoExtMeth.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface_NoExtMeth.fs.il.bsl index 48f577f072f..8bcc33b2aa9 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface_NoExtMeth.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_Array_FSInterface_NoExtMeth.fs.il.bsl @@ -85,4 +85,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface.fs.il.bsl index 2f7d56c3a9d..5e026991e9c 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface.fs.il.bsl @@ -104,4 +104,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.fs.il.bsl index 74224d35c49..ea97c1e7f78 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_MDArray_FSInterface_NoExtMeth.fs.il.bsl @@ -87,4 +87,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface.fs.il.bsl index 1b954a5c9ea..31d678a4f39 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface.fs.il.bsl @@ -100,4 +100,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.fs.il.bsl index eab8271500a..d5be30fbb20 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DoNotBoxStruct/DoNotBoxStruct_NoArray_FSInterface_NoExtMeth.fs.il.bsl @@ -85,4 +85,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index d305143ead3..80e2a4f1d50 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -466,4 +466,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index d305143ead3..80e2a4f1d50 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnList01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -466,4 +466,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index 8d223d6ca9f..9440d145706 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -552,4 +552,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index 8d223d6ca9f..9440d145706 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachOnString01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -552,4 +552,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index df7b56e13f8..b0691e9559d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -628,6 +628,17 @@ IL_0024: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property uint8 c() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -661,4 +672,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index f10f144f5cc..e0f43b270ab 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepByte.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -680,4 +680,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index b2824784341..8b94fdb75b8 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -796,6 +796,17 @@ IL_002c: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property char c() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -829,4 +840,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index 81396774e43..50a3f476ff7 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepChar.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -848,4 +848,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index 628165edfea..2a97f9a3b25 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -723,6 +723,17 @@ IL_001a: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property int16 c() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -756,4 +767,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index cb0bd92d8d6..f8cdf262b63 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt16.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -775,4 +775,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index 992a64864a1..33204da6325 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -681,6 +681,17 @@ IL_001d: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property int32 c() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -714,4 +725,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index f65e3f97bad..ba7684d9aa7 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt32.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -733,4 +733,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index 9be7a6cbaff..75c5d04dc5c 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -950,6 +950,17 @@ IL_001f: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property int64 c() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -984,4 +995,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index 378b0758025..7c1adf75f7e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepInt64.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -1003,4 +1003,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index 06c7e11d37f..c87d61e2f7b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -1536,6 +1536,17 @@ IL_026d: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property native int c() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -1570,4 +1581,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index a1d0492b76f..9a11b773648 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepIntPtr.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -1589,4 +1589,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index 7bd29ca5924..20815a1b616 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -723,6 +723,17 @@ IL_001a: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property int8 c() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -756,4 +767,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index 3dcae825c6e..9ca19636e71 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepSByte.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -775,4 +775,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index a1b13604890..2945ed260c6 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -628,6 +628,17 @@ IL_0024: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property uint16 c() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -661,4 +672,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index bf4d1e52575..bc082ab2b2d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt16.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -680,4 +680,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index fbd82ef4e4f..bf539ff2117 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -664,6 +664,17 @@ IL_0024: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property uint32 c() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -697,4 +708,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index 5a6f29425c3..6d118456035 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt32.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -716,4 +716,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index 1d5051f93fd..74909b40ccd 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -812,6 +812,17 @@ IL_002c: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property uint64 c() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -846,4 +857,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index d310b85c868..3c3369fbe0d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUInt64.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -865,4 +865,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index 6ceba7f8ec1..976be7fea1f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -1063,6 +1063,17 @@ IL_006b: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property native uint c() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -1097,4 +1108,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index 7a1bcf5b575..6588f80e72f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStepUIntPtr.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -1116,4 +1116,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index 6bce777c8fa..f558cf76f4a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -673,6 +673,17 @@ IL_001f: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property int64 c() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -707,4 +718,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index 9e36a79c6d4..abc5add502d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForEachRangeStep_UnitsOfMeasure.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -726,4 +726,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index cf3ef015691..f08af7710eb 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -33,6 +33,17 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -112,4 +123,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 2bf9dad6f1d..622117ef020 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -33,6 +33,17 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -77,4 +88,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl index 12bb35f1380..fb9f5fbfc61 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl @@ -105,6 +105,17 @@ IL_005f: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property class [runtime]System.Collections.Generic.List`1 ra() { @@ -160,4 +171,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl index 01f427a0326..78759db5639 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop03.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl @@ -176,4 +176,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 4edad64c336..0be399a18b3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -49,6 +49,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property int32[] r() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -172,4 +183,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index ddebf7d47c5..d51b2a347c7 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -49,6 +49,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property int32[] r() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -163,4 +174,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index a3d63ed6c68..13309be980d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -185,4 +185,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index 749adbce6db..f0b6be25416 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -182,4 +182,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 5e796c3ffd9..40d8009185f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -49,6 +49,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property int32[] r() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -172,4 +183,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index 7960127a11a..a4495601207 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -49,6 +49,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property int32[] r() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -161,4 +172,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index 4b86fe9dda7..85704b048ae 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -185,4 +185,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index d166df1349e..ca93064f44d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd02.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -180,4 +180,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 850034154d8..a17a3890ea2 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -49,6 +49,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property int32[] r() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -223,4 +234,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index e6ad100692a..045b5f377a2 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -49,21 +49,23 @@ IL_0005: ret } - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_current@9() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::current@9 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret } - .method assembly specialname static void set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_current@9() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::current@9 - IL_0006: ret + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::current@9 + IL_0005: ret } .method assembly specialname static int32 get_e1@1() cil managed @@ -90,6 +92,15 @@ IL_0005: ret } + .method assembly specialname static void set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::current@9 + IL_0006: ret + } + .method assembly specialname static void set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed { @@ -291,4 +302,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index fd4594b88ce..c96be5bfb7d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -236,4 +236,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index 1dc60a2932b..7ed41ef1863 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd03.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -61,21 +61,23 @@ IL_0005: ret } - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_current@9() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::current@9 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret } - .method assembly specialname static void set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_current@9() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::current@9 - IL_0006: ret + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::current@9 + IL_0005: ret } .method assembly specialname static int32 get_e1@1() cil managed @@ -102,24 +104,22 @@ IL_0005: ret } - .method assembly specialname static void set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed + .method assembly specialname static void set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed { .maxstack 8 IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::next@9 + IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::current@9 IL_0006: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method assembly specialname static void set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed { .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly::init@ - IL_0006: ldsfld int32 ''.$assembly::init@ - IL_000b: pop - IL_000c: ret + IL_0000: ldarg.0 + IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::next@9 + IL_0006: ret } .method assembly static void staticInitialization@() cil managed @@ -310,4 +310,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 0bef72ae5ab..940601ba3af 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -49,6 +49,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property int32[] r() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -223,4 +234,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index 47edca14f0e..c0b4bbc971a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -49,21 +49,23 @@ IL_0005: ret } - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_current@9() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::current@9 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret } - .method assembly specialname static void set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_current@9() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::current@9 - IL_0006: ret + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::current@9 + IL_0005: ret } .method assembly specialname static int32 get_e1@1() cil managed @@ -90,6 +92,15 @@ IL_0005: ret } + .method assembly specialname static void set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::current@9 + IL_0006: ret + } + .method assembly specialname static void set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed { @@ -291,4 +302,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index a894133f442..aaf6391e9ef 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -236,4 +236,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index dd30e3d3ab6..1fd784523fe 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd04.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -61,21 +61,23 @@ IL_0005: ret } - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_current@9() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::current@9 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret } - .method assembly specialname static void set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_current@9() cil managed { .maxstack 8 - IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::current@9 - IL_0006: ret + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::current@9 + IL_0005: ret } .method assembly specialname static int32 get_e1@1() cil managed @@ -102,24 +104,22 @@ IL_0005: ret } - .method assembly specialname static void set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed + .method assembly specialname static void set_current@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed { .maxstack 8 IL_0000: ldarg.0 - IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::next@9 + IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::current@9 IL_0006: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method assembly specialname static void set_next@9(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'value') cil managed { .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly::init@ - IL_0006: ldsfld int32 ''.$assembly::init@ - IL_000b: pop - IL_000c: ret + IL_0000: ldarg.0 + IL_0001: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 assembly::next@9 + IL_0006: ret } .method assembly static void staticInitialization@() cil managed @@ -310,4 +310,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index f5c3b19dc7e..cfa9ad7e684 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -49,6 +49,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property int32[] r() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -213,4 +224,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index c5f058d0325..80daa1a1628 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -49,6 +49,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property int32[] r() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -202,4 +213,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index e98b90a8c6e..1258fe9ad7a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -226,4 +226,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index 267d6527954..7a4f2d9df2f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/NonTrivialBranchingBindingInEnd05.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -221,4 +221,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOff.il.bsl index 498cd175ff4..dba10ebe322 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GeneratedIterators/GenIter04.fs.RealInternalSignatureOff.il.bsl @@ -41,6 +41,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 squaresOfOneToTenD() { diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare05.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare05.fsx.il.netcore.bsl index 484615a9743..b98c9ddc388 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare05.fsx.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare05.fsx.il.netcore.bsl @@ -619,4 +619,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare06.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare06.fsx.il.netcore.bsl index 802c00a1190..2508047d3e2 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare06.fsx.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare06.fsx.il.netcore.bsl @@ -519,4 +519,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare07.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare07.fsx.il.netcore.bsl index 5e0aaa1474d..44f407ff0f5 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare07.fsx.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare07.fsx.il.netcore.bsl @@ -664,4 +664,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare10.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare10.fsx.il.netcore.bsl index d54fa9cadb2..b808bb5c8cf 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare10.fsx.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Compare10.fsx.il.netcore.bsl @@ -1287,4 +1287,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals04.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals04.fsx.il.netcore.bsl index 6bbb561c91f..269cd12033f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals04.fsx.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals04.fsx.il.netcore.bsl @@ -621,4 +621,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals05.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals05.fsx.il.netcore.bsl index fa2ecef0c8d..0adb717b0fb 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals05.fsx.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals05.fsx.il.netcore.bsl @@ -521,4 +521,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals06.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals06.fsx.il.netcore.bsl index ddfa94e890c..991fd4420a1 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals06.fsx.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals06.fsx.il.netcore.bsl @@ -666,4 +666,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals09.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals09.fsx.il.netcore.bsl index 76b0b2c3059..ff95b70a375 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals09.fsx.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals09.fsx.il.netcore.bsl @@ -1289,4 +1289,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals10.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals10.fsx.il.netcore.bsl index 1d15587c215..461277175ca 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals10.fsx.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals10.fsx.il.netcore.bsl @@ -357,6 +357,17 @@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct y@1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret + } + .method assembly specialname static bool get_arg@1() cil managed { @@ -381,17 +392,6 @@ IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly$fsx::init@ - IL_0006: ldsfld int32 ''.$assembly$fsx::init@ - IL_000b: pop - IL_000c: ret - } - .method assembly static void staticInitialization@() cil managed { @@ -477,4 +477,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals11.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals11.fsx.il.netcore.bsl index 00bdf966b88..631771810ec 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals11.fsx.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals11.fsx.il.netcore.bsl @@ -447,6 +447,17 @@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion y@1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret + } + .method assembly specialname static bool get_arg@1() cil managed { @@ -471,17 +482,6 @@ IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly$fsx::init@ - IL_0006: ldsfld int32 ''.$assembly$fsx::init@ - IL_000b: pop - IL_000c: ret - } - .method assembly static void staticInitialization@() cil managed { @@ -567,4 +567,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals12.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals12.fsx.il.netcore.bsl index 3417bbfd3bc..1f3f2033e65 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals12.fsx.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals12.fsx.il.netcore.bsl @@ -391,6 +391,17 @@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord y@1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret + } + .method assembly specialname static bool get_arg@1() cil managed { @@ -415,17 +426,6 @@ IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly$fsx::init@ - IL_0006: ldsfld int32 ''.$assembly$fsx::init@ - IL_000b: pop - IL_000c: ret - } - .method assembly static void staticInitialization@() cil managed { @@ -511,4 +511,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals13.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals13.fsx.il.netcore.bsl index 8daa2678cb6..87890bf7a8b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals13.fsx.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals13.fsx.il.netcore.bsl @@ -383,6 +383,17 @@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericStruct`1 y@1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret + } + .method assembly specialname static bool get_arg@1() cil managed { @@ -407,17 +418,6 @@ IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly$fsx::init@ - IL_0006: ldsfld int32 ''.$assembly$fsx::init@ - IL_000b: pop - IL_000c: ret - } - .method assembly static void staticInitialization@() cil managed { @@ -503,4 +503,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals14.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals14.fsx.il.netcore.bsl index 541e25c5210..4a31a0a552e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals14.fsx.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals14.fsx.il.netcore.bsl @@ -473,6 +473,17 @@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericUnion`1 y@1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret + } + .method assembly specialname static bool get_arg@1() cil managed { @@ -497,17 +508,6 @@ IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly$fsx::init@ - IL_0006: ldsfld int32 ''.$assembly$fsx::init@ - IL_000b: pop - IL_000c: ret - } - .method assembly static void staticInitialization@() cil managed { @@ -593,4 +593,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals15.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals15.fsx.il.netcore.bsl index 38b3610d0c2..b3040c76e60 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals15.fsx.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals15.fsx.il.netcore.bsl @@ -417,6 +417,17 @@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeGenericRecord`1 y@1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret + } + .method assembly specialname static bool get_arg@1() cil managed { @@ -441,17 +452,6 @@ IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly$fsx::init@ - IL_0006: ldsfld int32 ''.$assembly$fsx::init@ - IL_000b: pop - IL_000c: ret - } - .method assembly static void staticInitialization@() cil managed { @@ -537,4 +537,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals16.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals16.fsx.il.netcore.bsl index 4d34d84ee61..44f6bf684a0 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals16.fsx.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals16.fsx.il.netcore.bsl @@ -357,6 +357,17 @@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeStruct y@1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret + } + .method assembly specialname static bool get_arg@1() cil managed { @@ -381,17 +392,6 @@ IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly$fsx::init@ - IL_0006: ldsfld int32 ''.$assembly$fsx::init@ - IL_000b: pop - IL_000c: ret - } - .method assembly static void staticInitialization@() cil managed { @@ -477,4 +477,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals17.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals17.fsx.il.netcore.bsl index 3004404175c..65907bef5cc 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals17.fsx.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals17.fsx.il.netcore.bsl @@ -447,6 +447,17 @@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeUnion y@1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret + } + .method assembly specialname static bool get_arg@1() cil managed { @@ -471,17 +482,6 @@ IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly$fsx::init@ - IL_0006: ldsfld int32 ''.$assembly$fsx::init@ - IL_000b: pop - IL_000c: ret - } - .method assembly static void staticInitialization@() cil managed { @@ -567,4 +567,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals18.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals18.fsx.il.netcore.bsl index a40baefd7b8..53079beecb8 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals18.fsx.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals18.fsx.il.netcore.bsl @@ -391,6 +391,17 @@ .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly valuetype assembly/EqualsMicroPerfAndCodeGenerationTests/SomeRecord y@1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret + } + .method assembly specialname static bool get_arg@1() cil managed { @@ -415,17 +426,6 @@ IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly$fsx::init@ - IL_0006: ldsfld int32 ''.$assembly$fsx::init@ - IL_000b: pop - IL_000c: ret - } - .method assembly static void staticInitialization@() cil managed { @@ -511,4 +511,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals19.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals19.fsx.il.netcore.bsl index 0ab471358a7..a5e83913b7b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals19.fsx.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals19.fsx.il.netcore.bsl @@ -294,4 +294,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals20.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals20.fsx.il.netcore.bsl index 71b3b15fa81..796ea51eeaf 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals20.fsx.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals20.fsx.il.netcore.bsl @@ -380,4 +380,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals21.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals21.fsx.il.netcore.bsl index 3eff5ac1ef0..842fdec589e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals21.fsx.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Equals21.fsx.il.netcore.bsl @@ -321,4 +321,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash05.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash05.fsx.il.netcore.bsl index f9e22be61db..a94aa573f7d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash05.fsx.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash05.fsx.il.netcore.bsl @@ -608,4 +608,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash06.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash06.fsx.il.netcore.bsl index bb7fc91850f..260c9035b72 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash06.fsx.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash06.fsx.il.netcore.bsl @@ -607,4 +607,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash08.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash08.fsx.il.netcore.bsl index 1c205a5c30e..3129d9eaa6f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash08.fsx.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash08.fsx.il.netcore.bsl @@ -509,4 +509,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash09.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash09.fsx.il.netcore.bsl index bdf6761def2..37126c5d1cd 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash09.fsx.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash09.fsx.il.netcore.bsl @@ -652,4 +652,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash12.fsx.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash12.fsx.il.netcore.bsl index f793cde348f..5d5e079cd2b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash12.fsx.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/GenericComparison/Hash12.fsx.il.netcore.bsl @@ -1268,4 +1268,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/EmptyStringPattern.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/EmptyStringPattern.fs.il.bsl index 955786e3027..0d1c3c137a5 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/EmptyStringPattern.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/EmptyStringPattern.fs.il.bsl @@ -274,4 +274,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/FSharpDelegateBetaReduction.fs.RealInternalSignature.Optimize.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/FSharpDelegateBetaReduction.fs.RealInternalSignature.Optimize.il.bsl index 5c03f90dab8..c0c3c6077e2 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/FSharpDelegateBetaReduction.fs.RealInternalSignature.Optimize.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/FSharpDelegateBetaReduction.fs.RealInternalSignature.Optimize.il.bsl @@ -244,4 +244,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/FSharpDelegateBetaReduction.fs.RealInternalSignature.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/FSharpDelegateBetaReduction.fs.RealInternalSignature.OptimizeOff.il.bsl index af56908af03..5f5b8a4bdff 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/FSharpDelegateBetaReduction.fs.RealInternalSignature.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/FSharpDelegateBetaReduction.fs.RealInternalSignature.OptimizeOff.il.bsl @@ -274,4 +274,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOff.il.netcore.bsl index b9a5590952e..0dddc8c3978 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOff.il.netcore.bsl @@ -1423,4 +1423,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.netcore.bsl index b0035f72dbc..29b2e35c409 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match01.fs.RealInternalSignatureOn.il.netcore.bsl @@ -1517,4 +1517,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match02.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match02.fs.il.bsl index 0f1626fff22..a0e64e5ca14 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match02.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/Match02.fs.il.bsl @@ -111,4 +111,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/StructUnion01.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/StructUnion01.fs.il.netcore.bsl index 9780ed57c0f..d771d59d4f7 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/StructUnion01.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Inlining/StructUnion01.fs.il.netcore.bsl @@ -701,4 +701,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping01.fs.RealInternalSignatureOff.il.bsl index 0dfceccba6e..f10f1d975d9 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping01.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping01.fs.RealInternalSignatureOff.il.bsl @@ -52,6 +52,28 @@ IL_0011: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$ListExpressionSteppingTest1::init@ + IL_0006: ldsfld int32 ''.$ListExpressionSteppingTest1::init@ + IL_000b: pop + IL_000c: ret + } + + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$ListExpressionSteppingTest1::init@ + IL_0006: ldsfld int32 ''.$ListExpressionSteppingTest1::init@ + IL_000b: pop + IL_000c: ret } } @@ -79,4 +101,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping01.fs.RealInternalSignatureOn.il.bsl index fc5d4434b9a..985da1044e2 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping01.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping01.fs.RealInternalSignatureOn.il.bsl @@ -117,4 +117,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping02.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping02.fs.RealInternalSignatureOff.il.bsl index 7a50c265dd9..14e30f148c9 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping02.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping02.fs.RealInternalSignatureOff.il.bsl @@ -433,6 +433,28 @@ IL_0112: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$ListExpressionSteppingTest2::init@ + IL_0006: ldsfld int32 ''.$ListExpressionSteppingTest2::init@ + IL_000b: pop + IL_000c: ret + } + + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$ListExpressionSteppingTest2::init@ + IL_0006: ldsfld int32 ''.$ListExpressionSteppingTest2::init@ + IL_000b: pop + IL_000c: ret } } @@ -463,4 +485,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping02.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping02.fs.RealInternalSignatureOn.il.bsl index 26ec5854761..2ae44ed7974 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping02.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping02.fs.RealInternalSignatureOn.il.bsl @@ -501,4 +501,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping03.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping03.fs.RealInternalSignatureOff.il.bsl index 009cebb2cda..6dea70d0894 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping03.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping03.fs.RealInternalSignatureOff.il.bsl @@ -73,6 +73,28 @@ IL_0045: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$ListExpressionSteppingTest3::init@ + IL_0006: ldsfld int32 ''.$ListExpressionSteppingTest3::init@ + IL_000b: pop + IL_000c: ret + } + + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$ListExpressionSteppingTest3::init@ + IL_0006: ldsfld int32 ''.$ListExpressionSteppingTest3::init@ + IL_000b: pop + IL_000c: ret } } @@ -100,4 +122,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping03.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping03.fs.RealInternalSignatureOn.il.bsl index 9f874ba7ebc..ab0fb11829c 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping03.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping03.fs.RealInternalSignatureOn.il.bsl @@ -138,4 +138,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping04.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping04.fs.RealInternalSignatureOff.il.bsl index f8a4c0b081e..06d3b0388b4 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping04.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping04.fs.RealInternalSignatureOff.il.bsl @@ -84,6 +84,28 @@ IL_0057: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$ListExpressionSteppingTest4::init@ + IL_0006: ldsfld int32 ''.$ListExpressionSteppingTest4::init@ + IL_000b: pop + IL_000c: ret + } + + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$ListExpressionSteppingTest4::init@ + IL_0006: ldsfld int32 ''.$ListExpressionSteppingTest4::init@ + IL_000b: pop + IL_000c: ret } } @@ -111,4 +133,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping04.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping04.fs.RealInternalSignatureOn.il.bsl index a716e0adf03..9eb2c20d736 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping04.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping04.fs.RealInternalSignatureOn.il.bsl @@ -149,4 +149,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping05.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping05.fs.RealInternalSignatureOff.il.bsl index 1dffe4c39ee..7e5aa337250 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping05.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping05.fs.RealInternalSignatureOff.il.bsl @@ -104,6 +104,28 @@ IL_0072: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$ListExpressionSteppingTest5::init@ + IL_0006: ldsfld int32 ''.$ListExpressionSteppingTest5::init@ + IL_000b: pop + IL_000c: ret + } + + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$ListExpressionSteppingTest5::init@ + IL_0006: ldsfld int32 ''.$ListExpressionSteppingTest5::init@ + IL_000b: pop + IL_000c: ret } } @@ -131,4 +153,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping05.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping05.fs.RealInternalSignatureOn.il.bsl index 727f8dd69b6..078421873c6 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping05.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping05.fs.RealInternalSignatureOn.il.bsl @@ -169,4 +169,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping06.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping06.fs.RealInternalSignatureOff.il.bsl index 9bec0718be2..11f7928f0d1 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping06.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping06.fs.RealInternalSignatureOff.il.bsl @@ -150,6 +150,17 @@ IL_00b2: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$ListExpressionSteppingTest6::init@ + IL_0006: ldsfld int32 ''.$ListExpressionSteppingTest6::init@ + IL_000b: pop + IL_000c: ret + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 es() { @@ -158,6 +169,17 @@ } } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$ListExpressionSteppingTest6::init@ + IL_0006: ldsfld int32 ''.$ListExpressionSteppingTest6::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$ListExpressionSteppingTest6 @@ -199,4 +221,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping06.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping06.fs.RealInternalSignatureOn.il.bsl index bac169986c3..6485db1a259 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping06.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/ListExpressionStepping/ListExpressionStepping06.fs.RealInternalSignatureOn.il.bsl @@ -234,4 +234,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/AbstractClass.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/AbstractClass.fs.RealInternalSignatureOff.il.bsl index fbcb5dd52cd..dd0ebd224a2 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/AbstractClass.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/AbstractClass.fs.RealInternalSignatureOff.il.bsl @@ -71,6 +71,17 @@ } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -97,4 +108,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index ab00b682e5f..95067647297 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -282,6 +282,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 alist() { diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index 849ee7b5fc0..a3c92ea5cae 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -287,43 +287,46 @@ IL_0005: ret } - .method assembly specialname static int32 get_arg_0@30() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld int32 ''.$assembly::arg_0@30 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret } - .method assembly specialname static int32 get_arg_1@30() cil managed + .method assembly specialname static int32 get_arg_0@30() cil managed { .maxstack 8 - IL_0000: ldsfld int32 ''.$assembly::arg_1@30 + IL_0000: ldsfld int32 ''.$assembly::arg_0@30 IL_0005: ret } - .method assembly specialname static int32 get_arg_2@30() cil managed + .method assembly specialname static int32 'get_arg_0@34-1'() cil managed { .maxstack 8 - IL_0000: ldsfld int32 ''.$assembly::arg_2@30 + IL_0000: ldsfld int32 ''.$assembly::'arg_0@34-1' IL_0005: ret } - .method assembly specialname static int32 get_arg_3@30() cil managed + .method assembly specialname static int32 'get_arg_0@38-2'() cil managed { .maxstack 8 - IL_0000: ldsfld int32 ''.$assembly::arg_3@30 + IL_0000: ldsfld int32 ''.$assembly::'arg_0@38-2' IL_0005: ret } - .method assembly specialname static int32 'get_arg_0@34-1'() cil managed + .method assembly specialname static int32 get_arg_1@30() cil managed { .maxstack 8 - IL_0000: ldsfld int32 ''.$assembly::'arg_0@34-1' + IL_0000: ldsfld int32 ''.$assembly::arg_1@30 IL_0005: ret } @@ -335,27 +338,27 @@ IL_0005: ret } - .method assembly specialname static int32 'get_arg_2@34-1'() cil managed + .method assembly specialname static int32 'get_arg_1@38-2'() cil managed { .maxstack 8 - IL_0000: ldsfld int32 ''.$assembly::'arg_2@34-1' + IL_0000: ldsfld int32 ''.$assembly::'arg_1@38-2' IL_0005: ret } - .method assembly specialname static int32 'get_arg_0@38-2'() cil managed + .method assembly specialname static int32 get_arg_2@30() cil managed { .maxstack 8 - IL_0000: ldsfld int32 ''.$assembly::'arg_0@38-2' + IL_0000: ldsfld int32 ''.$assembly::arg_2@30 IL_0005: ret } - .method assembly specialname static int32 'get_arg_1@38-2'() cil managed + .method assembly specialname static int32 'get_arg_2@34-1'() cil managed { .maxstack 8 - IL_0000: ldsfld int32 ''.$assembly::'arg_1@38-2' + IL_0000: ldsfld int32 ''.$assembly::'arg_2@34-1' IL_0005: ret } @@ -367,6 +370,14 @@ IL_0005: ret } + .method assembly specialname static int32 get_arg_3@30() cil managed + { + + .maxstack 8 + IL_0000: ldsfld int32 ''.$assembly::arg_3@30 + IL_0005: ret + } + .method assembly specialname static int32 'get_arg_3@38-1'() cil managed { diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index ed4376c76a3..bfe068a618d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CodeGenRenamings01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -331,43 +331,46 @@ IL_0005: ret } - .method assembly specialname static int32 get_arg_0@30() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld int32 assembly::arg_0@30 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret } - .method assembly specialname static int32 get_arg_1@30() cil managed + .method assembly specialname static int32 get_arg_0@30() cil managed { .maxstack 8 - IL_0000: ldsfld int32 assembly::arg_1@30 + IL_0000: ldsfld int32 assembly::arg_0@30 IL_0005: ret } - .method assembly specialname static int32 get_arg_2@30() cil managed + .method assembly specialname static int32 'get_arg_0@34-1'() cil managed { .maxstack 8 - IL_0000: ldsfld int32 assembly::arg_2@30 + IL_0000: ldsfld int32 assembly::'arg_0@34-1' IL_0005: ret } - .method assembly specialname static int32 get_arg_3@30() cil managed + .method assembly specialname static int32 'get_arg_0@38-2'() cil managed { .maxstack 8 - IL_0000: ldsfld int32 assembly::arg_3@30 + IL_0000: ldsfld int32 assembly::'arg_0@38-2' IL_0005: ret } - .method assembly specialname static int32 'get_arg_0@34-1'() cil managed + .method assembly specialname static int32 get_arg_1@30() cil managed { .maxstack 8 - IL_0000: ldsfld int32 assembly::'arg_0@34-1' + IL_0000: ldsfld int32 assembly::arg_1@30 IL_0005: ret } @@ -379,27 +382,27 @@ IL_0005: ret } - .method assembly specialname static int32 'get_arg_2@34-1'() cil managed + .method assembly specialname static int32 'get_arg_1@38-2'() cil managed { .maxstack 8 - IL_0000: ldsfld int32 assembly::'arg_2@34-1' + IL_0000: ldsfld int32 assembly::'arg_1@38-2' IL_0005: ret } - .method assembly specialname static int32 'get_arg_0@38-2'() cil managed + .method assembly specialname static int32 get_arg_2@30() cil managed { .maxstack 8 - IL_0000: ldsfld int32 assembly::'arg_0@38-2' + IL_0000: ldsfld int32 assembly::arg_2@30 IL_0005: ret } - .method assembly specialname static int32 'get_arg_1@38-2'() cil managed + .method assembly specialname static int32 'get_arg_2@34-1'() cil managed { .maxstack 8 - IL_0000: ldsfld int32 assembly::'arg_1@38-2' + IL_0000: ldsfld int32 assembly::'arg_2@34-1' IL_0005: ret } @@ -411,23 +414,20 @@ IL_0005: ret } - .method assembly specialname static int32 'get_arg_3@38-1'() cil managed + .method assembly specialname static int32 get_arg_3@30() cil managed { .maxstack 8 - IL_0000: ldsfld int32 assembly::'arg_3@38-1' + IL_0000: ldsfld int32 assembly::arg_3@30 IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method assembly specialname static int32 'get_arg_3@38-1'() cil managed { .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly::init@ - IL_0006: ldsfld int32 ''.$assembly::init@ - IL_000b: pop - IL_000c: ret + IL_0000: ldsfld int32 assembly::'arg_3@38-1' + IL_0005: ret } .method assembly static void staticInitialization@() cil managed diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CustomAttributeGenericParameter01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CustomAttributeGenericParameter01.fs.RealInternalSignatureOff.il.bsl index c8b1d12f394..d1f73dce564 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CustomAttributeGenericParameter01.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CustomAttributeGenericParameter01.fs.RealInternalSignatureOff.il.bsl @@ -43,6 +43,17 @@ IL_0001: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$M::init@ + IL_0006: ldsfld int32 ''.$M::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$M @@ -69,4 +80,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CustomAttributeGenericParameter01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CustomAttributeGenericParameter01.fs.RealInternalSignatureOn.il.bsl index a49706b87bf..fcecb00dc01 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CustomAttributeGenericParameter01.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/CustomAttributeGenericParameter01.fs.RealInternalSignatureOn.il.bsl @@ -88,4 +88,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Decimal01.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Decimal01.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl index 62859362114..fafc53ef82b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Decimal01.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Decimal01.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl @@ -38,6 +38,17 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Decimal01.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Decimal01.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl index 62859362114..fafc53ef82b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Decimal01.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Decimal01.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl @@ -38,6 +38,17 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/EntryPoint01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/EntryPoint01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index efcc71e6692..d050eaa0da5 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/EntryPoint01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/EntryPoint01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -70,6 +70,17 @@ IL_0024: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property int32 static_initializer() { .get int32 assembly::get_static_initializer() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl index efa5c7b3402..cdfe44ece75 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl @@ -393,6 +393,17 @@ IL_0009: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl index c100e0b3b4c..efec036dfbb 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GeneralizationOnUnions01.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl @@ -342,6 +342,17 @@ IL_0001: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GenericTypeStaticField.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GenericTypeStaticField.fs.il.bsl index a320f73520a..4d0b406b177 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GenericTypeStaticField.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/GenericTypeStaticField.fs.il.bsl @@ -164,4 +164,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/IfThenElse01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/IfThenElse01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index f9c75893b0c..c2a82b311fd 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/IfThenElse01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/IfThenElse01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -161,6 +161,28 @@ IL_002a: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/LetIfThenElse01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/LetIfThenElse01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 7ca778a5170..7240252c1e6 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/LetIfThenElse01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/LetIfThenElse01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -116,6 +116,17 @@ IL_007f: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/LetIfThenElse01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/LetIfThenElse01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index 83be9e49788..fa99d81051f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/LetIfThenElse01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/LetIfThenElse01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -156,6 +156,17 @@ IL_00b5: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .method assembly specialname static class [runtime]System.Tuple`4 get_arg@1() cil managed { diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/LetIfThenElse01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/LetIfThenElse01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index 5139e7470eb..5b39752a7f8 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/LetIfThenElse01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/LetIfThenElse01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -158,14 +158,6 @@ IL_00b5: ret } - .method assembly specialname static class [runtime]System.Tuple`4 get_arg@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [runtime]System.Tuple`4 assembly::arg@1 - IL_0005: ret - } - .method private specialname rtspecialname static void .cctor() cil managed { @@ -177,6 +169,14 @@ IL_000c: ret } + .method assembly specialname static class [runtime]System.Tuple`4 get_arg@1() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [runtime]System.Tuple`4 assembly::arg@1 + IL_0005: ret + } + .method assembly static void staticInitialization@() cil managed { diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 1e2b6f38e6e..51ae16c11c2 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -46,6 +46,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property object o() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -106,4 +117,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index 2ef3f3a8402..dd367828c65 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -46,6 +46,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .method assembly specialname static bool get_lockTaken@1() cil managed { diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index f108d21da06..f28b2e59eb8 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -122,4 +122,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index 7a9bb4b693b..a87af3e6c84 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -50,6 +50,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .method assembly specialname static bool get_lockTaken@1() cil managed { @@ -67,17 +78,6 @@ IL_0006: ret } - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly::init@ - IL_0006: ldsfld int32 ''.$assembly::init@ - IL_000b: pop - IL_000c: ret - } - .method assembly static void staticInitialization@() cil managed { diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Marshal.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Marshal.fs.il.bsl index 20f672ac9c6..ddfc8610312 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Marshal.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Marshal.fs.il.bsl @@ -79,4 +79,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/MethodImplNoInline02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/MethodImplNoInline02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 0168c04c588..9556f4d6a00 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/MethodImplNoInline02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/MethodImplNoInline02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -53,6 +53,17 @@ IL_0007: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -78,4 +89,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/MethodImplNoInline02.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/MethodImplNoInline02.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index 144d0a4644b..d9382cc2375 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/MethodImplNoInline02.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/MethodImplNoInline02.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -63,6 +63,17 @@ IL_0007: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ModuleWithExpression01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ModuleWithExpression01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 373d7a5d236..3bdcf566717 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ModuleWithExpression01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ModuleWithExpression01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -47,12 +47,34 @@ IL_0001: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property int32 x() { .get int32 assembly/M::get_x() } } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ModuleWithExpression01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ModuleWithExpression01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index e091389ab0a..9bf7f39c304 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ModuleWithExpression01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ModuleWithExpression01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -42,14 +42,6 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 get_format@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 ''.$assembly::format@1 - IL_0005: ret - } - .method public specialname static int32 get_x() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -60,6 +52,25 @@ IL_0001: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 get_format@1() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 ''.$assembly::format@1 + IL_0005: ret + } + .property class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 format@1() { @@ -72,6 +83,17 @@ } } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ModuleWithExpression01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ModuleWithExpression01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index 61d9e45d495..af88c146f9f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ModuleWithExpression01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/ModuleWithExpression01.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -44,14 +44,6 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) .field static assembly class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 format@1 .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 get_format@1() cil managed - { - - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 assembly/M::format@1 - IL_0005: ret - } - .method public specialname static int32 get_x() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -73,6 +65,14 @@ IL_000c: ret } + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 get_format@1() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 assembly/M::format@1 + IL_0005: ret + } + .method assembly static void staticInitialization@() cil managed { diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/NoBoxingOnDispose01.fs.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/NoBoxingOnDispose01.fs.il.net472.bsl index ee8bc9d10c3..6cc68854c66 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/NoBoxingOnDispose01.fs.il.net472.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/NoBoxingOnDispose01.fs.il.net472.bsl @@ -49,32 +49,33 @@ .maxstack 3 .locals init (valuetype [runtime]System.Collections.Generic.List`1/Enumerator V_0, !!T V_1) - IL_0000: ldarg.0 - IL_0001: callvirt instance valuetype [runtime]System.Collections.Generic.List`1/Enumerator class [runtime]System.Collections.Generic.List`1::GetEnumerator() - IL_0006: stloc.0 + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: callvirt instance valuetype [runtime]System.Collections.Generic.List`1/Enumerator class [runtime]System.Collections.Generic.List`1::GetEnumerator() + IL_0007: stloc.0 .try { - IL_0007: br.s IL_0012 + IL_0008: br.s IL_0013 - IL_0009: ldloca.s V_0 - IL_000b: call instance !0 valuetype [runtime]System.Collections.Generic.List`1/Enumerator::get_Current() - IL_0010: stloc.1 - IL_0011: nop - IL_0012: ldloca.s V_0 - IL_0014: call instance bool valuetype [runtime]System.Collections.Generic.List`1/Enumerator::MoveNext() - IL_0019: brtrue.s IL_0009 + IL_000a: ldloca.s V_0 + IL_000c: call instance !0 valuetype [runtime]System.Collections.Generic.List`1/Enumerator::get_Current() + IL_0011: stloc.1 + IL_0012: nop + IL_0013: ldloca.s V_0 + IL_0015: call instance bool valuetype [runtime]System.Collections.Generic.List`1/Enumerator::MoveNext() + IL_001a: brtrue.s IL_000a - IL_001b: leave.s IL_002b + IL_001c: leave.s IL_002c } finally { - IL_001d: ldloca.s V_0 - IL_001f: constrained. valuetype [runtime]System.Collections.Generic.List`1/Enumerator - IL_0025: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_002a: endfinally + IL_001e: ldloca.s V_0 + IL_0020: constrained. valuetype [runtime]System.Collections.Generic.List`1/Enumerator + IL_0026: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_002b: endfinally } - IL_002b: ret + IL_002c: ret } } diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Seq_for_all01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Seq_for_all01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 1d660278c37..291f56bd2eb 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Seq_for_all01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Seq_for_all01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -87,6 +87,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property bool q() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Seq_for_all01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Seq_for_all01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index 996f6bdcd62..399fbb63ce9 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Seq_for_all01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Seq_for_all01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -75,6 +75,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property bool q() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructsAsArrayElements01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructsAsArrayElements01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index ea02ea3faa3..d0d67b68c96 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructsAsArrayElements01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructsAsArrayElements01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -268,6 +268,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property valuetype assembly/T[] a() { diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructsAsArrayElements01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructsAsArrayElements01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index 4ed7709d2b6..f4ed47b495a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructsAsArrayElements01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/StructsAsArrayElements01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -242,6 +242,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property valuetype assembly/T[] a() { diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/TryWith_NoFilterBlocks01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/TryWith_NoFilterBlocks01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 587aef43477..82e50b558f4 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/TryWith_NoFilterBlocks01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/TryWith_NoFilterBlocks01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -33,6 +33,17 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/TryWith_NoFilterBlocks01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/TryWith_NoFilterBlocks01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index 838a4fb04cd..37570b01a95 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/TryWith_NoFilterBlocks01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/TryWith_NoFilterBlocks01.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -33,6 +33,17 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/AnonRecords.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/AnonRecords.fs.il.netcore.bsl index 6f206900757..ca0edb45312 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/AnonRecords.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/AnonRecords.fs.il.netcore.bsl @@ -734,4 +734,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/CurriedFunctions.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/CurriedFunctions.fs.il.netcore.bsl index 06213bbc349..314fda43681 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/CurriedFunctions.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/CurriedFunctions.fs.il.netcore.bsl @@ -134,4 +134,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/CustomType.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/CustomType.fs.il.netcore.bsl index afd3f407622..2afd53e796d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/CustomType.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/CustomType.fs.il.netcore.bsl @@ -297,4 +297,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/GenericCode.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/GenericCode.fs.il.netcore.bsl index ca54c9be1ee..757c223703b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/GenericCode.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/GenericCode.fs.il.netcore.bsl @@ -154,4 +154,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/GenericStructDu.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/GenericStructDu.fs.il.netcore.bsl index 2d1a0e2a233..67dc1134f86 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/GenericStructDu.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/GenericStructDu.fs.il.netcore.bsl @@ -407,4 +407,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ModuleLevelBindings.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ModuleLevelBindings.fs.il.netcore.bsl index af423bc2206..ee76ccff55d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ModuleLevelBindings.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ModuleLevelBindings.fs.il.netcore.bsl @@ -161,4 +161,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ModuleLevelFunctions.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ModuleLevelFunctions.fs.il.netcore.bsl index 394b860e529..f195a888f6a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ModuleLevelFunctions.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ModuleLevelFunctions.fs.il.netcore.bsl @@ -142,4 +142,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ModuleLevelFunctionsOpt.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ModuleLevelFunctionsOpt.fs.il.netcore.bsl index 715faeb6c2c..0e88288efbf 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ModuleLevelFunctionsOpt.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ModuleLevelFunctionsOpt.fs.il.netcore.bsl @@ -139,4 +139,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullAsTrueValue.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullAsTrueValue.fs.il.netcore.bsl index 22a54e3d157..6800062adc7 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullAsTrueValue.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullAsTrueValue.fs.il.netcore.bsl @@ -708,4 +708,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullableDowncasting.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullableDowncasting.fs.il.netcore.bsl index 5589e54be12..e2a37756fcf 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullableDowncasting.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullableDowncasting.fs.il.netcore.bsl @@ -171,4 +171,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullableDowncasting.fs.opt.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullableDowncasting.fs.opt.il.netcore.bsl index a05e6fb269f..c679d87e25d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullableDowncasting.fs.opt.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullableDowncasting.fs.opt.il.netcore.bsl @@ -168,4 +168,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullableInheritance.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullableInheritance.fs.il.netcore.bsl index b2406a789f6..09bfed08e06 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullableInheritance.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/NullableInheritance.fs.il.netcore.bsl @@ -190,4 +190,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/PlainRecord.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/PlainRecord.fs.il.netcore.bsl index 6f624da4f31..72fbd14b5ea 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/PlainRecord.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/PlainRecord.fs.il.netcore.bsl @@ -123,4 +123,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/Records.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/Records.fs.il.netcore.bsl index df085366850..924d4a34a01 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/Records.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/Records.fs.il.netcore.bsl @@ -302,4 +302,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ReferenceDU.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ReferenceDU.fs.il.netcore.bsl index 423360aff64..08364835f7f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ReferenceDU.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/ReferenceDU.fs.il.netcore.bsl @@ -726,4 +726,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/StructDU.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/StructDU.fs.il.netcore.bsl index b77a91ea8c8..3d4ce970bcb 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/StructDU.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/StructDU.fs.il.netcore.bsl @@ -469,4 +469,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/SupportsNull.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/SupportsNull.fs.il.netcore.bsl index 9d9126fe6f2..38c0a71a00f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/SupportsNull.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Nullness/SupportsNull.fs.il.netcore.bsl @@ -209,4 +209,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest01.fs.RealInternalSignatureOff.il.bsl index 8aa5823770f..6a2079712f1 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest01.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest01.fs.RealInternalSignatureOff.il.bsl @@ -183,6 +183,28 @@ IL_0007: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$SeqExpressionSteppingTest1::init@ + IL_0006: ldsfld int32 ''.$SeqExpressionSteppingTest1::init@ + IL_000b: pop + IL_000c: ret + } + + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$SeqExpressionSteppingTest1::init@ + IL_0006: ldsfld int32 ''.$SeqExpressionSteppingTest1::init@ + IL_000b: pop + IL_000c: ret } } @@ -214,4 +236,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest01.fs.RealInternalSignatureOn.il.bsl index e692c0be6fc..4a6f2744a7b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest01.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest01.fs.RealInternalSignatureOn.il.bsl @@ -252,4 +252,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest02.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest02.fs.RealInternalSignatureOff.il.bsl index caa0f3cb2c8..c7227539ac1 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest02.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest02.fs.RealInternalSignatureOff.il.bsl @@ -211,6 +211,28 @@ IL_0007: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$SeqExpressionSteppingTest2::init@ + IL_0006: ldsfld int32 ''.$SeqExpressionSteppingTest2::init@ + IL_000b: pop + IL_000c: ret + } + + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$SeqExpressionSteppingTest2::init@ + IL_0006: ldsfld int32 ''.$SeqExpressionSteppingTest2::init@ + IL_000b: pop + IL_000c: ret } } @@ -242,4 +264,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest02.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest02.fs.RealInternalSignatureOn.il.bsl index a92b1ebd5be..946b78fd0c7 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest02.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest02.fs.RealInternalSignatureOn.il.bsl @@ -280,4 +280,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest03.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest03.fs.RealInternalSignatureOff.il.bsl index 28b90fa0b35..343d20b8427 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest03.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest03.fs.RealInternalSignatureOff.il.bsl @@ -221,6 +221,28 @@ IL_000f: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$SeqExpressionSteppingTest3::init@ + IL_0006: ldsfld int32 ''.$SeqExpressionSteppingTest3::init@ + IL_000b: pop + IL_000c: ret + } + + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$SeqExpressionSteppingTest3::init@ + IL_0006: ldsfld int32 ''.$SeqExpressionSteppingTest3::init@ + IL_000b: pop + IL_000c: ret } } @@ -252,4 +274,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest03.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest03.fs.RealInternalSignatureOn.il.bsl index f1cf30c15a7..4171b844757 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest03.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest03.fs.RealInternalSignatureOn.il.bsl @@ -290,4 +290,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest04.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest04.fs.RealInternalSignatureOff.il.bsl index a6dab7f8f66..11afeda09c5 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest04.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest04.fs.RealInternalSignatureOff.il.bsl @@ -264,6 +264,28 @@ IL_0009: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$SeqExpressionSteppingTest4::init@ + IL_0006: ldsfld int32 ''.$SeqExpressionSteppingTest4::init@ + IL_000b: pop + IL_000c: ret + } + + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$SeqExpressionSteppingTest4::init@ + IL_0006: ldsfld int32 ''.$SeqExpressionSteppingTest4::init@ + IL_000b: pop + IL_000c: ret } } @@ -295,4 +317,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest04.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest04.fs.RealInternalSignatureOn.il.bsl index cad791c94b5..5aa747e203f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest04.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest04.fs.RealInternalSignatureOn.il.bsl @@ -333,4 +333,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest05.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest05.fs.RealInternalSignatureOff.il.bsl index fc33a5f8b50..cb11923aef0 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest05.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest05.fs.RealInternalSignatureOff.il.bsl @@ -373,6 +373,28 @@ IL_0009: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$SeqExpressionSteppingTest5::init@ + IL_0006: ldsfld int32 ''.$SeqExpressionSteppingTest5::init@ + IL_000b: pop + IL_000c: ret + } + + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$SeqExpressionSteppingTest5::init@ + IL_0006: ldsfld int32 ''.$SeqExpressionSteppingTest5::init@ + IL_000b: pop + IL_000c: ret } } @@ -404,4 +426,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest05.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest05.fs.RealInternalSignatureOn.il.bsl index 4c1ae0b7231..368a5445b86 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest05.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest05.fs.RealInternalSignatureOn.il.bsl @@ -442,4 +442,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest06.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest06.fs.RealInternalSignatureOff.il.bsl index 0af1fadae60..e6e666fe061 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest06.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest06.fs.RealInternalSignatureOff.il.bsl @@ -423,6 +423,17 @@ IL_0009: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$SeqExpressionSteppingTest6::init@ + IL_0006: ldsfld int32 ''.$SeqExpressionSteppingTest6::init@ + IL_000b: pop + IL_000c: ret + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 es() { @@ -431,6 +442,17 @@ } } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$SeqExpressionSteppingTest6::init@ + IL_0006: ldsfld int32 ''.$SeqExpressionSteppingTest6::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$SeqExpressionSteppingTest6 diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOff.il.netcore.bsl index 0456f3caab1..0153dd022f4 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest07.fs.RealInternalSignatureOff.il.netcore.bsl @@ -720,6 +720,17 @@ IL_003f: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$SeqExpressionSteppingTest7::init@ + IL_0006: ldsfld int32 ''.$SeqExpressionSteppingTest7::init@ + IL_000b: pop + IL_000c: ret + } + .property int32 r() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls01.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls01.fs.il.bsl index ae0733ddc72..6e1ad0568da 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls01.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls01.fs.il.bsl @@ -235,4 +235,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls02.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls02.fs.il.bsl index 81f8e166fe6..42a5576afa5 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls02.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls02.fs.il.bsl @@ -418,4 +418,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOff.il.netcore.bsl index 9a5a9063329..aa609f7df6b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelModule.fs.RealInternalSignatureOff.il.netcore.bsl @@ -1455,6 +1455,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$ABC::init@ + IL_0006: ldsfld int32 ''.$ABC::init@ + IL_000b: pop + IL_000c: ret + } + .property string greeting() { .get string ABC/ABC::get_greeting() @@ -1483,6 +1494,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$ABC::init@ + IL_0006: ldsfld int32 ''.$ABC::init@ + IL_000b: pop + IL_000c: ret + } + .property string greeting() { .get string ABC::get_greeting() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOff.il.netcore.bsl index d840f0f7404..f355cc4c2bb 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SerializableAttribute/ToplevelNamespace.fs.RealInternalSignatureOff.il.netcore.bsl @@ -2153,6 +2153,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property string greeting() { .get string XYZ.ABC/ABC::get_greeting() @@ -2181,6 +2192,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property string greeting() { .get string XYZ.ABC::get_greeting() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/LetBinding01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/LetBinding01.fs.RealInternalSignatureOff.il.bsl index 579ee33140a..6814ff0d1cb 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/LetBinding01.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/LetBinding01.fs.RealInternalSignatureOff.il.bsl @@ -43,6 +43,17 @@ IL_0001: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property class [FSharp.Core]Microsoft.FSharp.Core.Unit x() { @@ -79,4 +90,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/LetBinding01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/LetBinding01.fs.RealInternalSignatureOn.il.bsl index 7854fcf1877..73601c71e22 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/LetBinding01.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/LetBinding01.fs.RealInternalSignatureOn.il.bsl @@ -97,4 +97,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Class01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Class01.fs.RealInternalSignatureOff.il.bsl index 7777c6d2804..5b5006540c5 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Class01.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Class01.fs.RealInternalSignatureOff.il.bsl @@ -87,6 +87,17 @@ } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$StaticInit_ClassS01::init@ + IL_0006: ldsfld int32 ''.$StaticInit_ClassS01::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$StaticInit_ClassS01 @@ -116,4 +127,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Class01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Class01.fs.RealInternalSignatureOn.il.bsl index 8ebfe4e13b5..e4f2a6f1354 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Class01.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Class01.fs.RealInternalSignatureOn.il.bsl @@ -143,4 +143,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Module01.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Module01.fs.RealInternalSignatureOff.il.bsl index c0006e84789..4e99ee55a1e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Module01.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Module01.fs.RealInternalSignatureOff.il.bsl @@ -57,6 +57,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property int32 y() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -77,6 +88,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property int32 x() { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) @@ -84,6 +106,17 @@ } } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -135,4 +168,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Module01.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Module01.fs.RealInternalSignatureOn.il.bsl index a644436e4ff..84ff40eb40c 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Module01.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Module01.fs.RealInternalSignatureOn.il.bsl @@ -183,4 +183,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Struct01.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Struct01.fs.RealInternalSignatureOff.il.netcore.bsl index f1598e3f5b3..d770d6c4599 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Struct01.fs.RealInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Struct01.fs.RealInternalSignatureOff.il.netcore.bsl @@ -285,6 +285,17 @@ } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -314,4 +325,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Struct01.fs.RealInternalSignatureOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Struct01.fs.RealInternalSignatureOn.il.netcore.bsl index 87a90d3af20..25b4c706b13 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Struct01.fs.RealInternalSignatureOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticInit/StaticInit_Struct01.fs.RealInternalSignatureOn.il.netcore.bsl @@ -341,4 +341,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticOptimizations/String_Enum.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticOptimizations/String_Enum.fs.il.bsl index 740505ce6a7..1af36573396 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticOptimizations/String_Enum.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticOptimizations/String_Enum.fs.il.bsl @@ -540,4 +540,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticOptimizations/String_SignedIntegralTypes.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticOptimizations/String_SignedIntegralTypes.fs.il.bsl index c1470054a4d..e3213942dfd 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticOptimizations/String_SignedIntegralTypes.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/StaticOptimizations/String_SignedIntegralTypes.fs.il.bsl @@ -111,4 +111,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch06.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch06.fs.il.netcore.bsl index 9e9ed20aae2..8d51073814b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch06.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch06.fs.il.netcore.bsl @@ -1,8 +1,8 @@ - - + + .assembly extern runtime { } .assembly extern FSharp.Core { } .assembly extern runtime { } @@ -12,23 +12,23 @@ int32, int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) - - + + .hash algorithm 0x00008004 .ver 0:0:0:0 } .module assembly.exe - + .imagebase {value} .file alignment 0x00000200 .stackreserve 0x00100000 -.subsystem 0x0003 -.corflags 0x00000001 - +.subsystem 0x0003 +.corflags 0x00000001 + + - .class public abstract auto ansi sealed assembly extends [runtime]System.Object @@ -42,15 +42,15 @@ [runtime]System.IComparable, [runtime]System.Collections.IStructuralComparable { - .custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C - 61 79 28 29 2C 6E 71 7D 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C + 61 79 28 29 2C 6E 71 7D 00 00 ) .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) .class abstract auto ansi sealed nested public Tags extends [runtime]System.Object { .field public static literal int32 CaseA = int32(0x00000000) .field public static literal int32 CaseB = int32(0x00000001) - } + } .field assembly initonly int32 _tag .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -66,7 +66,7 @@ .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method private specialname rtspecialname static void .cctor() cil managed { - + .maxstack 8 IL_0000: ldc.i4.0 IL_0001: newobj instance void assembly/Discr::.ctor(int32) @@ -75,16 +75,16 @@ IL_000c: newobj instance void assembly/Discr::.ctor(int32) IL_0011: stsfld class assembly/Discr assembly/Discr::_unique_CaseB IL_0016: ret - } + } .method assembly specialname rtspecialname instance void .ctor(int32 _tag) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 E0 07 00 00 15 53 74 65 70 70 69 6E 67 4D - 61 74 63 68 30 36 2B 44 69 73 63 72 00 00 ) + class [runtime]System.Type) = ( 01 00 E0 07 00 00 15 53 74 65 70 70 69 6E 67 4D + 61 74 63 68 30 36 2B 44 69 73 63 72 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 8 IL_0000: ldarg.0 IL_0001: call instance void [runtime]System.Object::.ctor() @@ -92,7 +92,7 @@ IL_0007: ldarg.1 IL_0008: stfld int32 assembly/Discr::_tag IL_000d: ret - } + } .method public static class assembly/Discr get_CaseA() cil managed { @@ -100,24 +100,24 @@ int32) = ( 01 00 08 00 00 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 8 IL_0000: ldsfld class assembly/Discr assembly/Discr::_unique_CaseA IL_0005: ret - } + } .method public hidebysig instance bool get_IsCaseA() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 8 IL_0000: ldarg.0 IL_0001: call instance int32 assembly/Discr::get_Tag() IL_0006: ldc.i4.0 IL_0007: ceq IL_0009: ret - } + } .method public static class assembly/Discr get_CaseB() cil managed { @@ -125,41 +125,41 @@ int32) = ( 01 00 08 00 00 00 01 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 8 IL_0000: ldsfld class assembly/Discr assembly/Discr::_unique_CaseB IL_0005: ret - } + } .method public hidebysig instance bool get_IsCaseB() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 8 IL_0000: ldarg.0 IL_0001: call instance int32 assembly/Discr::get_Tag() IL_0006: ldc.i4.1 IL_0007: ceq IL_0009: ret - } + } .method public hidebysig instance int32 get_Tag() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 8 IL_0000: ldarg.0 IL_0001: ldfld int32 assembly/Discr::_tag IL_0006: ret - } + } .method assembly hidebysig specialname instance object __DebugDisplay() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 8 IL_0000: ldstr "%+0.8A" IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) @@ -167,12 +167,12 @@ IL_000f: ldarg.0 IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0015: ret - } + } .method public strict virtual instance string ToString() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 8 IL_0000: ldstr "%+A" IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/Discr>::.ctor(string) @@ -180,12 +180,12 @@ IL_000f: ldarg.0 IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0015: ret - } + } .method public hidebysig virtual final instance int32 CompareTo(class assembly/Discr obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 4 .locals init (int32 V_0, int32 V_1) @@ -224,24 +224,24 @@ IL_0025: ldc.i4.0 IL_0026: ret - } + } .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any assembly/Discr IL_0007: callvirt instance int32 assembly/Discr::CompareTo(class assembly/Discr) IL_000c: ret - } + } .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 4 .locals init (class assembly/Discr V_0, int32 V_1, @@ -286,12 +286,12 @@ IL_0036: ldc.i4.0 IL_0037: ret - } + } .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 3 .locals init (int32 V_0) IL_0000: ldarg.0 @@ -305,23 +305,23 @@ IL_000c: ldc.i4.0 IL_000d: ret - } + } .method public hidebysig virtual final instance int32 GetHashCode() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 8 IL_0000: ldarg.0 IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 assembly/Discr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) IL_000b: ret - } + } .method public hidebysig instance bool Equals(class assembly/Discr obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 4 .locals init (class assembly/Discr V_0, int32 V_1, @@ -354,12 +354,12 @@ IL_0021: ldc.i4.0 IL_0022: ceq IL_0024: ret - } + } .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 5 .locals init (class assembly/Discr V_0) IL_0000: ldarg.1 @@ -377,12 +377,12 @@ IL_0013: ldc.i4.0 IL_0014: ret - } + } .method public hidebysig virtual final instance bool Equals(class assembly/Discr obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 4 .locals init (int32 V_0, int32 V_1) @@ -412,12 +412,12 @@ IL_001f: ldc.i4.0 IL_0020: ceq IL_0022: ret - } + } .method public hidebysig virtual final instance bool Equals(object obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 4 .locals init (class assembly/Discr V_0) IL_0000: ldarg.1 @@ -433,7 +433,7 @@ IL_0012: ldc.i4.0 IL_0013: ret - } + } .property instance int32 Tag() { @@ -441,7 +441,7 @@ .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .get instance int32 assembly/Discr::get_Tag() - } + } .property class assembly/Discr CaseA() { @@ -449,14 +449,14 @@ .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .get class assembly/Discr assembly/Discr::get_CaseA() - } + } .property instance bool IsCaseA() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .get instance bool assembly/Discr::get_IsCaseA() - } + } .property class assembly/Discr CaseB() { @@ -464,19 +464,19 @@ .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .get class assembly/Discr assembly/Discr::get_CaseB() - } + } .property instance bool IsCaseB() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .get instance bool assembly/Discr::get_IsCaseB() - } - } + } + } .method public static void funcD(class assembly/Discr n) cil managed { - + .maxstack 8 IL_0000: nop IL_0001: ldarg.0 @@ -493,9 +493,9 @@ IL_0017: ldstr "A" IL_001c: call void [runtime]System.Console::WriteLine(string) IL_0021: ret - } + } -} +} .class private abstract auto ansi sealed ''.$assembly extends [runtime]System.Object @@ -503,15 +503,14 @@ .method public static void main@() cil managed { .entrypoint - + .maxstack 8 IL_0000: ret - } + } + +} + -} - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch07.fs.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch07.fs.il.netcore.bsl index f1b22f33a57..d1471039783 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch07.fs.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch07.fs.il.netcore.bsl @@ -1,8 +1,8 @@ - - + + .assembly extern runtime { } .assembly extern FSharp.Core { } .assembly extern runtime { } @@ -12,23 +12,23 @@ int32, int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 ) - - + + .hash algorithm 0x00008004 .ver 0:0:0:0 } .module assembly.exe - + .imagebase {value} .file alignment 0x00000200 .stackreserve 0x00100000 -.subsystem 0x0003 -.corflags 0x00000001 - +.subsystem 0x0003 +.corflags 0x00000001 + + - .class public abstract auto ansi sealed assembly extends [runtime]System.Object @@ -42,15 +42,15 @@ [runtime]System.IComparable, [runtime]System.Collections.IStructuralComparable { - .custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C - 61 79 28 29 2C 6E 71 7D 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 7B 5F 5F 44 65 62 75 67 44 69 73 70 6C + 61 79 28 29 2C 6E 71 7D 00 00 ) .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 01 00 00 00 00 00 ) .class abstract auto ansi sealed nested public Tags extends [runtime]System.Object { .field public static literal int32 CaseA = int32(0x00000000) .field public static literal int32 CaseB = int32(0x00000001) - } + } .field assembly initonly int32 _tag .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -66,7 +66,7 @@ .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method private specialname rtspecialname static void .cctor() cil managed { - + .maxstack 8 IL_0000: ldc.i4.0 IL_0001: newobj instance void assembly/Discr::.ctor(int32) @@ -75,16 +75,16 @@ IL_000c: newobj instance void assembly/Discr::.ctor(int32) IL_0011: stsfld class assembly/Discr assembly/Discr::_unique_CaseB IL_0016: ret - } + } .method assembly specialname rtspecialname instance void .ctor(int32 _tag) cil managed { .custom instance void [runtime]System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute::.ctor(valuetype [runtime]System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes, - class [runtime]System.Type) = ( 01 00 E0 07 00 00 15 53 74 65 70 70 69 6E 67 4D - 61 74 63 68 30 37 2B 44 69 73 63 72 00 00 ) + class [runtime]System.Type) = ( 01 00 E0 07 00 00 15 53 74 65 70 70 69 6E 67 4D + 61 74 63 68 30 37 2B 44 69 73 63 72 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 8 IL_0000: ldarg.0 IL_0001: call instance void [runtime]System.Object::.ctor() @@ -92,7 +92,7 @@ IL_0007: ldarg.1 IL_0008: stfld int32 assembly/Discr::_tag IL_000d: ret - } + } .method public static class assembly/Discr get_CaseA() cil managed { @@ -100,24 +100,24 @@ int32) = ( 01 00 08 00 00 00 00 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 8 IL_0000: ldsfld class assembly/Discr assembly/Discr::_unique_CaseA IL_0005: ret - } + } .method public hidebysig instance bool get_IsCaseA() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 8 IL_0000: ldarg.0 IL_0001: call instance int32 assembly/Discr::get_Tag() IL_0006: ldc.i4.0 IL_0007: ceq IL_0009: ret - } + } .method public static class assembly/Discr get_CaseB() cil managed { @@ -125,41 +125,41 @@ int32) = ( 01 00 08 00 00 00 01 00 00 00 00 00 ) .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 8 IL_0000: ldsfld class assembly/Discr assembly/Discr::_unique_CaseB IL_0005: ret - } + } .method public hidebysig instance bool get_IsCaseB() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 8 IL_0000: ldarg.0 IL_0001: call instance int32 assembly/Discr::get_Tag() IL_0006: ldc.i4.1 IL_0007: ceq IL_0009: ret - } + } .method public hidebysig instance int32 get_Tag() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 8 IL_0000: ldarg.0 IL_0001: ldfld int32 assembly/Discr::_tag IL_0006: ret - } + } .method assembly hidebysig specialname instance object __DebugDisplay() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 8 IL_0000: ldstr "%+0.8A" IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,string>::.ctor(string) @@ -167,12 +167,12 @@ IL_000f: ldarg.0 IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0015: ret - } + } .method public strict virtual instance string ToString() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 8 IL_0000: ldstr "%+A" IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit,string,string,class assembly/Discr>::.ctor(string) @@ -180,12 +180,12 @@ IL_000f: ldarg.0 IL_0010: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0015: ret - } + } .method public hidebysig virtual final instance int32 CompareTo(class assembly/Discr obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 4 .locals init (int32 V_0, int32 V_1) @@ -224,24 +224,24 @@ IL_0025: ldc.i4.0 IL_0026: ret - } + } .method public hidebysig virtual final instance int32 CompareTo(object obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 8 IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any assembly/Discr IL_0007: callvirt instance int32 assembly/Discr::CompareTo(class assembly/Discr) IL_000c: ret - } + } .method public hidebysig virtual final instance int32 CompareTo(object obj, class [runtime]System.Collections.IComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 4 .locals init (class assembly/Discr V_0, int32 V_1, @@ -286,12 +286,12 @@ IL_0036: ldc.i4.0 IL_0037: ret - } + } .method public hidebysig virtual final instance int32 GetHashCode(class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 3 .locals init (int32 V_0) IL_0000: ldarg.0 @@ -305,23 +305,23 @@ IL_000c: ldc.i4.0 IL_000d: ret - } + } .method public hidebysig virtual final instance int32 GetHashCode() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 8 IL_0000: ldarg.0 IL_0001: call class [runtime]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 assembly/Discr::GetHashCode(class [runtime]System.Collections.IEqualityComparer) IL_000b: ret - } + } .method public hidebysig instance bool Equals(class assembly/Discr obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 4 .locals init (class assembly/Discr V_0, int32 V_1, @@ -354,12 +354,12 @@ IL_0021: ldc.i4.0 IL_0022: ceq IL_0024: ret - } + } .method public hidebysig virtual final instance bool Equals(object obj, class [runtime]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 5 .locals init (class assembly/Discr V_0) IL_0000: ldarg.1 @@ -377,12 +377,12 @@ IL_0013: ldc.i4.0 IL_0014: ret - } + } .method public hidebysig virtual final instance bool Equals(class assembly/Discr obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 4 .locals init (int32 V_0, int32 V_1) @@ -412,12 +412,12 @@ IL_001f: ldc.i4.0 IL_0020: ceq IL_0022: ret - } + } .method public hidebysig virtual final instance bool Equals(object obj) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - + .maxstack 4 .locals init (class assembly/Discr V_0) IL_0000: ldarg.1 @@ -433,7 +433,7 @@ IL_0012: ldc.i4.0 IL_0013: ret - } + } .property instance int32 Tag() { @@ -441,7 +441,7 @@ .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .get instance int32 assembly/Discr::get_Tag() - } + } .property class assembly/Discr CaseA() { @@ -449,14 +449,14 @@ .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .get class assembly/Discr assembly/Discr::get_CaseA() - } + } .property instance bool IsCaseA() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .get instance bool assembly/Discr::get_IsCaseA() - } + } .property class assembly/Discr CaseB() { @@ -464,19 +464,19 @@ .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .get class assembly/Discr assembly/Discr::get_CaseB() - } + } .property instance bool IsCaseB() { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .get instance bool assembly/Discr::get_IsCaseB() - } - } + } + } .method public static void funcE(class assembly/Discr n) cil managed { - + .maxstack 8 IL_0000: nop IL_0001: ldarg.0 @@ -493,9 +493,9 @@ IL_0017: ldstr "B" IL_001c: call void [runtime]System.Console::WriteLine(string) IL_0021: ret - } + } -} +} .class private abstract auto ansi sealed ''.$assembly extends [runtime]System.Object @@ -503,15 +503,14 @@ .method public static void main@() cil managed { .entrypoint - + .maxstack 8 IL_0000: ret - } + } + +} + -} - - - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch09.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch09.fs.il.bsl index def052b75ee..b6b168d9b8b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch09.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SteppingMatch/SteppingMatch09.fs.il.bsl @@ -291,4 +291,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOff.il.bsl index 01f63eb0365..8722740765a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOff.il.bsl @@ -1217,6 +1217,17 @@ IL_0183: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$floatsanddoubles::init@ + IL_0006: ldsfld int32 ''.$floatsanddoubles::init@ + IL_000b: pop + IL_000c: ret + } + .property valuetype floatsanddoubles/Float[] floats() { @@ -1378,4 +1389,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOn.il.bsl index 6f91a072be0..12ce93db3d0 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Structure/FloatsAndDoubles.fs.RealInternalSignatureOn.il.bsl @@ -1388,4 +1388,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 8f996270c45..2436e8b095a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -130,4 +130,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index 8f996270c45..2436e8b095a 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -130,4 +130,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index fa8c139a871..780c1a303c9 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction06.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -147,4 +147,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index b59abd72956..bd2503daa7e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -54,6 +54,17 @@ IL_0001: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property int32 x() { .get int32 assembly::get_x() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index d87afc126cb..fb645018587 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction09b4.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -59,6 +59,17 @@ IL_0001: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property int32 x() { .get int32 assembly::get_x() diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction14.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction14.fs.il.bsl index 8455f3f97ef..35c7ea9a52d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction14.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction14.fs.il.bsl @@ -140,4 +140,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction15.fs.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction15.fs.OptimizeOff.il.bsl index bb424cf3224..6f19c7c068f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction15.fs.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction15.fs.OptimizeOff.il.bsl @@ -117,4 +117,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction15.fs.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction15.fs.OptimizeOn.il.bsl index d8bdd5101a0..2de69415cef 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction15.fs.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction15.fs.OptimizeOn.il.bsl @@ -110,4 +110,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOff.il.netcore.bsl index 2c0d6bf7c1b..3eade8d5470 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOff.il.netcore.bsl @@ -615,4 +615,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOn.il.netcore.bsl index 947e3ebf7aa..75937bfbf4e 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction16.fs.OptimizeOn.il.netcore.bsl @@ -588,4 +588,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOff.il.netcore.bsl index 73ec84dc342..1c9abf8631b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOff.il.netcore.bsl @@ -519,4 +519,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOn.il.netcore.bsl index 2187485370e..20c92517414 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction17.fs.OptimizeOn.il.netcore.bsl @@ -489,4 +489,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction19.fs.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction19.fs.OptimizeOff.il.bsl index e8747679fec..994a1951421 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction19.fs.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction19.fs.OptimizeOff.il.bsl @@ -208,4 +208,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction19.fs.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction19.fs.OptimizeOn.il.bsl index 7d58e14e9df..5976c13d437 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction19.fs.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction19.fs.OptimizeOn.il.bsl @@ -218,4 +218,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction20.fs.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction20.fs.OptimizeOff.il.bsl index 8561b29ba42..d8adc64f048 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction20.fs.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction20.fs.OptimizeOff.il.bsl @@ -234,4 +234,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction20.fs.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction20.fs.OptimizeOn.il.bsl index fd47d9be0a3..bef538662ac 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction20.fs.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction20.fs.OptimizeOn.il.bsl @@ -244,4 +244,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOff.il.netcore.bsl index 2de141eac40..21ea787bcab 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOff.il.netcore.bsl @@ -702,4 +702,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOn.il.netcore.bsl index 3a3fec8a284..2941c500626 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction21.fs.OptimizeOn.il.netcore.bsl @@ -682,4 +682,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOff.il.netcore.bsl index a52189c9300..65e687e78c2 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22.fs.RealInternalSignatureOff.il.netcore.bsl @@ -34,6 +34,17 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -58,4 +69,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOff.il.netcore.bsl index a52189c9300..65e687e78c2 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22b.fs.RealInternalSignatureOff.il.netcore.bsl @@ -34,6 +34,17 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -58,4 +69,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOff.il.netcore.bsl index a52189c9300..65e687e78c2 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22c.fs.RealInternalSignatureOff.il.netcore.bsl @@ -34,6 +34,17 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -58,4 +69,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOff.il.netcore.bsl index a52189c9300..65e687e78c2 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22d.fs.RealInternalSignatureOff.il.netcore.bsl @@ -34,6 +34,17 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -58,4 +69,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOff.il.netcore.bsl index 85706bdfccd..a0826087227 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22e.fs.RealInternalSignatureOff.il.netcore.bsl @@ -34,6 +34,17 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -63,4 +74,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl index f9b2fa31440..af128ccfbd9 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl @@ -39,6 +39,17 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -77,4 +88,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl index b78a9ea4355..a51f33f1268 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22f.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl @@ -39,6 +39,17 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -75,4 +86,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl index 8e50cf1e6de..ae582d5d8b3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl @@ -34,6 +34,17 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -67,4 +78,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl index 3960fe05b8a..35dfc6ff4f2 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction22g.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl @@ -34,6 +34,17 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -59,4 +70,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl index 3314328bdef..5f71759a2c3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl @@ -163,4 +163,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl index 3314328bdef..5f71759a2c3 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl @@ -163,4 +163,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl index 422674eeb50..7fda31a435f 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction23.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl @@ -174,4 +174,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl index 0f276c05f04..b4424e5c131 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOff.il.netcore.bsl @@ -818,4 +818,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl index b23ceae43d0..28fe7607cdd 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOff.OptimizeOn.il.netcore.bsl @@ -727,4 +727,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl index 0f276c05f04..b4424e5c131 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOff.il.netcore.bsl @@ -818,4 +818,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl index b23ceae43d0..28fe7607cdd 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/TestFunction24.fs.RealInternalSignatureOn.OptimizeOn.il.netcore.bsl @@ -727,4 +727,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOff.il.bsl index 77e3b4e8a43..935f35b93b6 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOff.il.bsl @@ -33,76 +33,6 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .class auto ansi serializable sealed nested assembly beforefieldinit matchResult@38 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/matchResult@38 @_instance - .method assembly specialname rtspecialname instance void .ctor() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() - IL_0006: ret - } - - .method public strict virtual instance bool Invoke(int32 n) cil managed - { - - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: call bool assembly::condition(int32) - IL_0006: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/matchResult@38::.ctor() - IL_0005: stsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance - IL_000a: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit functionResult@43 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/functionResult@43 @_instance - .method assembly specialname rtspecialname instance void .ctor() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() - IL_0006: ret - } - - .method public strict virtual instance bool Invoke(int32 n) cil managed - { - - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: call bool assembly::condition(int32) - IL_0006: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/functionResult@43::.ctor() - IL_0005: stsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance - IL_000a: ret - } - - } - .class auto ansi serializable sealed nested assembly beforefieldinit f@8 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> { @@ -233,6 +163,76 @@ } + .class auto ansi serializable sealed nested assembly beforefieldinit matchResult@38 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/matchResult@38 @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } + + .method public strict virtual instance bool Invoke(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: call bool assembly::condition(int32) + IL_0006: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/matchResult@38::.ctor() + IL_0005: stsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance + IL_000a: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit functionResult@43 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/functionResult@43 @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } + + .method public strict virtual instance bool Invoke(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: call bool assembly::condition(int32) + IL_0006: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/functionResult@43::.ctor() + IL_0005: stsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance + IL_000a: ret + } + + } + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_list() cil managed { @@ -299,6 +299,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list() { @@ -388,4 +399,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOn.il.bsl index f6109dfd937..c70ed1ee047 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOff.OptimizeOn.il.bsl @@ -166,28 +166,66 @@ IL_0005: ret } - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> get_format@1() cil managed + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_functionResult() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> ''.$assembly::format@1 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 IL_0005: ret } - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_functionResult() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret } - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> 'get_format@1-1'() cil managed + .method assembly static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'f@26-1'(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 _arg1) cil managed { - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> ''.$assembly::'format@1-1' - IL_0005: ret + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + int32 V_2) + IL_0000: ldarg.1 + IL_0001: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0006: brfalse.s IL_000a + + IL_0008: br.s IL_0010 + + IL_000a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_000f: ret + + IL_0010: ldarg.1 + IL_0011: stloc.0 + IL_0012: ldloc.0 + IL_0013: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0018: stloc.1 + IL_0019: ldloc.0 + IL_001a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_001f: stloc.2 + IL_0020: nop + IL_0021: ldarg.0 + IL_0022: ldloc.2 + IL_0023: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0028: brfalse.s IL_0032 + + IL_002a: ldarg.0 + IL_002b: ldloc.1 + IL_002c: starg.s _arg1 + IL_002e: starg.s condition + IL_0030: br.s IL_0000 + + IL_0032: ldloc.2 + IL_0033: ldloc.1 + IL_0034: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0039: ret } .method assembly static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f@7(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 l) cil managed @@ -234,47 +272,20 @@ IL_003a: ret } - .method assembly static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'f@26-1'(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 _arg1) cil managed + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> get_format@1() cil managed { - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - int32 V_2) - IL_0000: ldarg.1 - IL_0001: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0006: brfalse.s IL_000a - - IL_0008: br.s IL_0010 - - IL_000a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_000f: ret - - IL_0010: ldarg.1 - IL_0011: stloc.0 - IL_0012: ldloc.0 - IL_0013: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0018: stloc.1 - IL_0019: ldloc.0 - IL_001a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_001f: stloc.2 - IL_0020: nop - IL_0021: ldarg.0 - IL_0022: ldloc.2 - IL_0023: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0028: brfalse.s IL_0032 - - IL_002a: ldarg.0 - IL_002b: ldloc.1 - IL_002c: starg.s _arg1 - IL_002e: starg.s condition - IL_0030: br.s IL_0000 + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> ''.$assembly::format@1 + IL_0005: ret + } - IL_0032: ldloc.2 - IL_0033: ldloc.1 - IL_0034: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0039: ret + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> 'get_format@1-1'() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> ''.$assembly::'format@1-1' + IL_0005: ret } .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -381,4 +392,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOff.il.bsl index 77e3b4e8a43..935f35b93b6 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOff.il.bsl @@ -33,76 +33,6 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) - .class auto ansi serializable sealed nested assembly beforefieldinit matchResult@38 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/matchResult@38 @_instance - .method assembly specialname rtspecialname instance void .ctor() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() - IL_0006: ret - } - - .method public strict virtual instance bool Invoke(int32 n) cil managed - { - - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: call bool assembly::condition(int32) - IL_0006: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/matchResult@38::.ctor() - IL_0005: stsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance - IL_000a: ret - } - - } - - .class auto ansi serializable sealed nested assembly beforefieldinit functionResult@43 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field static assembly initonly class assembly/functionResult@43 @_instance - .method assembly specialname rtspecialname instance void .ctor() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() - IL_0006: ret - } - - .method public strict virtual instance bool Invoke(int32 n) cil managed - { - - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: call bool assembly::condition(int32) - IL_0006: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/functionResult@43::.ctor() - IL_0005: stsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance - IL_000a: ret - } - - } - .class auto ansi serializable sealed nested assembly beforefieldinit f@8 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> { @@ -233,6 +163,76 @@ } + .class auto ansi serializable sealed nested assembly beforefieldinit matchResult@38 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/matchResult@38 @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } + + .method public strict virtual instance bool Invoke(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: call bool assembly::condition(int32) + IL_0006: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/matchResult@38::.ctor() + IL_0005: stsfld class assembly/matchResult@38 assembly/matchResult@38::@_instance + IL_000a: ret + } + + } + + .class auto ansi serializable sealed nested assembly beforefieldinit functionResult@43 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field static assembly initonly class assembly/functionResult@43 @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ret + } + + .method public strict virtual instance bool Invoke(int32 n) cil managed + { + + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: call bool assembly::condition(int32) + IL_0006: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/functionResult@43::.ctor() + IL_0005: stsfld class assembly/functionResult@43 assembly/functionResult@43::@_instance + IL_000a: ret + } + + } + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_list() cil managed { @@ -299,6 +299,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list() { @@ -388,4 +399,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOn.il.bsl index f6109dfd937..c70ed1ee047 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TestFunctions/Verify13043.fs.RealInternalSignatureOn.OptimizeOn.il.bsl @@ -166,28 +166,66 @@ IL_0005: ret } - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> get_format@1() cil managed + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_functionResult() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> ''.$assembly::format@1 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 IL_0005: ret } - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 get_functionResult() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$assembly::functionResult@43 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret } - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> 'get_format@1-1'() cil managed + .method assembly static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'f@26-1'(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 _arg1) cil managed { - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> ''.$assembly::'format@1-1' - IL_0005: ret + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + int32 V_2) + IL_0000: ldarg.1 + IL_0001: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0006: brfalse.s IL_000a + + IL_0008: br.s IL_0010 + + IL_000a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_000f: ret + + IL_0010: ldarg.1 + IL_0011: stloc.0 + IL_0012: ldloc.0 + IL_0013: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0018: stloc.1 + IL_0019: ldloc.0 + IL_001a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_001f: stloc.2 + IL_0020: nop + IL_0021: ldarg.0 + IL_0022: ldloc.2 + IL_0023: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0028: brfalse.s IL_0032 + + IL_002a: ldarg.0 + IL_002b: ldloc.1 + IL_002c: starg.s _arg1 + IL_002e: starg.s condition + IL_0030: br.s IL_0000 + + IL_0032: ldloc.2 + IL_0033: ldloc.1 + IL_0034: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) + IL_0039: ret } .method assembly static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f@7(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 l) cil managed @@ -234,47 +272,20 @@ IL_003a: ret } - .method assembly static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'f@26-1'(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 condition, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 _arg1) cil managed + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> get_format@1() cil managed { - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - int32 V_2) - IL_0000: ldarg.1 - IL_0001: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0006: brfalse.s IL_000a - - IL_0008: br.s IL_0010 - - IL_000a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_000f: ret - - IL_0010: ldarg.1 - IL_0011: stloc.0 - IL_0012: ldloc.0 - IL_0013: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0018: stloc.1 - IL_0019: ldloc.0 - IL_001a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_001f: stloc.2 - IL_0020: nop - IL_0021: ldarg.0 - IL_0022: ldloc.2 - IL_0023: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0028: brfalse.s IL_0032 - - IL_002a: ldarg.0 - IL_002b: ldloc.1 - IL_002c: starg.s _arg1 - IL_002e: starg.s condition - IL_0030: br.s IL_0000 + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> ''.$assembly::format@1 + IL_0005: ret + } - IL_0032: ldloc.2 - IL_0033: ldloc.1 - IL_0034: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0039: ret + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> 'get_format@1-1'() cil managed + { + + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [runtime]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> ''.$assembly::'format@1-1' + IL_0005: ret } .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -381,4 +392,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TryCatch/ActivePatternRecoverableException.fs.generateFilterBlocks.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TryCatch/ActivePatternRecoverableException.fs.generateFilterBlocks.il.bsl index 170695eb40f..52a92a6de73 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TryCatch/ActivePatternRecoverableException.fs.generateFilterBlocks.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TryCatch/ActivePatternRecoverableException.fs.generateFilterBlocks.il.bsl @@ -143,4 +143,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TryCatch/ActivePatternRecoverableException.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TryCatch/ActivePatternRecoverableException.fs.il.bsl index 3dd52e246c0..9eb15126e4d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TryCatch/ActivePatternRecoverableException.fs.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TryCatch/ActivePatternRecoverableException.fs.il.bsl @@ -120,4 +120,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple02.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple02.fs.RealInternalSignatureOff.il.bsl index f534de11a3a..443e9a7caf1 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple02.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple02.fs.RealInternalSignatureOff.il.bsl @@ -33,6 +33,17 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -61,4 +72,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple03.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple03.fs.RealInternalSignatureOff.il.bsl index 38f9e2e7209..630a53ad36c 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple03.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple03.fs.RealInternalSignatureOff.il.bsl @@ -33,6 +33,17 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -63,4 +74,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple04.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple04.fs.RealInternalSignatureOff.il.bsl index 50703543fc1..42dd412d0d4 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple04.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple04.fs.RealInternalSignatureOff.il.bsl @@ -33,6 +33,17 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -65,4 +76,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple05.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple05.fs.RealInternalSignatureOff.il.bsl index d7f12ed4383..af3e10a4609 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple05.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple05.fs.RealInternalSignatureOff.il.bsl @@ -33,6 +33,17 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -67,4 +78,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple06.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple06.fs.RealInternalSignatureOff.il.bsl index c5cffb98418..70c8dbbc41d 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple06.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple06.fs.RealInternalSignatureOff.il.bsl @@ -33,6 +33,17 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -69,4 +80,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple07.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple07.fs.RealInternalSignatureOff.il.bsl index c70ecd406b8..ceda3c2f845 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple07.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple07.fs.RealInternalSignatureOff.il.bsl @@ -33,6 +33,17 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -71,4 +82,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple08.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple08.fs.RealInternalSignatureOff.il.bsl index c449ddc744b..59d8cdc9663 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple08.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/Tuple08.fs.RealInternalSignatureOff.il.bsl @@ -33,6 +33,17 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -74,4 +85,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/TupleMonster.fs.RealInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/TupleMonster.fs.RealInternalSignatureOff.il.bsl index b9018c04c8b..558011b32ec 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/TupleMonster.fs.RealInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/TupleMonster.fs.RealInternalSignatureOff.il.bsl @@ -33,6 +33,17 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -112,4 +123,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/ValueTupleAliasConstructor.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/ValueTupleAliasConstructor.fs.RealInternalSignatureOff.il.netcore.bsl index 408beb203bd..b45445b949b 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/ValueTupleAliasConstructor.fs.RealInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/ValueTupleAliasConstructor.fs.RealInternalSignatureOff.il.netcore.bsl @@ -33,6 +33,17 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly::init@ + IL_0006: ldsfld int32 ''.$assembly::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$assembly @@ -61,4 +72,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.netcore.bsl index 0e21e7ba7b5..1509e346259 100644 --- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/operators/decimal_comparison.fs.RealInternalSignatureOff.il.netcore.bsl @@ -34,6 +34,17 @@ extends [runtime]System.Object { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$Decimal_comparison::init@ + IL_0006: ldsfld int32 ''.$Decimal_comparison::init@ + IL_000b: pop + IL_000c: ret + } + } .class private abstract auto ansi sealed ''.$Decimal_comparison @@ -243,4 +254,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/Language/SequenceExpressions/SequenceExpressionTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/SequenceExpressions/SequenceExpressionTests.fs index a9dcfe2fde4..7301b4c56ca 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/SequenceExpressions/SequenceExpressionTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/SequenceExpressions/SequenceExpressionTests.fs @@ -59,6 +59,15 @@ let rec f () = seq { IL_0013: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Append(class [runtime]System.Collections.Generic.IEnumerable`1, class [runtime]System.Collections.Generic.IEnumerable`1) IL_0018: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void Test/'f@3-1'::.ctor() + IL_0005: stsfld class Test/'f@3-1' Test/'f@3-1'::@_instance + IL_000a: ret } "] [] diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/LinqCount.fsx.realInternalSignatureOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/LinqCount.fsx.realInternalSignatureOff.il.netcore.bsl index 4212530b239..f38bfdc8d94 100644 --- a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/LinqCount.fsx.realInternalSignatureOff.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/LinqCount.fsx.realInternalSignatureOff.il.netcore.bsl @@ -56,6 +56,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret + } + .property class [runtime]System.Collections.Generic.List`1 r() { @@ -99,4 +110,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/LinqCount.fsx.realInternalSignatureOn.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/LinqCount.fsx.realInternalSignatureOn.il.netcore.bsl index a6608908423..82ac385ca06 100644 --- a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/LinqCount.fsx.realInternalSignatureOn.il.netcore.bsl +++ b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/LinqCount.fsx.realInternalSignatureOn.il.netcore.bsl @@ -118,4 +118,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowStaticProperty.fsx.realInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowStaticProperty.fsx.realInternalSignatureOff.il.bsl index db2be2453a7..168d76398b1 100644 --- a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowStaticProperty.fsx.realInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowStaticProperty.fsx.realInternalSignatureOff.il.bsl @@ -112,6 +112,17 @@ IL_0008: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret + } + } .class abstract auto ansi sealed nested public Exts @@ -127,6 +138,28 @@ IL_0006: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret + } + + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret } } @@ -176,4 +209,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowStaticProperty.fsx.realInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowStaticProperty.fsx.realInternalSignatureOn.il.bsl index cd48fb5a926..2e84d93e12c 100644 --- a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowStaticProperty.fsx.realInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowStaticProperty.fsx.realInternalSignatureOn.il.bsl @@ -203,4 +203,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithExtensionMethod.fsx.realInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithExtensionMethod.fsx.realInternalSignatureOff.il.bsl index 26628ed57f8..8a713b7b724 100644 --- a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithExtensionMethod.fsx.realInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithExtensionMethod.fsx.realInternalSignatureOff.il.bsl @@ -105,6 +105,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret + } + .method assembly specialname static class assembly/Foo get_f@9() cil managed { @@ -207,4 +218,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithExtensionMethod.fsx.realInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithExtensionMethod.fsx.realInternalSignatureOn.il.bsl index 61dc0c7c4b2..d3f7caa2239 100644 --- a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithExtensionMethod.fsx.realInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithExtensionMethod.fsx.realInternalSignatureOn.il.bsl @@ -111,31 +111,31 @@ IL_0005: ret } - .method assembly specialname static class assembly/Foo get_f@9() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class assembly/Foo assembly::'f@9-1' - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret } - .method assembly specialname static class assembly/Foo 'get_f@9-1'() cil managed + .method assembly specialname static class assembly/Foo get_f@9() cil managed { .maxstack 8 - IL_0000: ldsfld class assembly/Foo assembly::'f@9-2' + IL_0000: ldsfld class assembly/Foo assembly::'f@9-1' IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method assembly specialname static class assembly/Foo 'get_f@9-1'() cil managed { .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly$fsx::init@ - IL_0006: ldsfld int32 ''.$assembly$fsx::init@ - IL_000b: pop - IL_000c: ret + IL_0000: ldsfld class assembly/Foo assembly::'f@9-2' + IL_0005: ret } .method assembly static void staticInitialization@() cil managed @@ -226,4 +226,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx.realInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx.realInternalSignatureOff.il.bsl index ccf5643cb11..e633f48437e 100644 --- a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx.realInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx.realInternalSignatureOff.il.bsl @@ -97,6 +97,62 @@ } } + .class auto ansi serializable sealed nested assembly beforefieldinit todo1@18 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>> + { + .field static assembly initonly class assembly/todo1@18 @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>::.ctor() + IL_0006: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + { + + .maxstack 6 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 V_0) + IL_0000: ldc.i4.1 + IL_0001: call void assembly/Foo::set_X(int32) + IL_0006: call int32 assembly/Foo::get_X() + IL_000b: ldc.i4.1 + IL_000c: beq.s IL_0023 + + IL_000e: ldc.i4.1 + IL_000f: call valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2::NewError(!1) + IL_0014: stloc.0 + IL_0015: ldloc.0 + IL_0016: newobj instance void assembly/'todo1@20-1'::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2) + IL_001b: tail. + IL_001d: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_0022: ret + + IL_0023: ldnull + IL_0024: call valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2::NewOk(!0) + IL_0029: stloc.0 + IL_002a: ldloc.0 + IL_002b: newobj instance void assembly/'todo1@22-2'::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2) + IL_0030: tail. + IL_0032: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_0037: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/todo1@18::.ctor() + IL_0005: stsfld class assembly/todo1@18 assembly/todo1@18::@_instance + IL_000a: ret + } + + } + .class auto ansi serializable sealed nested assembly beforefieldinit 'todo1@20-1' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { @@ -169,10 +225,10 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit todo1@18 + .class auto ansi serializable sealed nested assembly beforefieldinit todo2@37 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>> { - .field static assembly initonly class assembly/todo1@18 @_instance + .field static assembly initonly class assembly/todo2@37 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -189,17 +245,17 @@ .maxstack 6 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 V_0) - IL_0000: ldc.i4.1 + IL_0000: ldc.i4.2 IL_0001: call void assembly/Foo::set_X(int32) IL_0006: call int32 assembly/Foo::get_X() - IL_000b: ldc.i4.1 + IL_000b: ldc.i4.2 IL_000c: beq.s IL_0023 - IL_000e: ldc.i4.1 + IL_000e: ldc.i4.2 IL_000f: call valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2::NewError(!1) IL_0014: stloc.0 IL_0015: ldloc.0 - IL_0016: newobj instance void assembly/'todo1@20-1'::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2) + IL_0016: newobj instance void assembly/'todo2@39-1'::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2) IL_001b: tail. IL_001d: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) IL_0022: ret @@ -208,7 +264,7 @@ IL_0024: call valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2::NewOk(!0) IL_0029: stloc.0 IL_002a: ldloc.0 - IL_002b: newobj instance void assembly/'todo1@22-2'::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2) + IL_002b: newobj instance void assembly/'todo2@41-2'::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2) IL_0030: tail. IL_0032: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) IL_0037: ret @@ -218,8 +274,8 @@ { .maxstack 10 - IL_0000: newobj instance void assembly/todo1@18::.ctor() - IL_0005: stsfld class assembly/todo1@18 assembly/todo1@18::@_instance + IL_0000: newobj instance void assembly/todo2@37::.ctor() + IL_0005: stsfld class assembly/todo2@37 assembly/todo2@37::@_instance IL_000a: ret } @@ -297,62 +353,6 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit todo2@37 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>> - { - .field static assembly initonly class assembly/todo2@37 @_instance - .method assembly specialname rtspecialname instance void .ctor() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>::.ctor() - IL_0006: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { - - .maxstack 6 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 V_0) - IL_0000: ldc.i4.2 - IL_0001: call void assembly/Foo::set_X(int32) - IL_0006: call int32 assembly/Foo::get_X() - IL_000b: ldc.i4.2 - IL_000c: beq.s IL_0023 - - IL_000e: ldc.i4.2 - IL_000f: call valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2::NewError(!1) - IL_0014: stloc.0 - IL_0015: ldloc.0 - IL_0016: newobj instance void assembly/'todo2@39-1'::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2) - IL_001b: tail. - IL_001d: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_0022: ret - - IL_0023: ldnull - IL_0024: call valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2::NewOk(!0) - IL_0029: stloc.0 - IL_002a: ldloc.0 - IL_002b: newobj instance void assembly/'todo2@41-2'::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2) - IL_0030: tail. - IL_0032: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_0037: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/todo2@37::.ctor() - IL_0005: stsfld class assembly/todo2@37 assembly/todo2@37::@_instance - IL_000a: ret - } - - } - .class abstract auto ansi sealed nested public Exts2 extends [runtime]System.Object { @@ -368,6 +368,17 @@ IL_0008: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret + } + } .class abstract auto ansi sealed nested public Exts @@ -383,6 +394,17 @@ IL_0006: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret + } + } .method public specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> get_todo1() cil managed @@ -393,14 +415,25 @@ IL_0005: ret } - .method assembly specialname static valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 get_matchValue@25() cil managed + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> get_todo2() cil managed { .maxstack 8 - IL_0000: ldsfld valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 ''.$assembly$fsx::matchValue@25 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> ''.$assembly$fsx::todo2@35 IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret + } + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> get_computation@25() cil managed { @@ -409,27 +442,27 @@ IL_0005: ret } - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> get_todo2() cil managed + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> 'get_computation@44-1'() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> ''.$assembly$fsx::todo2@35 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> ''.$assembly$fsx::'computation@44-1' IL_0005: ret } - .method assembly specialname static valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 'get_matchValue@44-1'() cil managed + .method assembly specialname static valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 get_matchValue@25() cil managed { .maxstack 8 - IL_0000: ldsfld valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 ''.$assembly$fsx::'matchValue@44-1' + IL_0000: ldsfld valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 ''.$assembly$fsx::matchValue@25 IL_0005: ret } - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> 'get_computation@44-1'() cil managed + .method assembly specialname static valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 'get_matchValue@44-1'() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> ''.$assembly$fsx::'computation@44-1' + IL_0000: ldsfld valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 ''.$assembly$fsx::'matchValue@44-1' IL_0005: ret } @@ -558,4 +591,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx.realInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx.realInternalSignatureOn.il.bsl index 4b343a89213..54afcf302ef 100644 --- a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx.realInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithLastOpenedTypeExtensions.fsx.realInternalSignatureOn.il.bsl @@ -109,6 +109,62 @@ } } + .class auto ansi serializable sealed nested assembly beforefieldinit todo1@18 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>> + { + .field static assembly initonly class assembly/todo1@18 @_instance + .method assembly specialname rtspecialname instance void .ctor() cil managed + { + .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>::.ctor() + IL_0006: ret + } + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + { + + .maxstack 6 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 V_0) + IL_0000: ldc.i4.1 + IL_0001: call void assembly/Foo::set_X(int32) + IL_0006: call int32 assembly/Foo::get_X() + IL_000b: ldc.i4.1 + IL_000c: beq.s IL_0023 + + IL_000e: ldc.i4.1 + IL_000f: call valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2::NewError(!1) + IL_0014: stloc.0 + IL_0015: ldloc.0 + IL_0016: newobj instance void assembly/'todo1@20-1'::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2) + IL_001b: tail. + IL_001d: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_0022: ret + + IL_0023: ldnull + IL_0024: call valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2::NewOk(!0) + IL_0029: stloc.0 + IL_002a: ldloc.0 + IL_002b: newobj instance void assembly/'todo1@22-2'::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2) + IL_0030: tail. + IL_0032: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_0037: ret + } + + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 10 + IL_0000: newobj instance void assembly/todo1@18::.ctor() + IL_0005: stsfld class assembly/todo1@18 assembly/todo1@18::@_instance + IL_000a: ret + } + + } + .class auto ansi serializable sealed nested assembly beforefieldinit 'todo1@20-1' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { @@ -181,10 +237,10 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit todo1@18 + .class auto ansi serializable sealed nested assembly beforefieldinit todo2@37 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>> { - .field static assembly initonly class assembly/todo1@18 @_instance + .field static assembly initonly class assembly/todo2@37 @_instance .method assembly specialname rtspecialname instance void .ctor() cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -201,17 +257,17 @@ .maxstack 6 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 V_0) - IL_0000: ldc.i4.1 + IL_0000: ldc.i4.2 IL_0001: call void assembly/Foo::set_X(int32) IL_0006: call int32 assembly/Foo::get_X() - IL_000b: ldc.i4.1 + IL_000b: ldc.i4.2 IL_000c: beq.s IL_0023 - IL_000e: ldc.i4.1 + IL_000e: ldc.i4.2 IL_000f: call valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2::NewError(!1) IL_0014: stloc.0 IL_0015: ldloc.0 - IL_0016: newobj instance void assembly/'todo1@20-1'::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2) + IL_0016: newobj instance void assembly/'todo2@39-1'::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2) IL_001b: tail. IL_001d: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) IL_0022: ret @@ -220,7 +276,7 @@ IL_0024: call valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2::NewOk(!0) IL_0029: stloc.0 IL_002a: ldloc.0 - IL_002b: newobj instance void assembly/'todo1@22-2'::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2) + IL_002b: newobj instance void assembly/'todo2@41-2'::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2) IL_0030: tail. IL_0032: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) IL_0037: ret @@ -230,8 +286,8 @@ { .maxstack 10 - IL_0000: newobj instance void assembly/todo1@18::.ctor() - IL_0005: stsfld class assembly/todo1@18 assembly/todo1@18::@_instance + IL_0000: newobj instance void assembly/todo2@37::.ctor() + IL_0005: stsfld class assembly/todo2@37 assembly/todo2@37::@_instance IL_000a: ret } @@ -309,62 +365,6 @@ } - .class auto ansi serializable sealed nested assembly beforefieldinit todo2@37 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>> - { - .field static assembly initonly class assembly/todo2@37 @_instance - .method assembly specialname rtspecialname instance void .ctor() cil managed - { - .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>>::.ctor() - IL_0006: ret - } - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { - - .maxstack 6 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 V_0) - IL_0000: ldc.i4.2 - IL_0001: call void assembly/Foo::set_X(int32) - IL_0006: call int32 assembly/Foo::get_X() - IL_000b: ldc.i4.2 - IL_000c: beq.s IL_0023 - - IL_000e: ldc.i4.2 - IL_000f: call valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2::NewError(!1) - IL_0014: stloc.0 - IL_0015: ldloc.0 - IL_0016: newobj instance void assembly/'todo2@39-1'::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2) - IL_001b: tail. - IL_001d: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_0022: ret - - IL_0023: ldnull - IL_0024: call valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2::NewOk(!0) - IL_0029: stloc.0 - IL_002a: ldloc.0 - IL_002b: newobj instance void assembly/'todo2@41-2'::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2) - IL_0030: tail. - IL_0032: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_0037: ret - } - - .method private specialname rtspecialname static void .cctor() cil managed - { - - .maxstack 10 - IL_0000: newobj instance void assembly/todo2@37::.ctor() - IL_0005: stsfld class assembly/todo2@37 assembly/todo2@37::@_instance - IL_000a: ret - } - - } - .class abstract auto ansi sealed nested public Exts2 extends [runtime]System.Object { @@ -417,55 +417,55 @@ IL_0005: ret } - .method assembly specialname static valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 get_matchValue@25() cil managed + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> get_todo2() cil managed { .maxstack 8 - IL_0000: ldsfld valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 assembly::matchValue@25 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> assembly::todo2@35 IL_0005: ret } - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> get_computation@25() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> assembly::computation@25 - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret } - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> get_todo2() cil managed + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> get_computation@25() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> assembly::todo2@35 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> assembly::computation@25 IL_0005: ret } - .method assembly specialname static valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 'get_matchValue@44-1'() cil managed + .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> 'get_computation@44-1'() cil managed { .maxstack 8 - IL_0000: ldsfld valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 assembly::'matchValue@44-1' + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> assembly::'computation@44-1' IL_0005: ret } - .method assembly specialname static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> 'get_computation@44-1'() cil managed + .method assembly specialname static valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 get_matchValue@25() cil managed { .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> assembly::'computation@44-1' + IL_0000: ldsfld valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 assembly::matchValue@25 IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method assembly specialname static valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 'get_matchValue@44-1'() cil managed { .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly$fsx::init@ - IL_0006: ldsfld int32 ''.$assembly$fsx::init@ - IL_000b: pop - IL_000c: ret + IL_0000: ldsfld valuetype [FSharp.Core]Microsoft.FSharp.Core.FSharpResult`2 assembly::'matchValue@44-1' + IL_0005: ret } .method assembly static void staticInitialization@() cil managed @@ -585,4 +585,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithTypeExtension.fsx.realInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithTypeExtension.fsx.realInternalSignatureOff.il.bsl index eee547f4291..292d8299fe5 100644 --- a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithTypeExtension.fsx.realInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithTypeExtension.fsx.realInternalSignatureOff.il.bsl @@ -94,6 +94,17 @@ IL_0008: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret + } + } .method public specialname static class assembly/Foo get_f() cil managed @@ -104,6 +115,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret + } + .method assembly specialname static class assembly/Foo get_f@8() cil managed { @@ -206,4 +228,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithTypeExtension.fsx.realInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithTypeExtension.fsx.realInternalSignatureOn.il.bsl index cb0286dc082..efd6d440f1d 100644 --- a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithTypeExtension.fsx.realInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowWithTypeExtension.fsx.realInternalSignatureOn.il.bsl @@ -110,31 +110,31 @@ IL_0005: ret } - .method assembly specialname static class assembly/Foo get_f@8() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class assembly/Foo assembly::'f@8-1' - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret } - .method assembly specialname static class assembly/Foo 'get_f@8-1'() cil managed + .method assembly specialname static class assembly/Foo get_f@8() cil managed { .maxstack 8 - IL_0000: ldsfld class assembly/Foo assembly::'f@8-2' + IL_0000: ldsfld class assembly/Foo assembly::'f@8-1' IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method assembly specialname static class assembly/Foo 'get_f@8-1'() cil managed { .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly$fsx::init@ - IL_0006: ldsfld int32 ''.$assembly$fsx::init@ - IL_000b: pop - IL_000c: ret + IL_0000: ldsfld class assembly/Foo assembly::'f@8-2' + IL_0005: ret } .method assembly static void staticInitialization@() cil managed @@ -225,4 +225,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowingAndStillOkWithChainedCalls.fsx.realInternalSignatureOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowingAndStillOkWithChainedCalls.fsx.realInternalSignatureOff.il.bsl index 81819793841..a223ed55e96 100644 --- a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowingAndStillOkWithChainedCalls.fsx.realInternalSignatureOff.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowingAndStillOkWithChainedCalls.fsx.realInternalSignatureOff.il.bsl @@ -127,6 +127,17 @@ IL_0005: ret } + .method private specialname rtspecialname static void .cctor() cil managed + { + + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret + } + .method assembly specialname static class assembly/Foo get_f@10() cil managed { @@ -229,4 +240,3 @@ - diff --git a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowingAndStillOkWithChainedCalls.fsx.realInternalSignatureOn.il.bsl b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowingAndStillOkWithChainedCalls.fsx.realInternalSignatureOn.il.bsl index 833b0b9ec4c..67761a594d4 100644 --- a/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowingAndStillOkWithChainedCalls.fsx.realInternalSignatureOn.il.bsl +++ b/tests/FSharp.Compiler.ComponentTests/TypeChecks/Shadowing/ShadowingAndStillOkWithChainedCalls.fsx.realInternalSignatureOn.il.bsl @@ -133,31 +133,31 @@ IL_0005: ret } - .method assembly specialname static class assembly/Foo get_f@10() cil managed + .method private specialname rtspecialname static void .cctor() cil managed { .maxstack 8 - IL_0000: ldsfld class assembly/Foo assembly::'f@10-1' - IL_0005: ret + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 ''.$assembly$fsx::init@ + IL_0006: ldsfld int32 ''.$assembly$fsx::init@ + IL_000b: pop + IL_000c: ret } - .method assembly specialname static class assembly/Foo 'get_f@10-1'() cil managed + .method assembly specialname static class assembly/Foo get_f@10() cil managed { .maxstack 8 - IL_0000: ldsfld class assembly/Foo assembly::'f@10-2' + IL_0000: ldsfld class assembly/Foo assembly::'f@10-1' IL_0005: ret } - .method private specialname rtspecialname static void .cctor() cil managed + .method assembly specialname static class assembly/Foo 'get_f@10-1'() cil managed { .maxstack 8 - IL_0000: ldc.i4.0 - IL_0001: stsfld int32 ''.$assembly$fsx::init@ - IL_0006: ldsfld int32 ''.$assembly$fsx::init@ - IL_000b: pop - IL_000c: ret + IL_0000: ldsfld class assembly/Foo assembly::'f@10-2' + IL_0005: ret } .method assembly static void staticInitialization@() cil managed @@ -248,4 +248,3 @@ - diff --git a/tests/ILVerify/ilverify.ps1 b/tests/ILVerify/ilverify.ps1 index 41733ff2abf..4d4a64f4b95 100644 --- a/tests/ILVerify/ilverify.ps1 +++ b/tests/ILVerify/ilverify.ps1 @@ -4,12 +4,15 @@ function Normalize-IlverifyOutputLine { param( [string]$line ) - # Remove F# closure suffixes: +clo@NNN-NNN, +clo@NNN, +NAME@NNN-NNN, +NAME@NNN - $line = $line -replace '(\+\w+)@\d+(-\d+)?', '$1' + # Remove F# closure suffixes: +clo@NNN[F][-NNN], +NAME@NNN[F][-NNN] + # The optional F infix is added by PerFileClosureNameScope for closures inlined + # from another file (cross-file inlining). See + # https://github.com/dotnet/fsharp/issues/19928. + $line = $line -replace '(\+\w+)@\d+(F\d+)?(-\d+)?', '$1' # Remove patterns like "Pipe #1 stage #1 at line 1782@1782" $line = $line -replace 'Pipe #\d+ stage #\d+ at line \d+@\d+', '' - # Remove function suffixes like NAME@NNN or NAME@NNN-NNN in method names - $line = $line -replace '(\w+)@\d+(-\d+)?', '$1' + # Remove function suffixes like NAME@NNN[F][-NNN] in method names + $line = $line -replace '(\w+)@\d+(F\d+)?(-\d+)?', '$1' # Remove 'at line NNNN' $line = $line -replace 'at line \d+', '' # Remove leftover double spaces, stray "+" etc. diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/DeterministicTests.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/DeterministicTests.fs index ad43e5b7bf0..0d678b442d1 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/DeterministicTests.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/DeterministicTests.fs @@ -334,6 +334,72 @@ let inline myFunc x y = x - y""" else Assert.NotEqual(mvid1,mvid2) + // https://github.com/dotnet/fsharp/issues/19732 + // Multi-file optimized compilation exercises DetupleArgs and TLR (tuple-arg + // functions + nested lambdas). These passes iterate Val sets whose order + // depends on Val.Stamp, which is racy under parallel optimization. + // The fix sorts by source position (valSourceOrderKey) before iterating. + // Note: this in-process test is a regression guard; the full race requires + // large-scale parallel compilation tested by eng/test-determinism.ps1 in Release. + [] + let ``Optimized multi-file assembly should be deterministic`` () = + let outputDir = DirectoryInfo(Path.Combine(Path.GetTempPath(), "fsharp-determinism-test")) + if outputDir.Exists then outputDir.Delete(true) + outputDir.Create() + + let makeFile i = + FsSourceWithFileName + $"File%d{i}.fs" + $""" +module File%d{i} + +let processTuple%d{i} (a: int, b: string) = + let inner x = x + a + (inner 1, b.Length) + +let callSite%d{i} () = + let r1 = processTuple%d{i} (42, "hello") + let r2 = processTuple%d{i} (99, "world") + let nested () = + let deep () = fst r1 + fst r2 + deep () + nested () +""" + + let additionalFiles = [ for i in 2..8 -> makeFile i ] + + let getMvid () = + FSharp + """ +module File1 + +let processTuple1 (a: int, b: string) = + let inner x = x + a + (inner 1, b.Length) + +let callSite1 () = + let r1 = processTuple1 (42, "hello") + let r2 = processTuple1 (99, "world") + let nested () = + let deep () = fst r1 + fst r2 + deep () + nested () +""" + |> withAdditionalSourceFiles additionalFiles + |> asLibrary + |> withOptimize + |> withName "DetTest" + |> withOutputDirectory (Some outputDir) + |> withOptions [ "--deterministic" ] + |> compileGuid + + let mvids = [| for _ in 1..10 -> getMvid () |] + + for i in 1 .. mvids.Length - 1 do + Assert.Equal(mvids.[0], mvids.[i]) + + outputDir.Delete(true) + [] let ``Reference assemblies MVID must change when literal constant value changes`` () = let codeWithLiteral42 = """